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:
authorNathan Letwory <nathan@letworyinteractive.com>2010-09-18 23:38:27 +0400
committerNathan Letwory <nathan@letworyinteractive.com>2010-09-18 23:38:27 +0400
commitab5b95d14846b9bebe6c35f9ff40acf43c74fb20 (patch)
treeaec20c04a9253306b4668e2293aa265c48227948 /source/blender/python
parent7c197b68496308200c5c2ed91735ed8682647aa6 (diff)
* Update BGE for change in r32001
* Fix var declaration in bpy_interface.c * Remove forward declarations from py_capi_utils.h: they are unnecessary and break compiles (there were probably many warnings about this during compile with GCC).
Diffstat (limited to 'source/blender/python')
-rw-r--r--source/blender/python/generic/py_capi_utils.h3
-rw-r--r--source/blender/python/intern/bpy_interface.c16
2 files changed, 9 insertions, 10 deletions
diff --git a/source/blender/python/generic/py_capi_utils.h b/source/blender/python/generic/py_capi_utils.h
index ced91fc9a6d..73769c91c76 100644
--- a/source/blender/python/generic/py_capi_utils.h
+++ b/source/blender/python/generic/py_capi_utils.h
@@ -25,9 +25,6 @@
#ifndef PY_CAPI_UTILS_H
#define PY_CAPI_UTILS_H
-struct PyObject;
-struct PyTypeObject;
-
void PyC_ObSpit(char *name, PyObject *var);
void PyC_LineSpit(void);
PyObject * PyC_ExceptionBuffer(void);
diff --git a/source/blender/python/intern/bpy_interface.c b/source/blender/python/intern/bpy_interface.c
index 551431a304c..6aaac3cd0e8 100644
--- a/source/blender/python/intern/bpy_interface.c
+++ b/source/blender/python/intern/bpy_interface.c
@@ -339,15 +339,17 @@ int BPY_run_python_script( bContext *C, const char *fn, struct Text *text, struc
* 'FILE structs for different C libraries can be different and
* incompatible'.
* So now we load the script file data to a buffer */
- char *pystring;
+ {
+ char *pystring;
- fclose(fp);
+ fclose(fp);
- pystring= MEM_mallocN(strlen(fn) + 32, "pystring");
- pystring[0]= '\0';
- sprintf(pystring, "exec(open(r'%s').read())", fn);
- py_result = PyRun_String( pystring, Py_file_input, py_dict, py_dict );
- MEM_freeN(pystring);
+ pystring= MEM_mallocN(strlen(fn) + 32, "pystring");
+ pystring[0]= '\0';
+ sprintf(pystring, "exec(open(r'%s').read())", fn);
+ py_result = PyRun_String( pystring, Py_file_input, py_dict, py_dict );
+ MEM_freeN(pystring);
+ }
#else
py_result = PyRun_File(fp, fn, Py_file_input, py_dict, py_dict);
fclose(fp);