diff options
author | Willian Padovani Germano <wpgermano@gmail.com> | 2003-06-10 00:07:43 +0400 |
---|---|---|
committer | Willian Padovani Germano <wpgermano@gmail.com> | 2003-06-10 00:07:43 +0400 |
commit | 84bd226fa309bf3cb196b187320b67a17df3a53e (patch) | |
tree | a1af22e9e25783fa7a703c2a212106fa09533418 /source/blender/python/api2_2x | |
parent | c7c5fd145134f454d7fa8042eac4be53da9e7370 (diff) |
* Added 'extern' to PyTypeObject declarations in some headers.
Diffstat (limited to 'source/blender/python/api2_2x')
-rw-r--r-- | source/blender/python/api2_2x/Camera.h | 2 | ||||
-rw-r--r-- | source/blender/python/api2_2x/Draw.c | 19 | ||||
-rw-r--r-- | source/blender/python/api2_2x/Image.h | 2 | ||||
-rw-r--r-- | source/blender/python/api2_2x/Material.h | 2 | ||||
-rw-r--r-- | source/blender/python/api2_2x/Object.h | 2 |
5 files changed, 13 insertions, 14 deletions
diff --git a/source/blender/python/api2_2x/Camera.h b/source/blender/python/api2_2x/Camera.h index ce943ecc7ed..6f35d651e58 100644 --- a/source/blender/python/api2_2x/Camera.h +++ b/source/blender/python/api2_2x/Camera.h @@ -40,7 +40,7 @@ #include "gen_utils.h" /* The Camera PyType Object defined in Camera.c */ -PyTypeObject Camera_Type; +extern PyTypeObject Camera_Type; #define BPy_Camera_Check(v) \ ((v)->ob_type == &Camera_Type) /* for type checking */ diff --git a/source/blender/python/api2_2x/Draw.c b/source/blender/python/api2_2x/Draw.c index c82a00a664b..7bbfa03d8a1 100644 --- a/source/blender/python/api2_2x/Draw.c +++ b/source/blender/python/api2_2x/Draw.c @@ -115,16 +115,15 @@ static void exit_pydraw(SpaceText *st) static void exec_callback(SpaceText *st, PyObject *callback, PyObject *args) { PyObject *result = PyObject_CallObject (callback, args); - printf ("In exec_callback\n"); - if (result==NULL) { - printf("In exec_callback, result == NULL\n"); - st->text->compiled= NULL; - PyErr_Print(); - exit_pydraw(st); + + if (result == NULL) { + st->text->compiled = NULL; + PyErr_Print (); + exit_pydraw (st); } - printf ("In exec_callback 2\n"); - Py_XDECREF(result); - Py_DECREF(args); + + Py_XDECREF (result); + Py_DECREF (args); } /* BPY_spacetext_do_pywin_draw, the static spacetext_do_pywin_buttons and @@ -165,7 +164,7 @@ static void spacetext_do_pywin_buttons(SpaceText *st, unsigned short event) void BPY_spacetext_do_pywin_event(SpaceText *st, unsigned short event, short val) { - if (event==QKEY && G.qual & (LR_ALTKEY|LR_CTRLKEY|LR_SHIFTKEY)) { + if (event == QKEY && G.qual & (LR_ALTKEY|LR_CTRLKEY|LR_SHIFTKEY)) { exit_pydraw(st); return; } diff --git a/source/blender/python/api2_2x/Image.h b/source/blender/python/api2_2x/Image.h index 729efa7cff1..08104875f7a 100644 --- a/source/blender/python/api2_2x/Image.h +++ b/source/blender/python/api2_2x/Image.h @@ -45,7 +45,7 @@ typedef struct { } C_Image; -PyTypeObject Image_Type; /* The Image PyType Object */ +extern PyTypeObject Image_Type; /* The Image PyType Object */ #define C_Image_Check(v) ((v)->ob_type == &Image_Type) /* for type checking */ diff --git a/source/blender/python/api2_2x/Material.h b/source/blender/python/api2_2x/Material.h index 0387295fc14..437722fac37 100644 --- a/source/blender/python/api2_2x/Material.h +++ b/source/blender/python/api2_2x/Material.h @@ -48,7 +48,7 @@ typedef struct { } C_Material; -PyTypeObject Material_Type; /* The Material PyType Object */ +extern PyTypeObject Material_Type; /* The Material PyType Object */ #define C_Material_Check(v) \ ((v)->ob_type == &Material_Type) /* for type checking */ diff --git a/source/blender/python/api2_2x/Object.h b/source/blender/python/api2_2x/Object.h index 8623820d60d..711596580e7 100644 --- a/source/blender/python/api2_2x/Object.h +++ b/source/blender/python/api2_2x/Object.h @@ -57,7 +57,7 @@ #include "modules.h" /* The Object PyType Object defined in Object.c */ -PyTypeObject Object_Type; +extern PyTypeObject Object_Type; #define C_Object_Check(v) \ ((v)->ob_type == &Object_Type) /* for type checking */ |