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/bpy_config.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/bpy_config.c')
-rw-r--r--source/blender/python/api2_2x/bpy_config.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/source/blender/python/api2_2x/bpy_config.c b/source/blender/python/api2_2x/bpy_config.c
index 36b0685eeb3..0e6f9741751 100644
--- a/source/blender/python/api2_2x/bpy_config.c
+++ b/source/blender/python/api2_2x/bpy_config.c
@@ -31,6 +31,7 @@
#include "DNA_userdef_types.h"
#include "../api2_2x/gen_utils.h"
#include "bpy_config.h"
+#include "BKE_utildefines.h"
enum conf_consts {
/*string*/
@@ -88,7 +89,7 @@ static PyObject *getStrAttr( BPy_Config *self, void *type )
{
char *param = NULL;
- switch( (int)type ) {
+ switch( GET_INT_FROM_POINTER(type) ) {
case EXPP_CONF_ATTR_PATH_YF_EXPORT:
param = U.yfexportdir;
break;
@@ -139,7 +140,7 @@ static int setStrAttr( BPy_Config *self, PyObject *value, void *type )
return EXPP_ReturnIntError( PyExc_TypeError,
"error, must assign a python string for setStrAttr");
- switch( (int)type ) {
+ switch( GET_INT_FROM_POINTER(type) ) {
case EXPP_CONF_ATTR_PATH_YF_EXPORT:
param = U.yfexportdir;
break;
@@ -186,7 +187,7 @@ static PyObject *getIntAttr( BPy_Config *self, void *type )
{
int param;
- switch( (int)type ) {
+ switch( GET_INT_FROM_POINTER(type) ) {
case EXPP_CONF_ATTR_UNDOSTEPS:
param = (int)U.undosteps;
break;
@@ -220,7 +221,7 @@ static int setIntAttrClamp( BPy_Config *self, PyObject *value, void *type )
void *param;
int min, max, size;
- switch( (int)type ) {
+ switch( GET_INT_FROM_POINTER(type) ) {
case EXPP_CONF_ATTR_UNDOSTEPS:
min = 0;
max = 64;