[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

Re: [pygame] extending mask module?



Lenard Lindstrom wrote:
I see that the distutils package has an option for exporting names from an extension module on Windows. So if only the init function is non-static why provide a way to export other non-static names? I would like to know where in the Python documentation is says that only init functions be non-static. It is apparently outdated advice.

I got it from here: http://docs.python.org/extending/extending.html#the-module-s-method-table-and-initialization-function

quote:
The method table must be passed to the interpreter in the module’s initialization function. The initialization function must be named initname, where /name/ is the name of the module, and should be the only non-static item defined in the module file.

But perhaps this is just guidelines. Anyway, I ended up linking bitmask.c into my module as you suggested and it worked fine, at least on my platform. I guess I'll cross the portability stream if and when I come to it.

Thanks!

--Mike