[Pyrex] Pyrex patch for C++ support: Was; Please support C++
Lenard Lindstrom
len-l at telus.net
Thu Oct 20 06:03:09 CEST 2005
Greg has graciously made available a Pyrex patch I wrote to allow
some Pyrex programs to also compiler under C++. It can be found on
the Pyrex home page:
http://www.cosc.canterbury.ac.nz/~greg/python/Pyrex/
The patch is preliminary and not proven. But it mostly involves just
rearranging some support code and adding a few conditional extern "C"
qualifiers. So it should not prevent any Pyrex program compiling as
C. I have tried it on much of the Pyrex test suite and have found no
problems yet.
The patch should allow the wrapping of C++ api functions and the
writing of simple extension types. But anything involving extension
types as lvalues or object attributes will fail to compile as C++.
A far more comprehensive patch is in the works. It covers all the
problems I could uncover in getting Pyrex programs to compile as C++.
As a side benefit the patch also covers issues involving GCC 4.0 and
compiler warning messages. Currently it passes all the tests I have
given it. I am now reviewing my changes and hope to run more tests.
Lenard Lindstrom
<len-l at telus.net>
More information about the Pyrex
mailing list