[Zope-Checkins] CVS: Zope/lib/Components/initgroups - initgroups.c:1.3
Jeremy Hylton
jeremy@zope.com
Thu, 25 Jul 2002 17:54:03 -0400
Update of /cvs-repository/Zope/lib/Components/initgroups
In directory cvs.zope.org:/tmp/cvs-serv28439
Modified Files:
initgroups.c
Log Message:
Convert K&R declaration to Std C prototype.
Silence warnings.
Add :name to PyArg_ParseTuple() call.
=== Zope/lib/Components/initgroups/initgroups.c 1.2 => 1.3 ===
#include <unistd.h>
static PyObject *
-initgroups_initgroups(self, args)
-PyObject *self;
-PyObject *args;
+initgroups_initgroups(PyObject *self, PyObject *args)
{
char *username;
gid_t gid;
- if(!PyArg_ParseTuple(args, "sl", &username, &gid))
+ if (!PyArg_ParseTuple(args, "sl:initgroups", &username, &gid))
return NULL;
- if(initgroups(username, gid) == -1)
+ if (initgroups(username, gid) == -1)
return PyErr_SetFromErrno(PyExc_OSError);
Py_INCREF(Py_None);
@@ -53,8 +51,8 @@
#endif /* defined(__unix__) || defined(unix) */
void
-initinitgroups()
+initinitgroups(void)
{
- (void)Py_InitModule("initgroups", InitgroupsMethods);
+ Py_InitModule("initgroups", InitgroupsMethods);
}