[Pyrex] when pyrex gets tough

Greg Ewing greg.ewing at canterbury.ac.nz
Tue Sep 4 00:43:19 CEST 2007


David McNab wrote:
> Putting the extern'ed ratio struct constants into the 'cdef extern from'
> was just the voodoo I was looking for...
>
> (Did I miss something when I was so impatiently reading the pyrex
> manual? Is this a special case worth adding to the manual?)

Well, it's not really a special case at all.
The extern-from block can contain any kind of
C declaration, and that includes variables.

Your problem seems to have been that you were
expecting there to be a special case where there
wasn't one. It's hard to anticipate all the
places in the manual where someone might need
it pointed out that "there's no special case
here". :-)

 > Pyrex is a fine precision scalpel, while SWIG
> is a huge diesel chainsaw.

If there were a QOTW for the Pyrex list, this
would be it!

> The one good thing about SWIG though is its brilliant and seamless C++
> support (hint hint!)

Don't worry, I'll get there eventually...

--
Greg



More information about the Pyrex mailing list