singular-3.1.3.2-python.patch 1.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546
  1. --- Singular/pyobject.cc.orig 2011-01-31 15:03:16.000000000 +0100
  2. +++ Singular/pyobject.cc 2011-08-24 17:22:57.000000000 +0200
  3. @@ -14,7 +14,7 @@
  4. -
  5. +#include <Python.h>
  6. #include <Singular/mod2.h>
  7. @@ -27,7 +27,7 @@
  8. #include <Singular/lists.h>
  9. -#include <Python.h>
  10. +
  11. #include <iterator> // std::distance
  12. #include <stdio.h>
  13. @@ -592,11 +592,12 @@
  14. long len = newElts.size();
  15. for (long idx = 0; idx < len; ++idx)
  16. {
  17. - char* name = newElts[idx][0].str();
  18. + PythonObject current (newElts[idx]);
  19. + char* name = current.operator[](0).str();
  20. if (name && (*name != '\0') && (*name != '_'))
  21. {
  22. Py_XDECREF(get_current_definition(name));
  23. - newElts[idx][1].import_as(name);
  24. + newElts[idx].operator[](1).import_as(name);
  25. }
  26. }
  27. --- Singular/pyobject_setup.cc.orig 2011-02-10 19:15:30.000000000 +0100
  28. +++ Singular/pyobject_setup.cc 2011-08-24 17:23:55.000000000 +0200
  29. @@ -12,6 +12,7 @@
  30. **/
  31. //*****************************************************************************
  32. +#include <Python.h>
  33. #include <Singular/mod2.h>
  34. #include <kernel/febase.h>
  35. #include "static.h"