Replace deprecated methods from old api:
PythonReturnErrorObject PythonIncRef Fix some compiler warnings about missing initializers in method tables.
This commit is contained in:
@@ -161,14 +161,14 @@ static PyObject *M_Lamp_Get(PyObject *self, PyObject *args)
|
||||
lamplist = PyList_New (BLI_countlist (&(G.main->lamp)));
|
||||
|
||||
if (lamplist == NULL)
|
||||
return (PythonReturnErrorObject (PyExc_MemoryError,
|
||||
return (EXPP_ReturnPyObjError (PyExc_MemoryError,
|
||||
"couldn't create PyList"));
|
||||
|
||||
while (lamp_iter) {
|
||||
pyobj = Lamp_CreatePyObject (lamp_iter);
|
||||
|
||||
if (!pyobj)
|
||||
return (PythonReturnErrorObject (PyExc_MemoryError,
|
||||
return (EXPP_ReturnPyObjError (PyExc_MemoryError,
|
||||
"couldn't create PyString"));
|
||||
|
||||
PyList_SET_ITEM (lamplist, index, pyobj);
|
||||
|
||||
Reference in New Issue
Block a user