On Thu, Nov 4, 2010 at 2:40 PM, Christopher Barker
<[email protected]> wrote:
> On 11/4/10 2:28 PM, Stefan Behnel wrote:
>> Christopher Barker, 04.11.2010 17:55:
>>> One day, we may have a mature Cython code generator for wrapping C/C++
>>> (and it may be worth looking at what has been done along those lines).
>>
>> The code generation has never been the main problem. That would be parsing
>> arbitrary header files (preferably without adding huge dependencies like
>> gccxml or clang) and figuring out what's relevant enough to merit ending up
>> in the generated code. Once that's done, generating a Cython .pxd file
>> and/or "mostly usable" code skeleton from it is rather straight forward.
>
> well, when I wrote "code generation", I meant to imply the whole kit and
> kaboodle.
>
> What about Doxygen for the parsing? Or still too huge a dependency?

I would not be opposed to having a separate dependency for the code
parser/generator--once one has the .pxd files those can be shipped and
used elsewhere. For simple cases (e.g. basic C header files) a
relatively lightweight thing would be nice.

> Anyway, part of my point is that if you have a bunch of code that
> follows conventions, auto-generating cython that, for instance, turns
> every GetThis-SetThis pair into a python property would be pretty easy.
>
> Making it fully general is another story.

Yep. Another general solution would be a full lisp-like macro system,
but that's a more design and implementation work than would take place
in the near future.

- Robert
_______________________________________________
Cython-dev mailing list
[email protected]
http://codespeak.net/mailman/listinfo/cython-dev

Reply via email to