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

[pygame] extending mask module?



Greetings,

I have some extensions to the mask module for my game, and I'm trying to figure out how to build/package them. For the sake of getting it working I've just hacked them into the pygame source and been building a custom pygame, but obviously that's not a good solution.

However as I'm trying to tease it out of there I'm coming across some confusion. It looks to me like the mask module violates the "everything static except initmodule" rule, because the functions in bitmask.c are exported, and AFAICT bitmask.c is linked into the mask module.

Part of the reason this is a problem is because the mask module doesn't seem to export any kind of C API like the other modules do. It would be useful to me if the bitmask_* functions were exported.

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?

--Mike