From 6ba34d18b55bedbddb750e5231a2aec9a1fbbac0 Mon Sep 17 00:00:00 2001 From: Tamito Kajiyama Date: Sat, 14 Mar 2009 13:27:41 +0000 Subject: Fixed incorrect argument checking. --- .../intern/python/UnaryFunction1D/BPy_UnaryFunction1DEdgeNature.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'source/blender/freestyle/intern/python/UnaryFunction1D/BPy_UnaryFunction1DEdgeNature.cpp') diff --git a/source/blender/freestyle/intern/python/UnaryFunction1D/BPy_UnaryFunction1DEdgeNature.cpp b/source/blender/freestyle/intern/python/UnaryFunction1D/BPy_UnaryFunction1DEdgeNature.cpp index 78d63020062..15589ab3e75 100644 --- a/source/blender/freestyle/intern/python/UnaryFunction1D/BPy_UnaryFunction1DEdgeNature.cpp +++ b/source/blender/freestyle/intern/python/UnaryFunction1D/BPy_UnaryFunction1DEdgeNature.cpp @@ -141,7 +141,7 @@ int UnaryFunction1DEdgeNature___init__(BPy_UnaryFunction1DEdgeNature* self, PyOb { PyObject *obj; - if( !PyArg_ParseTuple(args, "|O", &obj) && BPy_IntegrationType_Check(obj) ) { + if( !PyArg_ParseTuple(args, "|O!", &IntegrationType_Type, &obj) ) { cout << "ERROR: UnaryFunction1DEdgeNature___init__ " << endl; return -1; } @@ -177,7 +177,7 @@ PyObject * UnaryFunction1DEdgeNature___call__( BPy_UnaryFunction1DEdgeNature *se { PyObject *obj; - if( !PyArg_ParseTuple(args, "O", &obj) && BPy_Interface1D_Check(obj) ) { + if( !PyArg_ParseTuple(args, "O!", &Interface1D_Type, &obj) ) { cout << "ERROR: UnaryFunction1DEdgeNature___call__ " << endl; return NULL; } @@ -191,7 +191,7 @@ PyObject * UnaryFunction1DEdgeNature_setIntegrationType(BPy_UnaryFunction1DEdgeN { PyObject *obj; - if( !PyArg_ParseTuple(args, "O", &obj) && BPy_IntegrationType_Check(obj) ) { + if( !PyArg_ParseTuple(args, "O!", &IntegrationType_Type, &obj) ) { cout << "ERROR: UnaryFunction1DEdgeNature_setIntegrationType " << endl; Py_RETURN_NONE; } -- cgit v1.2.3