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/Mesh.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/Mesh.c')
-rw-r--r--source/blender/python/api2_2x/Mesh.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/source/blender/python/api2_2x/Mesh.c b/source/blender/python/api2_2x/Mesh.c
index 6b4dcaa756a..9f68287d658 100644
--- a/source/blender/python/api2_2x/Mesh.c
+++ b/source/blender/python/api2_2x/Mesh.c
@@ -7039,7 +7039,7 @@ static PyObject *Mesh_getColorLayerNames( BPy_Mesh * self )
static PyObject *Mesh_getActiveLayer( BPy_Mesh * self, void *type )
{
CustomData *data = &self->mesh->fdata;
- int layer_type = (int)type;
+ int layer_type = GET_INT_FROM_POINTER(type);
int i;
if (layer_type < 0) { /* hack, if negative, its the renderlayer.*/
layer_type = -layer_type;
@@ -7058,7 +7058,7 @@ static int Mesh_setActiveLayer( BPy_Mesh * self, PyObject * value, void *type )
{
CustomData *data = &self->mesh->fdata;
char *name;
- int i,ok,n,layer_type = (int)type, render=0;
+ int i,ok,n,layer_type = GET_INT_FROM_POINTER(type), render=0;
if( !PyString_Check( value ) )
return EXPP_ReturnIntError( PyExc_ValueError,
@@ -7112,7 +7112,7 @@ static PyObject *Mesh_getMultires( BPy_Mesh * self, void *type )
{
int i=0;
if (self->mesh->mr) {
- switch ((int)type) {
+ switch (GET_INT_FROM_POINTER(type)) {
case MESH_MULTIRES_LEVEL:
i = self->mesh->mr->newlvl;
break;
@@ -7156,7 +7156,7 @@ static int Mesh_setMultires( BPy_Mesh * self, PyObject *value, void *type )
return EXPP_ReturnIntError( PyExc_TypeError,
"value out of range" );
- switch ((int)type) {
+ switch (GET_INT_FROM_POINTER(type)) {
case MESH_MULTIRES_LEVEL:
self->mesh->mr->newlvl = i;
multires_set_level_cb(self->object, self->mesh);