]> granicus.if.org Git - python/commitdiff
Eradicated all references to getintarg and getstrarg and substituded the
authorRoger E. Masse <rmasse@newcnri.cnri.reston.va.us>
Wed, 18 Dec 1996 20:07:39 +0000 (20:07 +0000)
committerRoger E. Masse <rmasse@newcnri.cnri.reston.va.us>
Wed, 18 Dec 1996 20:07:39 +0000 (20:07 +0000)
proper functions as defined in rename2.h.  Thanks Barry!

Modules/grpmodule.c

index 23f28f5e917a12c4ff2b77acd1a03cfc6c7e85bd..ccdba125246f5cbd4693ecb479256e612afbf14a 100644 (file)
@@ -36,9 +36,6 @@ PERFORMANCE OF THIS SOFTWARE.
 #include <sys/types.h>
 #include <grp.h>
 
-#define getintarg(v,a) PyArg_Parse((v),"i",(a))
-#define getstrarg(v,a) PyArg_Parse((v),"s",(a))
-
 static PyObject *mkgrent(p)
        struct group *p;
 {
@@ -75,7 +72,7 @@ static PyObject *grp_getgrgid(self, args)
 {
        int gid;
        struct group *p;
-       if (!getintarg(args, &gid))
+       if (!PyArg_Parse((args),"i",(&gid)))
                return NULL;
        if ((p = getgrgid(gid)) == NULL) {
                PyErr_SetString(PyExc_KeyError, "getgrgid(): gid not found");
@@ -89,7 +86,7 @@ static PyObject *grp_getgrnam(self, args)
 {
        char *name;
        struct group *p;
-       if (!getstrarg(args, &name))
+       if (!PyArg_Parse((args),"s",(&name)))
                return NULL;
        if ((p = getgrnam(name)) == NULL) {
                PyErr_SetString(PyExc_KeyError, "getgrnam(): name not found");