- Previous segmentation fault was due to a faulty call (wrong parameters
to ScriptAdapter.__wrap_sort_queue()). Now prints an error and check for retval before Py_DECREF'ing it. - Fix(?) qsort implementation in Policy - SWIG doesn't understand "uint". Change into more verbose (but surely standard) unsigned int git-svn-id: svn://svn.gna.org/svn/sgpemv2/trunk@394 3ecf2c5c-341e-0410-92b4-d18e462d057c
This commit is contained in:
parent
075e12d14d
commit
a2a492b5d5
5 changed files with 28 additions and 26 deletions
|
@ -19,6 +19,7 @@
|
|||
// Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
|
||||
#include "python_policy.hh"
|
||||
#include <iostream>
|
||||
#include <unistd.h>
|
||||
using namespace sgpem;
|
||||
using namespace std;
|
||||
|
@ -103,8 +104,8 @@ PythonPolicy::sort_queue(Scheduler::event event) const
|
|||
PyObject* pEvent = PyInt_FromLong(event);
|
||||
PyObject* pMethodName = PyString_FromString("async_sort_queue");
|
||||
PyObject* retval = PyObject_CallMethodObjArgs(_adapter, pMethodName, pEvent, NULL);
|
||||
// Why we haven't to decref this?
|
||||
// Py_DECREF(retval);
|
||||
if(!retval) PyErr_Print();
|
||||
else Py_DECREF(retval);
|
||||
Py_DECREF(pMethodName);
|
||||
Py_DECREF(pEvent);
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue