Skip to content

Commit e27dd10

Browse files
committed
Fix includes for Cython 0.28
1 parent 76aa94f commit e27dd10

File tree

1 file changed

+8
-4
lines changed

1 file changed

+8
-4
lines changed

cypari2/types.pxd

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
# distutils: depends = pari/pari.h
21
"""
32
Declarations for types used by PARI
43
@@ -19,7 +18,7 @@ from PARI's include files.
1918
# http://www.gnu.org/licenses/
2019
#*****************************************************************************
2120

22-
cdef extern from "<pari/pari.h>":
21+
cdef extern from "pari/pari.h":
2322
ctypedef unsigned long ulong "pari_ulong"
2423

2524
ctypedef long* GEN
@@ -91,9 +90,14 @@ cdef extern from "<pari/pari.h>":
9190
struct hashentry
9291
struct hashtable
9392

94-
95-
cdef extern from "cypari.h":
93+
# These are actually defined in cypari.h but we put them here to
94+
# prevent Cython from reordering the includes.
9695
GEN set_gel(GEN x, long n, GEN z) # gel(x, n) = z
9796
GEN set_gmael(GEN x, long i, long j, GEN z) # gmael(x, i, j) = z
9897
GEN set_gcoeff(GEN x, long i, long j, GEN z) # gcoeff(x, i, j) = z
9998
GEN set_uel(GEN x, long n, ulong z) # uel(x, n) = z
99+
100+
101+
# It is important that this gets included *after* all PARI includes
102+
cdef extern from "cypari.h":
103+
pass

0 commit comments

Comments
 (0)