Why is the type declaration there? Even "typedef int const int"  would 
be bogus. That I am using volatile should not matter. Never typedef 
native C types to something else.

Sturla Molden



ctypedef int vint "volatile int"

cdef class giltest:

    cdef vint tag, stop, start, missed, switched
    cdef int num_threads, trials


Is compiled to:


/* Type declarations */

typedef int volatile int;

/* "D:\giltest.pyx":8
 *
 *
 * cdef class giltest:             # <<<<<<<<<<<<<<
 *
 *     cdef vint tag, stop, start, missed, switched
 */

struct __pyx_obj_7giltest_giltest {
  PyObject_HEAD
  volatile int tag;
  volatile int stop;
  volatile int start;
  volatile int missed;
  volatile int switched;
  int num_threads;
  int trials;
};
_______________________________________________
Cython-dev mailing list
[email protected]
http://codespeak.net/mailman/listinfo/cython-dev

Reply via email to