Q: Py_InitModule

rerwig at my-deja.com rerwig at my-deja.com
Tue Feb 1 02:02:39 EST 2000


On learning on ho to write extension modules, I
found the piece of information below:

Module documentation string

By far the easiest, add a character string
argument to the end of Py_InitModule.

     void
     initmodname()
       {
         static char modname__doc__[] = "\
     This module contains some functions,
constants and maybe a type.";

         (void)Py_InitModule("modname", methods,
modname__doc__);
       }

However, compiling it produces an warning as
Py_InitModule only expects 2 parms, not 3.
What am I missing?


Sent via Deja.com http://www.deja.com/
Before you buy.



More information about the Python-list mailing list