From acfd7c82abdc26b7cd2859e762f12cc066a4ef68 Mon Sep 17 00:00:00 2001 From: Tamito Kajiyama Date: Fri, 3 Apr 2009 20:03:09 +0000 Subject: Relaxed type checking concerning boolean arguments in class constructors and __call__ methods so that not only True and False but also various other boolean expressions (e.g., 0, 1, and None) are accepted. --- .../blender/freestyle/intern/python/Interface1D/Curve/BPy_Chain.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'source/blender/freestyle/intern/python/Interface1D/Curve') diff --git a/source/blender/freestyle/intern/python/Interface1D/Curve/BPy_Chain.cpp b/source/blender/freestyle/intern/python/Interface1D/Curve/BPy_Chain.cpp index f30b2bbdd96..5714f415d80 100644 --- a/source/blender/freestyle/intern/python/Interface1D/Curve/BPy_Chain.cpp +++ b/source/blender/freestyle/intern/python/Interface1D/Curve/BPy_Chain.cpp @@ -145,7 +145,7 @@ int Chain___init__(BPy_Chain *self, PyObject *args, PyObject *kwds) PyObject * Chain_push_viewedge_back( BPy_Chain *self, PyObject *args ) { PyObject *obj1 = 0, *obj2 = 0; - if(!( PyArg_ParseTuple(args, "O!O!", &ViewEdge_Type, &obj1, &PyBool_Type, &obj2) )) + if(!( PyArg_ParseTuple(args, "O!O", &ViewEdge_Type, &obj1, &obj2) )) return NULL; ViewEdge *ve = ((BPy_ViewEdge *) obj1)->ve; @@ -158,7 +158,7 @@ PyObject * Chain_push_viewedge_back( BPy_Chain *self, PyObject *args ) { PyObject * Chain_push_viewedge_front( BPy_Chain *self, PyObject *args ) { PyObject *obj1 = 0, *obj2 = 0; - if(!( PyArg_ParseTuple(args, "O!O!", &ViewEdge_Type, &obj1, &PyBool_Type, &obj2) )) + if(!( PyArg_ParseTuple(args, "O!O", &ViewEdge_Type, &obj1, &obj2) )) return NULL; ViewEdge *ve = ((BPy_ViewEdge *) obj1)->ve; -- cgit v1.2.3