diff options
author | Tamito Kajiyama <rd6t-kjym@asahi-net.or.jp> | 2009-04-04 00:03:09 +0400 |
---|---|---|
committer | Tamito Kajiyama <rd6t-kjym@asahi-net.or.jp> | 2009-04-04 00:03:09 +0400 |
commit | acfd7c82abdc26b7cd2859e762f12cc066a4ef68 (patch) | |
tree | 41c8ea9b40a662db1cc86bc167feec4ea563ea2b /source/blender/freestyle/intern/python/Interface1D | |
parent | 5926ad2db281aeb965d382533973393f0459315b (diff) |
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.
Diffstat (limited to 'source/blender/freestyle/intern/python/Interface1D')
3 files changed, 4 insertions, 4 deletions
diff --git a/source/blender/freestyle/intern/python/Interface1D/BPy_FEdge.cpp b/source/blender/freestyle/intern/python/Interface1D/BPy_FEdge.cpp index 1773e86c065..84529321f29 100644 --- a/source/blender/freestyle/intern/python/Interface1D/BPy_FEdge.cpp +++ b/source/blender/freestyle/intern/python/Interface1D/BPy_FEdge.cpp @@ -330,7 +330,7 @@ PyObject * FEdge_setViewEdge( BPy_FEdge *self, PyObject *args ) { PyObject *FEdge_setSmooth( BPy_FEdge *self , PyObject *args) { PyObject *py_b; - if(!( PyArg_ParseTuple(args, "O!", &PyBool_Type, &py_b) )) + if(!( PyArg_ParseTuple(args, "O", &py_b) )) return NULL; self->fe->setSmooth( bool_from_PyBool(py_b) ); diff --git a/source/blender/freestyle/intern/python/Interface1D/BPy_Stroke.cpp b/source/blender/freestyle/intern/python/Interface1D/BPy_Stroke.cpp index f7c5e261db5..6bca6db2cb7 100644 --- a/source/blender/freestyle/intern/python/Interface1D/BPy_Stroke.cpp +++ b/source/blender/freestyle/intern/python/Interface1D/BPy_Stroke.cpp @@ -354,7 +354,7 @@ PyObject *Stroke_setTextureId( BPy_Stroke *self , PyObject *args) { PyObject *Stroke_setTips( BPy_Stroke *self , PyObject *args) { PyObject *py_b; - if(!( PyArg_ParseTuple(args, "O!", &PyBool_Type, &py_b) )) + if(!( PyArg_ParseTuple(args, "O", &py_b) )) return NULL; self->s->setTips( bool_from_PyBool(py_b) ); 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; |