Forward Declaring Py_complex
Greg Ewing
see_reply_address at something.invalid
Thu Jul 4 21:10:55 EDT 2002
Mark Charsley wrote:
> Is there any way to forward declare Py_complex in C++ headers? I'm trying
> to create a C++ function that returns a Py_complex, and would really
> prefer not to have to pull in all of Python.h in the header file.
If you just want an opaque definition, this
seems to work:
typedef struct TAG_Py_complex Py_complex;
The fact that there isn't really any TAG_Py_complex
shouldn't bother it if you never include the real definition
from complexobject.h. (If you are, presumably
you don't need the opaque definition anyway.)
--
Greg Ewing, Computer Science Dept,
University of Canterbury,
Christchurch, New Zealand
http://www.cosc.canterbury.ac.nz/~greg
More information about the Python-list
mailing list