summaryrefslogtreecommitdiff
blob: fe90774e5c7b7cfb92cd5ab89ecd29ea863e8c61 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
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;
 }