return operators as a PyCFunction rather then having our own callable operator type

This commit is contained in:
2009-03-14 13:43:30 +00:00
parent b907b9fd9b
commit d297058910
4 changed files with 60 additions and 312 deletions

View File

@@ -1081,11 +1081,10 @@ PyObject *pyrna_struct_CreatePyObject( PointerRNA *ptr )
{
BPy_StructRNA *pyrna;
if (ptr->data==NULL && ptr->type==NULL) {
if (ptr->data==NULL && ptr->type==NULL) { /* Operator RNA has NULL data */
Py_RETURN_NONE;
}
pyrna = ( BPy_StructRNA * ) PyObject_NEW( BPy_StructRNA, &pyrna_struct_Type );
if (ptr->type && BPy_RNA_PYTYPE(ptr->type)) {
PyTypeObject *tp = BPy_RNA_PYTYPE(ptr->type);
pyrna = (BPy_StructRNA *) tp->tp_alloc(tp, 0);