You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
gentoo-overlay/dev-lang/gdl/files/0.9.6-fix-python-function-c...

31 lines
987 B

Author: Ole Streicher <olebole@debian.org>
Bug: https://sourceforge.net/p/gnudatalanguage/bugs/377
Bug: https://sourceforge.net/p/gnudatalanguage/bugs/679
Forwarded: https://sourceforge.net/p/gnudatalanguage/patches/91
https://sourceforge.net/p/gnudatalanguage/patches/92
Description: Fix Python calling GDL functions
* user defined functions crash
* data arrays of 64 bit element size are not completely converted to Python
--- a/src/pythongdl.cpp
+++ b/src/pythongdl.cpp
@@ -329,7 +329,7 @@
}
}
- sub = proList[ proIx];
+ sub = funList[ proIx];
}
}
else
--- a/src/topython.cpp
+++ b/src/topython.cpp
@@ -67,7 +67,7 @@
// TODO: free the memory: PyArray_Free(PyObject* op, void* ptr) ?
throw GDLException("Failed to convert array to python.");
}
- memcpy(PyArray_DATA(ret), DataAddr(), this->N_Elements() * sizeof(Sp::t));
+ memcpy(PyArray_DATA(ret), DataAddr(), this->N_Elements() * Data_<Sp>::Sizeof());
return ret;
}