Commit ec0b4af3 authored by Roger E. Masse's avatar Roger E. Masse

Eradicated all references to getintarg and getstrarg and substituded the

proper functions as defined in rename2.h.  Thanks Barry!
parent cfe3b61c
...@@ -36,9 +36,6 @@ PERFORMANCE OF THIS SOFTWARE. ...@@ -36,9 +36,6 @@ PERFORMANCE OF THIS SOFTWARE.
#include <sys/types.h> #include <sys/types.h>
#include <grp.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) static PyObject *mkgrent(p)
struct group *p; struct group *p;
{ {
...@@ -75,7 +72,7 @@ static PyObject *grp_getgrgid(self, args) ...@@ -75,7 +72,7 @@ static PyObject *grp_getgrgid(self, args)
{ {
int gid; int gid;
struct group *p; struct group *p;
if (!getintarg(args, &gid)) if (!PyArg_Parse((args),"i",(&gid)))
return NULL; return NULL;
if ((p = getgrgid(gid)) == NULL) { if ((p = getgrgid(gid)) == NULL) {
PyErr_SetString(PyExc_KeyError, "getgrgid(): gid not found"); PyErr_SetString(PyExc_KeyError, "getgrgid(): gid not found");
...@@ -89,7 +86,7 @@ static PyObject *grp_getgrnam(self, args) ...@@ -89,7 +86,7 @@ static PyObject *grp_getgrnam(self, args)
{ {
char *name; char *name;
struct group *p; struct group *p;
if (!getstrarg(args, &name)) if (!PyArg_Parse((args),"s",(&name)))
return NULL; return NULL;
if ((p = getgrnam(name)) == NULL) { if ((p = getgrnam(name)) == NULL) {
PyErr_SetString(PyExc_KeyError, "getgrnam(): name not found"); PyErr_SetString(PyExc_KeyError, "getgrnam(): name not found");
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment