Blob Blame History Raw
--- ppl/bit_arrays.pxd.orig	2019-07-18 14:06:09.000000000 -0600
+++ ppl/bit_arrays.pxd	2021-01-18 11:05:03.233468796 -0700
@@ -1,4 +1,4 @@
-from ppl_decl cimport *
+from .ppl_decl cimport *
 
 cdef class Bit_Row(object):
     cdef PPL_Bit_Row *thisptr
--- ppl/constraint.pxd.orig	2017-04-28 13:38:54.000000000 -0600
+++ ppl/constraint.pxd	2021-01-18 11:09:40.442054814 -0700
@@ -2,7 +2,7 @@ from .linear_algebra cimport *
 
 cdef _wrap_Constraint(PPL_Constraint constraint)
 
-cdef _wrap_Constraint_System(PPL_Constraint_System constraint_system)
+cdef _wrap_Constraint_System(const PPL_Constraint_System *constraint_system)
 
 cdef _make_Constraint_from_richcmp(lhs_, rhs_, op)
 
--- ppl/constraint.pyx.orig	2021-01-18 04:30:18.000000000 -0700
+++ ppl/constraint.pyx	2021-01-18 11:09:31.682067898 -0700
@@ -1298,12 +1298,12 @@ cdef _wrap_Constraint(PPL_Constraint con
     c.thisptr = new PPL_Constraint(constraint)
     return c
 
-cdef _wrap_Constraint_System(PPL_Constraint_System constraint_system):
+cdef _wrap_Constraint_System(const PPL_Constraint_System *constraint_system):
     """
     Wrap a C++ ``PPL_Constraint_System`` into a Cython ``Constraint_System``.
     """
     cdef Constraint_System cs = Constraint_System.__new__(Constraint_System)
-    cs.thisptr = new PPL_Constraint_System(constraint_system)
+    cs.thisptr = new PPL_Constraint_System(deref(constraint_system))
     return cs
 
 cdef _wrap_Poly_Con_Relation(PPL_Poly_Con_Relation relation):
--- ppl/generator.pxd.orig	2020-02-14 15:24:40.000000000 -0700
+++ ppl/generator.pxd	2021-01-18 11:11:54.673852927 -0700
@@ -5,7 +5,7 @@ from .linear_algebra cimport *
 
 cdef _wrap_Generator(PPL_Generator generator)
 
-cdef _wrap_Generator_System(PPL_Generator_System generator_system)
+cdef _wrap_Generator_System(const PPL_Generator_System *generator_system)
 
 cdef PPL_GeneratorType_str(PPL_GeneratorType t)
 
--- ppl/generator.pyx.orig	2019-07-18 14:17:02.000000000 -0600
+++ ppl/generator.pyx	2021-01-18 11:12:05.721836058 -0700
@@ -1086,13 +1086,13 @@ cdef _wrap_Generator(PPL_Generator gener
     return g
 
 
-cdef _wrap_Generator_System(PPL_Generator_System generator_system):
+cdef _wrap_Generator_System(const PPL_Generator_System *generator_system):
     """
     Wrap a C++ ``PPL_Generator_System`` into a Cython ``Generator_System``.
     """
     cdef Generator_System gs = Generator_System()
     del gs.thisptr
-    gs.thisptr = new PPL_Generator_System(generator_system)
+    gs.thisptr = new PPL_Generator_System(deref(generator_system))
     return gs
 
 cdef class Poly_Gen_Relation(object):
--- ppl/polyhedron.pyx.orig	2021-01-18 04:50:23.000000000 -0700
+++ ppl/polyhedron.pyx	2021-01-18 11:11:09.761921393 -0700
@@ -247,7 +247,7 @@ cdef class Polyhedron(object):
         Constraint_System {x1>=0, x0>=0}
         """
         sig_on()
-        cdef PPL_Constraint_System cs = self.thisptr.constraints()
+        cdef const PPL_Constraint_System *cs = &self.thisptr.constraints()
         sig_off()
         return _wrap_Constraint_System(cs)
 
@@ -275,7 +275,7 @@ cdef class Polyhedron(object):
         Constraint_System {x1>=0, x0>=0}
         """
         sig_on()
-        cdef PPL_Constraint_System cs = self.thisptr.minimized_constraints()
+        cdef const PPL_Constraint_System *cs = &self.thisptr.minimized_constraints()
         sig_off()
         return _wrap_Constraint_System(cs)
 
@@ -304,7 +304,7 @@ cdef class Polyhedron(object):
         Generator_System {point(-1/1, -1/1, 0/1), point(1/1, 1/1, 0/1)}
         """
         sig_on()
-        cdef PPL_Generator_System gs = self.thisptr.generators()
+        cdef const PPL_Generator_System *gs = &self.thisptr.generators()
         sig_off()
         return _wrap_Generator_System(gs)
 
@@ -333,7 +333,7 @@ cdef class Polyhedron(object):
         Generator_System {point(-1/1, -1/1, 0/1), point(1/1, 1/1, 0/1)}
         """
         sig_on()
-        cdef PPL_Generator_System gs = self.thisptr.minimized_generators()
+        cdef const PPL_Generator_System *gs = &self.thisptr.minimized_generators()
         sig_off()
         return _wrap_Generator_System(gs)
 
@@ -345,7 +345,7 @@ cdef class Polyhedron(object):
         try:
             sig_on()
             try:
-                rel.thisptr = new_relation_with(self.thisptr[0], g.thisptr[0])
+                rel.thisptr = new_relation_with((<const PPL_Polyhedron *>self.thisptr)[0], (<const PPL_Generator *>g.thisptr)[0])
             finally:
                 sig_off()
         except BaseException:
@@ -362,7 +362,7 @@ cdef class Polyhedron(object):
         try:
             sig_on()
             try:
-                rel.thisptr = new_relation_with(self.thisptr[0], c.thisptr[0])
+                rel.thisptr = new_relation_with((<const PPL_Polyhedron *>self.thisptr)[0], (<const PPL_Constraint *>c.thisptr)[0])
             finally:
                 sig_off()
         except BaseException:
@@ -2228,7 +2228,8 @@ cdef class Polyhedron(object):
         >>> p0 == p1
         True
         """
-        self.thisptr.affine_image(v.thisptr[0], le.thisptr[0])
+        self.thisptr.affine_image(<const PPL_Variable>v.thisptr[0],
+                                  <const PPL_Linear_Expression>le.thisptr[0])
 
     def affine_preimage(self, Variable v, Linear_Expression le):
         r"""
@@ -2264,7 +2265,8 @@ cdef class Polyhedron(object):
         >>> p0 == p1
         True
         """
-        self.thisptr.affine_preimage(v.thisptr[0], le.thisptr[0])
+        self.thisptr.affine_preimage(<const PPL_Variable>v.thisptr[0],
+                                     <const PPL_Linear_Expression>le.thisptr[0])
 
     def ascii_dump(self):
         r"""
@@ -2521,7 +2523,7 @@ cdef class C_Polyhedron(Polyhedron):
         """
         if isinstance(arg, C_Polyhedron):
             ph = <C_Polyhedron>arg
-            self.thisptr = new PPL_C_Polyhedron(<PPL_C_Polyhedron&>ph.thisptr[0])
+            self.thisptr = <PPL_Polyhedron *>new PPL_C_Polyhedron(<PPL_C_Polyhedron&>ph.thisptr[0])
             return
         if isinstance(arg, Generator):
             arg = Generator_System(arg)
@@ -2529,11 +2531,11 @@ cdef class C_Polyhedron(Polyhedron):
             arg = Constraint_System(arg)
         if isinstance(arg, Generator_System):
             gs = <Generator_System>arg
-            self.thisptr = new PPL_C_Polyhedron(gs.thisptr[0])
+            self.thisptr = <PPL_Polyhedron *>new PPL_C_Polyhedron(gs.thisptr[0])
             return
         if isinstance(arg, Constraint_System):
             cs = <Constraint_System>arg
-            self.thisptr = new PPL_C_Polyhedron(cs.thisptr[0])
+            self.thisptr = <PPL_Polyhedron *>new PPL_C_Polyhedron(cs.thisptr[0])
             return
         try:
             dim = int(arg)
@@ -2542,10 +2544,10 @@ cdef class C_Polyhedron(Polyhedron):
             raise ValueError('Cannot initialize C_Polyhedron with '+str(arg)+'.')
         degenerate_element = degenerate_element.lower()
         if degenerate_element=='universe':
-            self.thisptr = new PPL_C_Polyhedron(<PPL_dimension_type>dim, UNIVERSE)
+            self.thisptr = <PPL_Polyhedron *>new PPL_C_Polyhedron(<PPL_dimension_type>dim, UNIVERSE)
             return
         elif degenerate_element=='empty':
-            self.thisptr = new PPL_C_Polyhedron(<PPL_dimension_type>dim, EMPTY)
+            self.thisptr = <PPL_Polyhedron *>new PPL_C_Polyhedron(<PPL_dimension_type>dim, EMPTY)
             return
         else:
             raise ValueError('Unknown value: degenerate_element='+str(degenerate_element)+'.')
@@ -2692,11 +2694,11 @@ cdef class NNC_Polyhedron(Polyhedron):
         """
         if isinstance(arg, NNC_Polyhedron):
             p_nnc = <NNC_Polyhedron>arg
-            self.thisptr = new PPL_NNC_Polyhedron(<PPL_NNC_Polyhedron&>p_nnc.thisptr[0])
+            self.thisptr = <PPL_Polyhedron *>new PPL_NNC_Polyhedron(<PPL_NNC_Polyhedron&>p_nnc.thisptr[0])
             return
         if isinstance(arg, C_Polyhedron):
             p_c = <C_Polyhedron>arg
-            self.thisptr = new PPL_NNC_Polyhedron(<PPL_C_Polyhedron&>p_c.thisptr[0])
+            self.thisptr = <PPL_Polyhedron *>new PPL_NNC_Polyhedron(<PPL_C_Polyhedron&>p_c.thisptr[0])
             return
         if isinstance(arg, Generator):
             arg = Generator_System(arg)
@@ -2704,11 +2706,11 @@ cdef class NNC_Polyhedron(Polyhedron):
             arg = Constraint_System(arg)
         if isinstance(arg, Generator_System):
             gs = <Generator_System>arg
-            self.thisptr = new PPL_NNC_Polyhedron(gs.thisptr[0])
+            self.thisptr = <PPL_Polyhedron *>new PPL_NNC_Polyhedron(gs.thisptr[0])
             return
         if isinstance(arg, Constraint_System):
             cs = <Constraint_System>arg
-            self.thisptr = new PPL_NNC_Polyhedron(cs.thisptr[0])
+            self.thisptr = <PPL_Polyhedron *>new PPL_NNC_Polyhedron(cs.thisptr[0])
             return
         try:
             dim = int(arg)
@@ -2717,10 +2719,10 @@ cdef class NNC_Polyhedron(Polyhedron):
             raise ValueError('Cannot initialize NNC_Polyhedron with '+str(arg)+'.')
         degenerate_element = degenerate_element.lower()
         if degenerate_element=='universe':
-            self.thisptr = new PPL_NNC_Polyhedron(<PPL_dimension_type>dim, UNIVERSE)
+            self.thisptr = <PPL_Polyhedron *>new PPL_NNC_Polyhedron(<PPL_dimension_type>dim, UNIVERSE)
             return
         elif degenerate_element=='empty':
-            self.thisptr = new PPL_NNC_Polyhedron(<PPL_dimension_type>dim, EMPTY)
+            self.thisptr = <PPL_Polyhedron *>new PPL_NNC_Polyhedron(<PPL_dimension_type>dim, EMPTY)
             return
         else:
             raise ValueError('Unknown value: degenerate_element='+str(degenerate_element)+'.')
--- setup.py.orig	2021-01-18 10:49:45.148612322 -0700
+++ setup.py	2021-01-18 10:50:43.354540675 -0700
@@ -38,7 +38,7 @@ class build_ext(_build_ext):
         self.distribution.ext_modules[:] = cythonize(
             self.distribution.ext_modules,
             include_path=sys.path,
-            compiler_directives={'embedsignature': True})
+            compiler_directives={'embedsignature': True, 'language_level': 3})
 
         _build_ext.finalize_options(self)