[gecode] make the extension compatible with libgecode6
authorAdrien Di Mascio <Adrien.DiMascio@logilab.fr>
Fri, 18 May 2018 19:31:20 +0200
changeset 817 5eab175af278
parent 816 fbe93b245bca
child 818 7f89d2d976e7
[gecode] make the extension compatible with libgecode6 cf. http://www.gecode.org/doc-latest/reference/PageHowToChange__6.html
rql/gecode_solver.cpp
--- a/rql/gecode_solver.cpp	Fri May 18 19:26:19 2018 +0200
+++ b/rql/gecode_solver.cpp	Fri May 18 19:31:20 2018 +0200
@@ -169,13 +169,21 @@
     }
 
     ~RqlSolver(){};
-
+#if GE_VERSION < PM_VERSION(6,0,0)
     RqlSolver(bool share, RqlSolver &s) : Space(share, s) {
         /* this is necessary for the solver to fork space
     while branching
     */
         variables.update(SELF, share, s.variables);
     }
+#else
+    RqlSolver(RqlSolver &s) : Space(s) {
+        /* this is necessary for the solver to fork space
+    while branching
+    */
+        variables.update(SELF, s.variables);
+    }
+#endif
 
     void set_domains(PyObject *domains) {
         PyObject *ovalues;
@@ -430,9 +438,12 @@
         }
         PyList_Append(pb.sols, tuple);
     }
-
     /* another function need by gecode kernel */
+#if GE_VERSION < PM_VERSION(6,0,0)
     virtual Space *copy(bool share) { return new RqlSolver(share, *this); }
+#else
+    virtual Space *copy() { return new RqlSolver(*this); }
+#endif
 };
 
 class FailTimeStop : public Search::Stop {