From 935f10dc45e482061f1af230d3f9a9f878000379 Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Sat, 21 Mar 2009 16:03:26 +0000 Subject: get rid of warnings, fix for a refcount error --- source/blender/python/intern/bpy_operator.c | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) (limited to 'source/blender/python/intern/bpy_operator.c') 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 ); } - - -- cgit v1.2.3