Michael George wrote:
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
Thanks for the link. It may or may not be obsolete advice. It's been
around in since 1996 at least (Python 1.4) and in its current form since
2000 (Python 2.0). I will have to check it out some more. With DLLs was
never a consideration.
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.
Compiling in a source file through Setup.in will work on any system.
--
Lenard Lindstrom
<[EMAIL PROTECTED]>