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 | |
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')
-rw-r--r-- | source/blender/python/api2_2x/BezTriple.c | 2 | ||||
-rw-r--r-- | source/blender/python/api2_2x/Camera.c | 2 | ||||
-rw-r--r-- | source/blender/python/api2_2x/Constraint.c | 2 | ||||
-rwxr-xr-x | source/blender/python/api2_2x/Group.c | 2 | ||||
-rw-r--r-- | source/blender/python/api2_2x/Ipo.c | 2 | ||||
-rw-r--r-- | source/blender/python/api2_2x/Ipocurve.c | 4 | ||||
-rw-r--r-- | source/blender/python/api2_2x/Lamp.c | 2 | ||||
-rw-r--r-- | source/blender/python/api2_2x/Material.c | 2 | ||||
-rw-r--r-- | source/blender/python/api2_2x/Mesh.c | 34 | ||||
-rw-r--r-- | source/blender/python/api2_2x/Metaball.c | 4 | ||||
-rw-r--r-- | source/blender/python/api2_2x/Modifier.c | 2 | ||||
-rw-r--r-- | source/blender/python/api2_2x/Object.c | 4 | ||||
-rw-r--r-- | source/blender/python/api2_2x/Scene.c | 2 | ||||
-rw-r--r-- | source/blender/python/api2_2x/Texture.c | 12 | ||||
-rw-r--r-- | source/blender/python/api2_2x/World.c | 6 | ||||
-rw-r--r-- | source/blender/python/api2_2x/gen_utils.c | 4 | ||||
-rw-r--r-- | source/blender/python/api2_2x/sceneRender.c | 16 | ||||
-rw-r--r-- | source/blender/python/api2_2x/sceneSequence.c | 2 |
18 files changed, 52 insertions, 52 deletions
diff --git a/source/blender/python/api2_2x/BezTriple.c b/source/blender/python/api2_2x/BezTriple.c index aabc33e6f95..200f8ceb34e 100644 --- a/source/blender/python/api2_2x/BezTriple.c +++ b/source/blender/python/api2_2x/BezTriple.c @@ -413,7 +413,7 @@ static int BezTriple_setHandles( BPy_BezTriple * self, PyObject *args ) ob1 = PySequence_ITEM( args, 0 ); ob2 = PySequence_ITEM( args, 1 ); - if( !PyInt_CheckExact( ob1 ) || !PyInt_CheckExact( ob2 ) ) { + if( !PyInt_Check( ob1 ) || !PyInt_Check( ob2 ) ) { Py_DECREF( ob1 ); Py_DECREF( ob2 ); return EXPP_ReturnIntError( PyExc_TypeError, diff --git a/source/blender/python/api2_2x/Camera.c b/source/blender/python/api2_2x/Camera.c index feb2c79ddae..503302ec4d7 100644 --- a/source/blender/python/api2_2x/Camera.c +++ b/source/blender/python/api2_2x/Camera.c @@ -652,7 +652,7 @@ static int Camera_setMode( BPy_Camera * self, PyObject * value ) { unsigned int flag = 0; - if( !PyInt_CheckExact( value ) ) + if( !PyInt_Check( value ) ) return EXPP_ReturnIntError( PyExc_TypeError, "expected an integer (bitmask) as argument" ); diff --git a/source/blender/python/api2_2x/Constraint.c b/source/blender/python/api2_2x/Constraint.c index feb9e63e5b8..f274c9dba59 100644 --- a/source/blender/python/api2_2x/Constraint.c +++ b/source/blender/python/api2_2x/Constraint.c @@ -1401,7 +1401,7 @@ static PyObject *Constraint_getData( BPy_Constraint * self, PyObject * key ) { int setting; - if( !PyInt_CheckExact( key ) ) + if( !PyInt_Check( key ) ) return EXPP_ReturnPyObjError( PyExc_TypeError, "expected an int arg" ); diff --git a/source/blender/python/api2_2x/Group.c b/source/blender/python/api2_2x/Group.c index 012e0cb540c..26e5edd0733 100755 --- a/source/blender/python/api2_2x/Group.c +++ b/source/blender/python/api2_2x/Group.c @@ -220,7 +220,7 @@ static int Group_setLayers( BPy_Group * self, PyObject * value ) GROUP_DEL_CHECK_INT(self); - if( !PyInt_CheckExact( value ) ) + if( !PyInt_Check( value ) ) return EXPP_ReturnIntError( PyExc_TypeError, "expected an integer (bitmask) as argument" ); diff --git a/source/blender/python/api2_2x/Ipo.c b/source/blender/python/api2_2x/Ipo.c index a6077071ccb..73666b05695 100644 --- a/source/blender/python/api2_2x/Ipo.c +++ b/source/blender/python/api2_2x/Ipo.c @@ -811,7 +811,7 @@ static PyObject *Ipo_getBlocktype( BPy_Ipo * self ) static int Ipo_setBlocktype( BPy_Ipo * self, PyObject * args ) { - if( !PyInt_CheckExact( args ) ) + if( !PyInt_Check( args ) ) return EXPP_ReturnIntError( PyExc_TypeError, "expected int argument" ); diff --git a/source/blender/python/api2_2x/Ipocurve.c b/source/blender/python/api2_2x/Ipocurve.c index 2ce7e91e6c8..380a22c8098 100644 --- a/source/blender/python/api2_2x/Ipocurve.c +++ b/source/blender/python/api2_2x/Ipocurve.c @@ -796,7 +796,7 @@ static int IpoCurve_setDriver( C_IpoCurve * self, PyObject * args ) { IpoCurve *ipo = self->ipocurve; int type; - if( !PyInt_CheckExact( args ) ) + if( !PyInt_Check( args ) ) return EXPP_ReturnIntError( PyExc_TypeError, "expected int argument 0 or 1 " ); @@ -879,7 +879,7 @@ static int IpoCurve_setDriverChannel( C_IpoCurve * self, PyObject * args ) return EXPP_ReturnIntError( PyExc_RuntimeError, "This IpoCurve does not have an active driver" ); - if( !PyInt_CheckExact( args ) ) + if( !PyInt_Check( args ) ) return EXPP_ReturnIntError( PyExc_TypeError, "expected int argument" ); diff --git a/source/blender/python/api2_2x/Lamp.c b/source/blender/python/api2_2x/Lamp.c index 2b3617e97e2..fc8a7809de1 100644 --- a/source/blender/python/api2_2x/Lamp.c +++ b/source/blender/python/api2_2x/Lamp.c @@ -988,7 +988,7 @@ static int Lamp_setMode( BPy_Lamp * self, PyObject * value ) | EXPP_LAMP_MODE_NOSPECULAR | EXPP_LAMP_MODE_SHAD_RAY; - if( !PyInt_CheckExact ( value ) ) { + if( !PyInt_Check ( value ) ) { char errstr[128]; sprintf ( errstr , "expected int bitmask of 0x%04x", bitmask ); return EXPP_ReturnIntError( PyExc_TypeError, errstr ); diff --git a/source/blender/python/api2_2x/Material.c b/source/blender/python/api2_2x/Material.c index f5d9dfeee06..888e14a59e5 100644 --- a/source/blender/python/api2_2x/Material.c +++ b/source/blender/python/api2_2x/Material.c @@ -1764,7 +1764,7 @@ static int Material_setMode( BPy_Material * self, PyObject * value ) { int param; - if( !PyInt_CheckExact ( value ) ) { + if( !PyInt_Check( value ) ) { char errstr[128]; sprintf ( errstr , "expected int bitmask of 0x%08x", MA_MODE_MASK ); return EXPP_ReturnIntError( PyExc_TypeError, errstr ); diff --git a/source/blender/python/api2_2x/Mesh.c b/source/blender/python/api2_2x/Mesh.c index f89a0d7479b..a9bafa99219 100644 --- a/source/blender/python/api2_2x/Mesh.c +++ b/source/blender/python/api2_2x/Mesh.c @@ -1358,15 +1358,15 @@ static PyObject *Mesh_setProperty_internal(CustomData *data, int eindex, PyObjec return EXPP_ReturnPyObjError( PyExc_ValueError, "error, maximum name length is 31" ); - if(PyInt_CheckExact(val)){ + if(PyInt_Check(val)){ type = CD_PROP_INT; i = (int)PyInt_AS_LONG(val); } - else if(PyFloat_CheckExact(val)){ + else if(PyFloat_Check(val)){ type = CD_PROP_FLT; f = (float)PyFloat_AsDouble(val); } - else if(PyString_CheckExact(val)){ + else if(PyString_Check(val)){ type = CD_PROP_STR; s = PyString_AsString(val); } @@ -2085,7 +2085,7 @@ static PyObject *MVertSeq_delete( BPy_MVertSeq * self, PyObject *args ) "MVert belongs to a different mesh" ); } index = ((BPy_MVert*)tmp)->index; - } else if( PyInt_CheckExact( tmp ) ) { + } else if( PyInt_Check( tmp ) ) { index = PyInt_AsLong ( tmp ); } else { MEM_freeN( vert_table ); @@ -2396,7 +2396,7 @@ static int MEdge_setFlag( BPy_MEdge * self, PyObject * value ) if( !edge ) return -1; - if( !PyInt_CheckExact ( value ) ) { + if( !PyInt_Check ( value ) ) { char errstr[128]; sprintf ( errstr , "expected int bitmask of 0x%04x", bitmask ); return EXPP_ReturnIntError( PyExc_TypeError, errstr ); @@ -3020,7 +3020,7 @@ static PyObject *MEdgeSeq_extend( BPy_MEdgeSeq * self, PyObject *args ) ok = 0; for( j = 0; ok == 0 && j < nverts; ++j ) { PyObject *item = PySequence_ITEM( tmp, j ); - if( !PyInt_CheckExact( item ) ) + if( !PyInt_Check( item ) ) ok = 1; else { int index = PyInt_AsLong ( item ); @@ -3254,7 +3254,7 @@ static PyObject *MEdgeSeq_delete( BPy_MEdgeSeq * self, PyObject *args ) PyObject *tmp = PySequence_GetItem( args, i ); if( BPy_MEdge_Check( tmp ) ) edge_table[i] = ((BPy_MEdge *)tmp)->index; - else if( PyInt_CheckExact( tmp ) ) + else if( PyInt_Check( tmp ) ) edge_table[i] = PyInt_AsLong ( tmp ); else { MEM_freeN( edge_table ); @@ -3464,7 +3464,7 @@ static PyObject *MEdgeSeq_collapse( BPy_MEdgeSeq * self, PyObject *args ) tmp1 = PySequence_GetItem( tmp, 0 ); tmp2 = PySequence_GetItem( tmp, 1 ); Py_DECREF( tmp ); - if( !(BPy_MEdge_Check( tmp1 ) || PyInt_CheckExact( tmp1 )) || + if( !(BPy_MEdge_Check( tmp1 ) || PyInt_Check( tmp1 )) || !VectorObject_Check ( tmp2 ) ) { MEM_freeN( edge_table ); MEM_freeN( vert_list ); @@ -3476,7 +3476,7 @@ static PyObject *MEdgeSeq_collapse( BPy_MEdgeSeq * self, PyObject *args ) } /* store edge index, new vertex location */ - if( PyInt_CheckExact( tmp1 ) ) + if( PyInt_Check( tmp1 ) ) edge_table[i] = PyInt_AsLong ( tmp1 ); else edge_table[i] = ((BPy_MEdge *)tmp1)->index; @@ -4114,7 +4114,7 @@ static int MFace_setFlag( BPy_MFace *self, PyObject *value ) if( !MFace_get_pointer( self ) ) return -1; - if( !PyInt_CheckExact ( value ) ) { + if( !PyInt_Check ( value ) ) { char errstr[128]; sprintf ( errstr , "expected int bitmask of 0x%04x", MFACE_FLAG_BITMASK ); return EXPP_ReturnIntError( PyExc_TypeError, errstr ); @@ -4180,7 +4180,7 @@ static int MFace_setMode( BPy_MFace *self, PyObject *value ) if( !MFace_get_pointer( self ) ) return -1; - if( !PyInt_CheckExact ( value ) ) { + if( !PyInt_Check ( value ) ) { char errstr[128]; sprintf ( errstr , "expected int bitmask of 0x%04x", bitmask ); return EXPP_ReturnIntError( PyExc_TypeError, errstr ); @@ -4387,7 +4387,7 @@ static int MFace_setUVSel( BPy_MFace * self, PyObject * value ) mask = TF_SEL1; for( i=0; i<length; ++i, mask <<= 1 ) { PyObject *tmp = PySequence_GetItem( value, i ); /* adds a reference, remove below */ - if( !PyInt_CheckExact( tmp ) ) { + if( !PyInt_Check( tmp ) ) { Py_DECREF(tmp); return EXPP_ReturnIntError( PyExc_TypeError, "expected a tuple of integers" ); @@ -5370,7 +5370,7 @@ static PyObject *MFaceSeq_delete( BPy_MFaceSeq * self, PyObject *args ) PyObject *tmp = PySequence_GetItem( args, i ); if( BPy_MFace_Check( tmp ) ) face_table[i] = ((BPy_MFace *)tmp)->index; - else if( PyInt_CheckExact( tmp ) ) + else if( PyInt_Check( tmp ) ) face_table[i] = PyInt_AsLong( tmp ); else { MEM_freeN( face_table ); @@ -5948,7 +5948,7 @@ static PyObject *Mesh_findEdges( PyObject * self, PyObject *args ) } index1 = v1->index; index2 = v2->index; - } else if( PyInt_CheckExact( v1 ) && PyInt_CheckExact( v2 ) ) { + } else if( PyInt_Check( v1 ) && PyInt_Check( v2 ) ) { index1 = PyInt_AsLong( (PyObject *)v1 ); index2 = PyInt_AsLong( (PyObject *)v2 ); if( (int)index1 >= mesh->totvert @@ -7030,7 +7030,7 @@ static PyObject *Mesh_getMultires( BPy_Mesh * self, void *type ) static int Mesh_setMultires( BPy_Mesh * self, PyObject *value, void *type ) { int i; - if( !PyInt_CheckExact( value ) ) + if( !PyInt_Check( value ) ) return EXPP_ReturnIntError( PyExc_TypeError, "expected integer argument" ); @@ -7758,7 +7758,7 @@ static int Mesh_setMode( BPy_Mesh *self, PyObject *value ) ME_UVEFFECT | ME_VCOLEFFECT | ME_AUTOSMOOTH | ME_SMESH | ME_SUBSURF | ME_OPT_EDGES; - if( !PyInt_CheckExact ( value ) ) { + if( !PyInt_Check ( value ) ) { char errstr[128]; sprintf ( errstr , "expected int bitmask of 0x%04x", bitmask ); return EXPP_ReturnIntError( PyExc_TypeError, errstr ); @@ -7816,7 +7816,7 @@ static int Mesh_setActiveFace( BPy_Mesh * self, PyObject * value ) /* if param isn't an int, error */ - if( !PyInt_CheckExact( value ) ) + if( !PyInt_Check( value ) ) return EXPP_ReturnIntError( PyExc_TypeError, "expected an int argument" ); diff --git a/source/blender/python/api2_2x/Metaball.c b/source/blender/python/api2_2x/Metaball.c index 6e4071d00e8..98dc7ea1127 100644 --- a/source/blender/python/api2_2x/Metaball.c +++ b/source/blender/python/api2_2x/Metaball.c @@ -661,7 +661,7 @@ static int Metaball_setUpdate( BPy_Metaball * self, PyObject * value ) { int param; - if( !PyInt_CheckExact( value ) ) + if( !PyInt_Check( value ) ) return EXPP_ReturnIntError( PyExc_TypeError, "metaball.update - expected an int argument" ); @@ -752,7 +752,7 @@ static PyObject *Metaelem_getType( BPy_Metaelem *self ) static int Metaelem_setType( BPy_Metaelem * self, PyObject * value ) { int type; - if( !PyInt_CheckExact( value ) ) + if( !PyInt_Check( value ) ) return EXPP_ReturnIntError( PyExc_TypeError, "metaelem.type - expected an integer (bitmask) as argument" ); diff --git a/source/blender/python/api2_2x/Modifier.c b/source/blender/python/api2_2x/Modifier.c index 93f0f76af02..97231c8fff3 100644 --- a/source/blender/python/api2_2x/Modifier.c +++ b/source/blender/python/api2_2x/Modifier.c @@ -987,7 +987,7 @@ static PyObject *Modifier_getData( BPy_Modifier * self, PyObject * key ) { int setting; - if( !PyInt_CheckExact( key ) ) + if( !PyInt_Check( key ) ) return EXPP_ReturnPyObjError( PyExc_TypeError, "expected an int arg as stored in Blender.Modifier.Settings" ); diff --git a/source/blender/python/api2_2x/Object.c b/source/blender/python/api2_2x/Object.c index 5fecf930af1..9d1b92e75b9 100644 --- a/source/blender/python/api2_2x/Object.c +++ b/source/blender/python/api2_2x/Object.c @@ -3657,7 +3657,7 @@ static int setIntAttrRange( BPy_Object *self, PyObject *value, void *type ) struct Object *object = self->object; int min, max, size; - if( !PyInt_CheckExact( value ) ) + if( !PyInt_Check( value ) ) return EXPP_ReturnIntError( PyExc_TypeError, "expected integer argument" ); @@ -4296,7 +4296,7 @@ static int Object_setLayersMask( BPy_Object *self, PyObject *value ) int layers = 0, local; Base *base; - if( !PyInt_CheckExact( value ) ) + if( !PyInt_Check( value ) ) return EXPP_ReturnIntError( PyExc_TypeError, "expected an integer (bitmask) as argument" ); diff --git a/source/blender/python/api2_2x/Scene.c b/source/blender/python/api2_2x/Scene.c index 3bb509eb070..1414f949f2f 100644 --- a/source/blender/python/api2_2x/Scene.c +++ b/source/blender/python/api2_2x/Scene.c @@ -249,7 +249,7 @@ static int Scene_setLayerMask( BPy_Scene * self, PyObject * value ) SCENE_DEL_CHECK_INT(self); - if (!PyInt_CheckExact(value)) { + if (!PyInt_Check(value)) { return EXPP_ReturnIntError( PyExc_AttributeError, "expected an integer (bitmask) as argument" ); } diff --git a/source/blender/python/api2_2x/Texture.c b/source/blender/python/api2_2x/Texture.c index ef17207d6ef..11a869d0b7c 100644 --- a/source/blender/python/api2_2x/Texture.c +++ b/source/blender/python/api2_2x/Texture.c @@ -1530,7 +1530,7 @@ static int Texture_setFlags( BPy_Texture * self, PyObject * value ) | TEX_CHECKER_ODD | TEX_CHECKER_EVEN; - if( !PyInt_CheckExact ( value ) ) { + if( !PyInt_Check( value ) ) { char errstr[128]; sprintf ( errstr , "expected int bitmask of 0x%08x", bitmask ); return EXPP_ReturnIntError( PyExc_TypeError, errstr ); @@ -1602,7 +1602,7 @@ static int Texture_setImageFlags( BPy_Texture * self, PyObject * value, | TEX_CALCALPHA | TEX_NORMALMAP; - if( !PyInt_CheckExact ( value ) ) { + if( !PyInt_Check( value ) ) { char errstr[128]; sprintf ( errstr , "expected int bitmask of 0x%08x", bitmask ); return EXPP_ReturnIntError( PyExc_TypeError, errstr ); @@ -1674,7 +1674,7 @@ static int Texture_setNoiseBasis( BPy_Texture * self, PyObject * value ) { int param; - if( !PyInt_CheckExact ( value ) ) + if( !PyInt_Check( value ) ) return EXPP_ReturnIntError( PyExc_TypeError, "expected int (see 'Noise' constant dictionary)" ); @@ -1700,7 +1700,7 @@ static int Texture_setNoiseBasis2( BPy_Texture * self, PyObject * value, if( (int)type == EXPP_TEX_NOISEBASIS2 ) { int param; - if( !PyInt_CheckExact ( value ) ) + if( !PyInt_Check( value ) ) return EXPP_ReturnIntError( PyExc_TypeError, "expected int (see 'Noise' constant dictionary)" ); @@ -1720,7 +1720,7 @@ static int Texture_setNoiseBasis2( BPy_Texture * self, PyObject * value, */ } else { - if( !PyInt_CheckExact ( value ) ) + if( !PyInt_Check( value ) ) return EXPP_ReturnIntError( PyExc_TypeError, "expected int value of 1" ); @@ -1772,7 +1772,7 @@ static int Texture_setSType( BPy_Texture * self, PyObject * value ) short param; const char *dummy = NULL; - if( !PyInt_CheckExact ( value ) ) + if( !PyInt_Check( value ) ) return EXPP_ReturnIntError( PyExc_TypeError, "expected int argument" ); diff --git a/source/blender/python/api2_2x/World.c b/source/blender/python/api2_2x/World.c index fff1a1e6bab..6d5b20b46d9 100644 --- a/source/blender/python/api2_2x/World.c +++ b/source/blender/python/api2_2x/World.c @@ -573,7 +573,7 @@ static PyObject *World_getSkytype( BPy_World * self ) static int World_setSkytype( BPy_World * self, PyObject * value ) { - if( !PyInt_CheckExact(value) ) + if( !PyInt_Check(value) ) return ( EXPP_ReturnIntError( PyExc_TypeError, "expected int argument" ) ); self->world->skytype = (short)PyInt_AsLong(value); @@ -606,7 +606,7 @@ static PyObject *World_getMode( BPy_World * self ) static int World_setMode( BPy_World * self, PyObject * value ) { - if( !PyInt_CheckExact(value) ) + if( !PyInt_Check(value) ) return ( EXPP_ReturnIntError( PyExc_TypeError, "expected int argument" ) ); self->world->mode = (short)PyInt_AsLong(value); @@ -640,7 +640,7 @@ static PyObject *World_getMistype( BPy_World * self ) static int World_setMistype( BPy_World * self, PyObject * value ) { - if( !PyInt_CheckExact(value) ) + if( !PyInt_Check(value) ) return ( EXPP_ReturnIntError( PyExc_TypeError, "expected int argument" ) ); self->world->mistype = (short)PyInt_AsLong(value); 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 ); 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 ); diff --git a/source/blender/python/api2_2x/sceneSequence.c b/source/blender/python/api2_2x/sceneSequence.c index 3751ffadcee..f12fec1168d 100644 --- a/source/blender/python/api2_2x/sceneSequence.c +++ b/source/blender/python/api2_2x/sceneSequence.c @@ -623,7 +623,7 @@ static int setIntAttrClamp( BPy_Sequence *self, PyObject *value, void *type ) struct Sequence *seq= self->seq; int number, origval=0; - if( !PyInt_CheckExact ( value ) ) + if( !PyInt_Check( value ) ) return EXPP_ReturnIntError( PyExc_TypeError, "expected an int value" ); number = PyInt_AS_LONG( value ); |