diff options
author | Campbell Barton <ideasman42@gmail.com> | 2007-07-01 09:41:23 +0400 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2007-07-01 09:41:23 +0400 |
commit | 39e4dc6202f242fb0676552903d5fe0960eae154 (patch) | |
tree | 525af303ad0a408aa919af021d3b64b2bde16bfc /source/blender/python/api2_2x/gen_utils.c | |
parent | 676043c31461c5a978de209a23b0f4e37d201403 (diff) |
replace PyInt_CheckExact with PyInt_Check, same for floats and strings so subclass and C/subtypes work.
was reported as a bug a while ago.
Diffstat (limited to 'source/blender/python/api2_2x/gen_utils.c')
-rw-r--r-- | source/blender/python/api2_2x/gen_utils.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/source/blender/python/api2_2x/gen_utils.c b/source/blender/python/api2_2x/gen_utils.c index 09f887fafb8..2df72136dbb 100644 --- a/source/blender/python/api2_2x/gen_utils.c +++ b/source/blender/python/api2_2x/gen_utils.c @@ -638,7 +638,7 @@ int EXPP_setIValueClamped( PyObject *value, void *param, { int number; - if( !PyInt_CheckExact ( value ) ) { + if( !PyInt_Check( value ) ) { char errstr[128]; sprintf ( errstr, "expected int argument in [%d,%d]", min, max ); return EXPP_ReturnIntError( PyExc_TypeError, errstr ); @@ -729,7 +729,7 @@ int EXPP_setIValueRange( PyObject *value, void *param, sprintf ( errstr, "expected int argument in [%d,%d]", min, max ); - if( !PyInt_CheckExact ( value ) ) + if( !PyInt_Check ( value ) ) return EXPP_ReturnIntError( PyExc_TypeError, errstr ); number = PyInt_AS_LONG( value ); |