Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCampbell Barton <ideasman42@gmail.com>2008-04-18 01:14:55 +0400
committerCampbell Barton <ideasman42@gmail.com>2008-04-18 01:14:55 +0400
commitbe0b8ccfaaa98118468c8fec971792ab1123eaca (patch)
treec5a0f24fe547de8b411298bbe8df9cdc12b4a530 /source/blender/python/api2_2x/Image.c
parent45dee507aaaa159e5b0bda1f6fc81a928f78e17b (diff)
Used GET_INT_FROM_POINTER to get rid of many warnings that only occurred with 64bit os's
Also use Py_ssize_t which we might need to define for older python's
Diffstat (limited to 'source/blender/python/api2_2x/Image.c')
-rw-r--r--source/blender/python/api2_2x/Image.c16
1 files changed, 8 insertions, 8 deletions
diff --git a/source/blender/python/api2_2x/Image.c b/source/blender/python/api2_2x/Image.c
index e1be791d904..94da5a77170 100644
--- a/source/blender/python/api2_2x/Image.c
+++ b/source/blender/python/api2_2x/Image.c
@@ -1191,7 +1191,7 @@ static PyObject *Image_hasData(BPy_Image *self, void *closure)
static PyObject *Image_getFlag(BPy_Image *self, void *flag)
{
- if (self->image->flag & (int)flag)
+ if (self->image->flag & GET_INT_FROM_POINTER(flag))
Py_RETURN_TRUE;
else
Py_RETURN_FALSE;
@@ -1200,7 +1200,7 @@ static PyObject *Image_getFlag(BPy_Image *self, void *flag)
static PyObject *Image_getFlagTpage(BPy_Image *self, void *flag)
{
- if (self->image->tpageflag & (int)flag)
+ if (self->image->tpageflag & GET_INT_FROM_POINTER(flag))
Py_RETURN_TRUE;
else
Py_RETURN_FALSE;
@@ -1235,9 +1235,9 @@ static int Image_setFlag(BPy_Image *self, PyObject *value, void *flag)
"expected True/False or 0/1" );
if ( param )
- self->image->flag |= (int)flag;
+ self->image->flag |= GET_INT_FROM_POINTER(flag);
else
- self->image->flag &= ~(int)flag;
+ self->image->flag &= ~GET_INT_FROM_POINTER(flag);
return 0;
}
@@ -1249,9 +1249,9 @@ static int Image_setFlagTpage(BPy_Image *self, PyObject *value, void *flag)
"expected True/False or 0/1" );
if ( param )
- self->image->tpageflag |= (int)flag;
+ self->image->tpageflag |= GET_INT_FROM_POINTER(flag);
else
- self->image->tpageflag &= ~(int)flag;
+ self->image->tpageflag &= ~GET_INT_FROM_POINTER(flag);
return 0;
}
@@ -1263,7 +1263,7 @@ static PyObject *getIntAttr( BPy_Image *self, void *type )
int param;
struct Image *image = self->image;
- switch( (int)type ) {
+ switch( GET_INT_FROM_POINTER(type) ) {
case EXPP_IMAGE_ATTR_XREP:
param = image->xrep;
break;
@@ -1304,7 +1304,7 @@ static int setIntAttrClamp( BPy_Image *self, PyObject *value, void *type )
struct Image *image = self->image;
int min, max, size;
- switch( (int)type ) {
+ switch( GET_INT_FROM_POINTER(type) ) {
case EXPP_IMAGE_ATTR_XREP:
min = EXPP_IMAGE_REP_MIN;
max = EXPP_IMAGE_REP_MAX;