Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCampbell Barton <ideasman42@gmail.com>2009-03-21 19:03:26 +0300
committerCampbell Barton <ideasman42@gmail.com>2009-03-21 19:03:26 +0300
commit935f10dc45e482061f1af230d3f9a9f878000379 (patch)
treebd0de96c2cce465391c76a7d62050a903e09612f /source/blender/python/intern/bpy_operator.c
parent6ab2d7ad659606cbf2a315ef9a576c364e6ec9bb (diff)
get rid of warnings, fix for a refcount error
Diffstat (limited to 'source/blender/python/intern/bpy_operator.c')
-rw-r--r--source/blender/python/intern/bpy_operator.c8
1 files changed, 3 insertions, 5 deletions
diff --git a/source/blender/python/intern/bpy_operator.c b/source/blender/python/intern/bpy_operator.c
index b40d4640bcb..02f4723c037 100644
--- a/source/blender/python/intern/bpy_operator.c
+++ b/source/blender/python/intern/bpy_operator.c
@@ -192,7 +192,7 @@ static PyObject *pyop_base_call( PyObject * self, PyObject * args, PyObject * k
}
static PyMethodDef pyop_base_call_meth[] = {
- {"__op_call__", pyop_base_call, METH_VARARGS|METH_KEYWORDS, "generic operator calling function"}
+ {"__op_call__", (PyCFunction)pyop_base_call, METH_VARARGS|METH_KEYWORDS, "generic operator calling function"}
};
@@ -252,10 +252,10 @@ static PyObject *pyop_base_rna(PyObject *self, PyObject *pyname)
pyrna= (BPy_StructRNA *)pyrna_struct_CreatePyObject(&ptr); /* were not really using &ptr, overwite next */
//pyrna->freeptr= 1;
- return pyrna;
+ return (PyObject *)pyrna;
}
else {
- PyErr_SetString(PyExc_AttributeError, "Operator not found");
+ PyErr_Format(PyExc_AttributeError, "Operator \"%s\" not found", name);
return NULL;
}
}
@@ -277,5 +277,3 @@ PyObject *BPY_operator_module( bContext *C )
return (PyObject *)PyObject_NEW( BPy_OperatorBase, &pyop_base_Type );
}
-
-