[Pyrex] Strange behaviours in 0.8

Roberto Cavada cavada at irst.itc.it
Tue Jun 24 17:16:58 CEST 2003


Hi,
   I'm reporting a couple of strange behaviours in version 0.8:

1a) Name prefix at least for external types (probably already reported):

This module should wrap the ClassA type:

cdef extern from "test.h":
   cdef struct ClassA_TAG
   ctypedef ClassA_TAG* ClassA_ptr
   pass

cdef class ClassA:
     cdef ClassA_ptr cobject


...but generated C code for class ClassA results as:

struct __pyx_obj_4test_ClassA {
   PyObject_HEAD
   struct __pyx_t_4test_ClassA_TAG (*cobject);
};

where "struct __pyx_t_4test_ClassA_TAG" should be simply "struct 
ClassA_TAG".


1b) The example above also makes me wondering if it could be better to 
do not remap ClassA_ptr as ClassA_TAG* as well as the current 
generator does.


2) cimport searches for .pxd files before searching for .pyx, and this 
is what users actually expect if they are customed to any similar 
tools. Anyway I think that something is wrong here, since the .pxd 
files is searched and processed even if the cimport statement is not 
specified.


rob





More information about the Pyrex mailing list