recast and detour patch now builds again with GCC

- rearrange structs to work for 64bit
- define all vars before goto's
- ifdefs for qsort_r/qsort_s
- dont cast pointers to int only for NULL checks
- dont printf STR_String directly, get the char pointer from it

also minor change to gpu py module, no need to pass empty tuple to PyObject_CallObject, can just be NULL
This commit is contained in:
2011-09-10 03:07:26 +00:00
parent 23b843130b
commit 0128218254
8 changed files with 61 additions and 46 deletions

View File

@@ -147,7 +147,6 @@ static PyObject* GPU_export_shader(PyObject* UNUSED(self), PyObject *args, PyObj
PyObject* pymat;
PyObject* as_pointer;
PyObject* pointer;
PyObject* noargs;
PyObject* result;
PyObject* dict;
PyObject* val;
@@ -170,9 +169,7 @@ static PyObject* GPU_export_shader(PyObject* UNUSED(self), PyObject *args, PyObj
(as_pointer = PyObject_GetAttrString(pyscene, "as_pointer")) != NULL &&
PyCallable_Check(as_pointer)) {
// must be a scene object
noargs = PyTuple_New(0);
pointer = PyObject_CallObject(as_pointer, noargs);
Py_DECREF(noargs);
pointer = PyObject_CallObject(as_pointer, NULL);
if (!pointer) {
PyErr_SetString(PyExc_SystemError, "scene.as_pointer() failed");
return NULL;
@@ -192,9 +189,7 @@ static PyObject* GPU_export_shader(PyObject* UNUSED(self), PyObject *args, PyObj
(as_pointer = PyObject_GetAttrString(pymat, "as_pointer")) != NULL &&
PyCallable_Check(as_pointer)) {
// must be a material object
noargs = PyTuple_New(0);
pointer = PyObject_CallObject(as_pointer, noargs);
Py_DECREF(noargs);
pointer = PyObject_CallObject(as_pointer, NULL);
if (!pointer) {
PyErr_SetString(PyExc_SystemError, "scene.as_pointer() failed");
return NULL;