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