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/BPy_Convert.cpp | |
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/BPy_Convert.cpp')
-rw-r--r-- | source/blender/freestyle/intern/python/BPy_Convert.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/source/blender/freestyle/intern/python/BPy_Convert.cpp b/source/blender/freestyle/intern/python/BPy_Convert.cpp index 8b26afd85a5..a3777d6415c 100644 --- a/source/blender/freestyle/intern/python/BPy_Convert.cpp +++ b/source/blender/freestyle/intern/python/BPy_Convert.cpp @@ -326,7 +326,7 @@ PyObject * BPy_ChainSilhouetteIterator_from_ChainSilhouetteIterator( ChainSilhou //============================== bool bool_from_PyBool( PyObject *b ) { - return (b == Py_True || PyInt_AsLong(b) != 0); + return PyObject_IsTrue(b) != 0; } IntegrationType IntegrationType_from_BPy_IntegrationType( PyObject* obj ) { |