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

Re: [pygame] extending mask module?



Hi Michael,

bitmask.c is statically linked to mask.c as an object file. On Windows the distutils package ensures only the initmask function is exported as an entry point into the mask.pyd DLL. Unix dynamic libraries may be more liberal as to what is exported, but Python will only directly call the module initialization function, so no problem.

Setup.in controls extension builds. This is like a make file. Each extension module, like mask, has its own line, or dependency entry. A new C module can be added to an extension module by adding its source file to an extension module entry. Be sure to run config.py afterward to build the Setup file used by setup.py.

Lenard

Michael George wrote:

Greetings,

[snip]


I'd be happy to spend some time and submit a patch, but I'm not quite sure how it should work. Should mask.c access the bitmask.c functions through the exported function table? Should mask.c just #include bitmask.c? Any thoughts?

[from another post in this thread]
>
>  Understanding the build system(s) is a bit daunting.

--Mike


--
Lenard Lindstrom
<len-l@xxxxxxxxx>