Seg fault in python extension module

John Machin sjmachin at lexicon.net
Fri Jun 2 23:56:35 EDT 2006


On 3/06/2006 1:38 PM, sam wrote:
> I recommend that you also replace the NULL after the METH_VARARGS with
> a valid documentations string such as:
> 
> static PyMethodDef modglMethods[] =
>        {
>          { (char *)"glVertex4f", _wrap_glVertex4f, METH_VARARGS, "My
> Doc String"},
>          { NULL, NULL, 0, NULL }
> 
>       };
> 

Lack of one is unlikely to have anything to do with the OP's segfault.

|>>> repr(modgl.glVertex4f.__doc__)
'None'
|>>>

As to style, etiquette, and good citizenship in module extension 
writing, it might be better to give him some references, rather than 
mention just one point.

Cheers,
John



More information about the Python-list mailing list