On  9-Apr-2008, at 07:56 , Ronald Oussoren wrote:

Even fixing bgen isn't that much work, once you understand the code. The problem is that bgen is a nearly vertical learning curve and Jack seems to be the only person that understands enough of bgen to be able to hack on it. I'm definitely in favor of ditching bgen and moving toward PyObjC-based wrappers.


I would also be in favor of using PyObjC-based wrappers.
But: I'm not sure that completely ditching bgen is what's needed. The front-end of bgen, which reads the C header files and produces what's basically interface definitions, should be understandable. The xxxgen.py files (which are really the interface definitions) could then be used to create bridgesupport files, and everything should play together well enough.

The only problem would be compatibility: one of the things bgen does is convert the procedural Carbon C argument convention (with the main object being the first argument, usually) to an OO model on the Python side. I don't think bridgesupport can pull off this trick. And the conversion of arguments to be more Pythonic (two arguments of the form "char *buf, int bufsiz" are represented as a single string on the Python side, and lots more) is probably difficult too.
--
Jack Jansen, <[EMAIL PROTECTED]>, http://www.cwi.nl/~jack
If I can't dance I don't want to be part of your revolution -- Emma Goldman


_______________________________________________
Pythonmac-SIG maillist  -  Pythonmac-SIG@python.org
http://mail.python.org/mailman/listinfo/pythonmac-sig

Reply via email to