[Pyrex] access to c data class members
Greg Ewing
greg.ewing at canterbury.ac.nz
Mon Aug 28 02:12:21 UTC 2006
ahalda at cs.mcgill.ca wrote:
> So, the solution is to do BOTH strategies at once, on the same name:
> Define it a C-object, and then *also* as a python object.
You seem confused. It's not a matter of declaring it as
two different things at once. You declare the type of
the variable, and then assign a value to it.
> Maybe that should go in the language definition page in the 'tricks'
> section. It is a little non-intuitive
There's nothing tricky about it; it's just a direct
consequence of Pyrex's type system. The section on
"Attributes" under "Extension Types" mentions the
need for such declarations, although admittedly it's
rather compressed and would be easy to miss on a
first reading. I'll think about expanding it a bit.
--
Greg
More information about the Pyrex
mailing list