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.
This commit is contained in:
Campbell Barton
2007-07-01 05:41:23 +00:00
parent 676043c314
commit 39e4dc6202
18 changed files with 52 additions and 52 deletions

View File

@@ -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" );