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:
authorKen Hughes <khughes@pacific.edu>2005-11-28 08:21:25 +0300
committerKen Hughes <khughes@pacific.edu>2005-11-28 08:21:25 +0300
commit427cae9eebaceeac80f8e7a151661aa36f18db01 (patch)
tree8502f7b2fb2ccf4c87c9d6fe95274aa2b9c9ba96 /source/blender/python/api2_2x/Key.c
parentb2e32f5bd135eaf862be7159794f868b4ac2ce4a (diff)
-- Fix bugs caused (by me) by incorrect use of Py_RETURN_NONE macro in
"if" statements. The macro defined in gen_utils.h expands to two statements; putting after an "if" statement without {} means the second statement should always be executed. I'm not sure if just putting braces around both statements would cause other compilers to complain. But this explains an earlier bug in the Object module which only appeared on MacOS/X.
Diffstat (limited to 'source/blender/python/api2_2x/Key.c')
-rw-r--r--source/blender/python/api2_2x/Key.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/source/blender/python/api2_2x/Key.c b/source/blender/python/api2_2x/Key.c
index d57c7a60d9b..e71602ad6b4 100644
--- a/source/blender/python/api2_2x/Key.c
+++ b/source/blender/python/api2_2x/Key.c
@@ -530,8 +530,9 @@ static PyObject *KeyBlock_getData( PyObject * self )
BPy_KeyBlock *kb = ( BPy_KeyBlock * ) self;
Key *key = kb->key;
- if( !kb->keyblock->data )
+ if( !kb->keyblock->data ) {
Py_RETURN_NONE;
+ }
l = PyList_New( kb->keyblock->totelem );
if( !l )