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

Re: [pygame] extending mask module?



Just something more I noticed.

Lenard Lindstrom wrote:

Regarding shared (dynamic) libraries I am have only used Windows DLLs. Unix shared libraries are similar.

Michael George wrote:

The part I was and am still a bit confused about is name clashes. If I understand correctly, python extension modules are supposed to only export the initmodule method in order to avoid name clashes, which is why the docs say everything should be static.
[snip]

Name clashes were a concern in the past when extension modules were statically linked to the Python interpreter, as was necessary with DOS. I assume no modern operating system requires this, so name clashes are no longer an issue. (See below.) If anyone is still statically linking the Pygame extension modules they haven't complained about name conflicts yet. Besides, all the bitmask names are mangled with a prefix.

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.

--
Lenard Lindstrom
<len-l@xxxxxxxxx>