fix for mistake in last commit. also forgot to call RNA_parameter_list_end() in some places, (ok the function does nothing now, but some day it might do)

This commit is contained in:
Campbell Barton 2010-01-02 19:01:19 +00:00
parent cef8b2088f
commit cf7b19c0ba
2 changed files with 8 additions and 2 deletions

View File

@ -2715,6 +2715,7 @@ static PyObject * pyrna_func_call(PyObject *self, PyObject *args, PyObject *kw)
ret_len= 0;
if(args_len + (kw ? PyDict_Size(kw):0) > parms_len) {
RNA_parameter_list_end(&iter);
PyErr_Format(PyExc_TypeError, "%.200s.%.200s(): takes at most %d arguments, got %d", RNA_struct_identifier(self_ptr->type), RNA_function_identifier(self_func), parms_len, args_len);
err= -1;
}
@ -2780,6 +2781,8 @@ static PyObject * pyrna_func_call(PyObject *self, PyObject *args, PyObject *kw)
break;
}
}
RNA_parameter_list_end(&iter);
/* Check if we gave args that dont exist in the function
@ -4194,6 +4197,7 @@ static int bpy_class_call(PointerRNA *ptr, FunctionRNA *func, ParameterList *par
ret = PyObject_Call(item, args, NULL);
RNA_parameter_list_end(&iter);
Py_DECREF(item);
Py_DECREF(args);
}
@ -4242,6 +4246,8 @@ static int bpy_class_call(PointerRNA *ptr, FunctionRNA *func, ParameterList *par
break;
}
}
RNA_parameter_list_end(&iter);
}
}
Py_DECREF(ret);

View File

@ -115,8 +115,8 @@ def rna2sphinx(BASEPATH):
#if not struct.identifier.startswith("Sc") and not struct.identifier.startswith("I"):
# return
if not struct.identifier == "Object":
return
#if not struct.identifier == "Object":
# return
filepath = os.path.join(BASEPATH, "bpy.types.%s.rst" % struct.identifier)
file = open(filepath, "w")