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/sceneRender.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/sceneRender.c')
-rw-r--r-- | source/blender/python/api2_2x/sceneRender.c | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/source/blender/python/api2_2x/sceneRender.c b/source/blender/python/api2_2x/sceneRender.c index 7b8993fe98d..ba39e5e0f73 100644 --- a/source/blender/python/api2_2x/sceneRender.c +++ b/source/blender/python/api2_2x/sceneRender.c @@ -694,7 +694,7 @@ static int RenderData_setOSALevel( BPy_RenderData * self, { int level; - if( !PyInt_CheckExact( value ) ) + if( !PyInt_Check( value ) ) return EXPP_ReturnIntError( PyExc_TypeError, "expected int argument" ); @@ -925,7 +925,7 @@ static int RenderData_setRenderer( BPy_RenderData * self, PyObject * value ) { int type; - if( !PyInt_CheckExact( value ) ) + if( !PyInt_Check( value ) ) return EXPP_ReturnIntError( PyExc_TypeError, "expected constant INTERNAL or YAFRAY" ); @@ -956,7 +956,7 @@ static int RenderData_setImageType( BPy_RenderData *self, PyObject *value ) { int type; - if( !PyInt_CheckExact( value ) ) + if( !PyInt_Check( value ) ) return EXPP_ReturnIntError( PyExc_TypeError, "expected int constant" ); @@ -1951,7 +1951,7 @@ static int RenderData_setMode( BPy_RenderData* self, PyObject *arg ) { int value; - if( !PyInt_CheckExact( arg ) ) + if( !PyInt_Check( arg ) ) return EXPP_ReturnIntError( PyExc_TypeError, "expected int argument" ); @@ -1987,7 +1987,7 @@ static int RenderData_setSceMode( BPy_RenderData* self, PyObject *arg ) { int value; - if( !PyInt_CheckExact( arg ) ) + if( !PyInt_Check( arg ) ) return EXPP_ReturnIntError( PyExc_TypeError, "expected int argument" ); @@ -2102,7 +2102,7 @@ static int RenderData_setImagePlanes( BPy_RenderData *self, PyObject *value ) int depth; char *errstr = "expected int argument of 8, 24, or 32"; - if( !PyInt_CheckExact( value ) ) + if( !PyInt_Check( value ) ) return EXPP_ReturnIntError( PyExc_TypeError, errstr ); depth = PyInt_AsLong( value ); @@ -2227,7 +2227,7 @@ static int RenderData_setRenderWinSize( BPy_RenderData *self, PyObject *value ) int size; char *errstr = "expected int argument of 25, 50, 75, or 100"; - if( !PyInt_CheckExact( value ) ) + if( !PyInt_Check( value ) ) return EXPP_ReturnIntError( PyExc_TypeError, errstr ); size = PyInt_AsLong( value ); @@ -2319,7 +2319,7 @@ static int RenderData_setThreads( BPy_RenderData *self, PyObject *value ) { int threads; - if( !PyInt_CheckExact( value ) ) + if( !PyInt_Check( value ) ) return EXPP_ReturnIntError( PyExc_TypeError, "Error, threads must be an int" ); threads = PyInt_AsLong( value ); |