getargs(...) weirdness

Jay Steele (jdsteele@espresso.UWaterloo.CA)
Wed, 11 Jan 1995 03:43:06 GMT

In my attempts to extend python with a new module, I've run across
what I think is a pretty bizarre problem, and before I spend a zillion
hours trying to figure it out myself, I'd see if anybody else had
encountered anything similar.

I'm finding that getargs() is dumping core because the "args"
parameter is NULL. I can reproduce this in any module, but
for example, take the module grp:

>>> import grp
>>> grp.getgrgid()

The function is *supposed* to take an integer. In the routine
grp_getgrgid(self, args) in grpmodule.c, "args" is passed a NULL
pointer, which is causing a segmentation fault in convertsimple,
which is called from getargs(args, ...).

Shouldn't this be complaining about insufficient arguments?

-Jay