Ok, after commenting out all the various size_t declarations (in *5* 
places) I am stuck with this:

python2.5 `which cython` --embed-positions --incref-local-binop 
-I/scratch/mabshoff/cython-0.11-nanny/sage-3.3.rc2-sage.math-only-x86_64-Linux/devel/sage-main
 
-o sage/matrix/matrix_integer_dense.c sage/matrix/matrix_integer_dense.pyx

Error converting Pyrex file to C:
------------------------------------------------------------
...
                 raise MemoryError, "out of memory allocating 
multi-modular coefficent list"
             for j from 0 <= j < self._ncols:
                 matrix[i][j] = mpz_fdiv_ui(self._matrix[i][j], n)

         cdef Linbox_modn_dense L = Linbox_modn_dense()
         L.set(n, matrix, self._nrows, self._ncols)
                       ^
------------------------------------------------------------

/scratch/mabshoff/cython-0.11-nanny/sage-3.3.rc2-sage.math-only-x86_64-Linux/devel/sage-main/sage/matrix/matrix_integer_dense.pyx:1161:23:
 
Cannot assign type 'sage.matrix.matrix_integer_dense.mod_int **' to 
'sage.libs.linbox.linbox.mod_int **'


But I guess at this point this should move off the Cython list :)

Cheers,

Michael

PS: my patch so far, but I might have done something very stupid to 
cause the above issue :)


diff -r 43f267532b7a sage/combinat/matrices/dancing_links.pyx
--- a/sage/combinat/matrices/dancing_links.pyx  Tue Feb 17 17:00:05 2009 
-0800
+++ b/sage/combinat/matrices/dancing_links.pyx  Fri Feb 20 02:09:18 2009 
-0800
@@ -25,8 +25,8 @@
  include "../../ext/python_int.pxi"
  include "../../ext/python_ref.pxi"

-cdef extern from "stdlib.h":
-     ctypedef unsigned long size_t
+#cdef extern from "stdlib.h":
+#     ctypedef unsigned long size_t

  cdef extern from "dancing_links_c.h":
      ctypedef struct vector_int "std::vector<int>":
diff -r 43f267532b7a sage/ext/cdefs.pxi
--- a/sage/ext/cdefs.pxi        Tue Feb 17 17:00:05 2009 -0800
+++ b/sage/ext/cdefs.pxi        Fri Feb 20 02:09:18 2009 -0800
@@ -2,7 +2,7 @@
  include "python.pxi"

  cdef extern from "stdlib.h":
-    ctypedef unsigned long size_t
+    #ctypedef unsigned long size_t
      void free(void *ptr)
      void *malloc(size_t size)
      void *realloc(void *ptr, size_t size)
diff -r 43f267532b7a sage/ext/python_mem.pxi
--- a/sage/ext/python_mem.pxi   Tue Feb 17 17:00:05 2009 -0800
+++ b/sage/ext/python_mem.pxi   Fri Feb 20 02:09:18 2009 -0800
@@ -1,5 +1,5 @@
  cdef extern from "Python.h":
-    ctypedef unsigned long size_t
+    #ctypedef unsigned long size_t

      #####################################################################
      # 9.2 Memory Interface
diff -r 43f267532b7a sage/ext/stdsage.pxi
--- a/sage/ext/stdsage.pxi      Tue Feb 17 17:00:05 2009 -0800
+++ b/sage/ext/stdsage.pxi      Fri Feb 20 02:09:18 2009 -0800
@@ -39,8 +39,8 @@


  # Memory management
-cdef extern from "stdlib.h":
-    ctypedef unsigned long size_t
+#cdef extern from "stdlib.h":
+#    ctypedef unsigned long size_t

  cdef extern from "stdsage.h":
      void  sage_free(void *p)
diff -r 43f267532b7a sage/libs/gmp/types.pxd
--- a/sage/libs/gmp/types.pxd   Tue Feb 17 17:00:05 2009 -0800
+++ b/sage/libs/gmp/types.pxd   Fri Feb 20 02:09:18 2009 -0800
@@ -3,7 +3,7 @@
      ### Type Declarations ###

      # Underlying typedefs
-    ctypedef unsigned long size_t
+    #ctypedef unsigned long size_t
      ctypedef unsigned long mp_limb_t
      ctypedef long mp_size_t
      ctypedef long mp_exp_t
diff -r 43f267532b7a sage/libs/pari/decl.pxi
--- a/sage/libs/pari/decl.pxi   Tue Feb 17 17:00:05 2009 -0800
+++ b/sage/libs/pari/decl.pxi   Fri Feb 20 02:09:18 2009 -0800
@@ -1,7 +1,7 @@
  include '../../ext/cdefs.pxi'

  cdef extern from "stdlib.h":
-    ctypedef unsigned long size_t
+    #ctypedef unsigned long size_t
      void free(void *ptr)
      void *malloc(size_t size)
      void *realloc(void *ptr, size_t size)

_______________________________________________
Cython-dev mailing list
[email protected]
http://codespeak.net/mailman/listinfo/cython-dev

Reply via email to