[Pyrex] 0.9.5 'defaults' is it something special now?
Helmut Jarausch
jarausch at igpm.rwth-aachen.de
Mon Jan 29 11:09:30 UTC 2007
Hi,
the following code snippets worked just fine with Pyrex 0.9.4 but not
with 0.9.5
In the .pyx file
def Scanner(Line):
cdef NumTotal
cdef NumSubs
cdef NumIns
cdef NumDels
cdef IgnCase
cdef Mods
cdef Mask
cdef Key
cdef p
cdef pe
cdef pos
cdef L
cdef From
cdef To
cdef APSM O
cdef EXACT
cdef ICASE
cdef inCCLASS
cdef CCLASS
cdef Negate
cdef defaults
# set defaults
try :
NumTotal_D, NumSubs_D, NumIns_D, NumDels_D, IgnCase_D = Scanner.defaults
print "taking defaults"
except :
NumTotal_D, NumSubs_D, NumIns_D, NumDels_D, IgnCase_D = 1, 1, 0, 0, True
Mods= None
.....
all of these cdef'ed variables are generated except the last one
'defaults'
In the generated c-code I get
PyObject *__pyx_v_NumTotal;
....
but no
PyObject *__pyx_v_defaults
On the other hand, lateron, there is
__pyx_v_defaults = Py_None; Py_INCREF(Py_None);
was causes gcc to bail out (of course)
Many thanks for any hint,
Helmut.
--
Helmut Jarausch
Lehrstuhl fuer Numerische Mathematik
RWTH - Aachen University
D 52056 Aachen, Germany
More information about the Pyrex
mailing list