[Pyrex] really wanting C++ support
Matthias Baas
baas at ira.uka.de
Thu May 8 15:57:24 CEST 2003
At 15:55 07.05.2003 +1200, David McNab wrote:
>For a start, a '--cplusplus' or '-C' argument to pyrexc, which would
>cause a C++ file to get generated, with all exported functions (python
>entry points and user-declared public funcs) declared as 'extern C'.
...and use a C++ file extension for the output file (e.g. ".cpp" or ".cc"
instead of ".c") if no name was provided by the user.
>Then, some limited support for C++ objects, whereby object and object
>pointer variables can be accessed, as well as their methods and
>attributes via the existing '.' syntax.
That's also what I would have suggested as a first step which would already
be very useful.
It should also be possible to create and release instances with the new()
and delete() operators.
Maybe the next step would then be to support C++ exceptions which should
somehow be translated into corresponding Python exceptions. Namespaces is
another thing that comes into mind, whereas I would give templates a rather
low priority.
- Matthias -
More information about the Pyrex
mailing list