Skip to content

Commit ec0b4af

Browse files
author
Roger E. Masse
committed
Eradicated all references to getintarg and getstrarg and substituded the
proper functions as defined in rename2.h. Thanks Barry!
1 parent cfe3b61 commit ec0b4af

1 file changed

Lines changed: 2 additions & 5 deletions

File tree

Modules/grpmodule.c

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -36,9 +36,6 @@ PERFORMANCE OF THIS SOFTWARE.
3636
#include <sys/types.h>
3737
#include <grp.h>
3838

39-
#define getintarg(v,a) PyArg_Parse((v),"i",(a))
40-
#define getstrarg(v,a) PyArg_Parse((v),"s",(a))
41-
4239
static PyObject *mkgrent(p)
4340
struct group *p;
4441
{
@@ -75,7 +72,7 @@ static PyObject *grp_getgrgid(self, args)
7572
{
7673
int gid;
7774
struct group *p;
78-
if (!getintarg(args, &gid))
75+
if (!PyArg_Parse((args),"i",(&gid)))
7976
return NULL;
8077
if ((p = getgrgid(gid)) == NULL) {
8178
PyErr_SetString(PyExc_KeyError, "getgrgid(): gid not found");
@@ -89,7 +86,7 @@ static PyObject *grp_getgrnam(self, args)
8986
{
9087
char *name;
9188
struct group *p;
92-
if (!getstrarg(args, &name))
89+
if (!PyArg_Parse((args),"s",(&name)))
9390
return NULL;
9491
if ((p = getgrnam(name)) == NULL) {
9592
PyErr_SetString(PyExc_KeyError, "getgrnam(): name not found");

0 commit comments

Comments
 (0)