-
Committer:
John Arbash Meinel
-
Date:
2009-10-06 21:35:29 UTC
-
mto:
(4679.6.1 2.1-export-c-api)
-
mto:
This revision was merged to the branch mainline in
revision
4735.
-
Revision ID:
john@arbash-meinel.com-20091006213529-k02tyvu39jnxr03k
Things are ~ working again.
Man this is getting messy, I may have to change my mind again.
I tried to export the StaticTuple type only through _static_tuple_pyx.pyx
by using a little bit of trickery. However, you end up with a circular
import issue, and also I forgot to track down one place where I needed
to rename '_static_tuple_c' => '_static_tuple_type_c'.
The idea was that _static_tuple_type.c would *only* define the type,
and not any extra info. This way the code could be compiled with either
cython or pyrex and still get the 'better' StaticTuple object.
It ended up, overall, just being a multi-hour mess trying to get the
dependencies sorted out. By using a .pxd file, at least the basic
circular import problem was sorted out.
However at this point, you *have* to import _static_tuple_pyx before
_static_tuple_type_c or you get a segfault, and you have to import the
latter if you want to get direct access to the class.
So at this point I feel like I either need to:
1) Go back to the way it was, and get rid of the circular import
2) Finish the rest of the steps, bring everything into Cython
and say 'if you want the memory improvements, then you have
to compile with cython.'