[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [32004] trunk/blender/source: * Update BGE for change in r32001
Nathan Letwory
nathan at letworyinteractive.com
Sat Sep 18 21:38:28 CEST 2010
Revision: 32004
http://projects.blender.org/plugins/scmsvn/viewcvs.php?view=rev&root=bf-blender&revision=32004
Author: jesterking
Date: 2010-09-18 21:38:27 +0200 (Sat, 18 Sep 2010)
Log Message:
-----------
* 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).
Modified Paths:
--------------
trunk/blender/source/blender/python/generic/py_capi_utils.h
trunk/blender/source/blender/python/intern/bpy_interface.c
trunk/blender/source/gameengine/Ketsji/KX_PythonInit.cpp
Modified: trunk/blender/source/blender/python/generic/py_capi_utils.h
===================================================================
--- trunk/blender/source/blender/python/generic/py_capi_utils.h 2010-09-18 16:17:32 UTC (rev 32003)
+++ trunk/blender/source/blender/python/generic/py_capi_utils.h 2010-09-18 19:38:27 UTC (rev 32004)
@@ -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);
Modified: trunk/blender/source/blender/python/intern/bpy_interface.c
===================================================================
--- trunk/blender/source/blender/python/intern/bpy_interface.c 2010-09-18 16:17:32 UTC (rev 32003)
+++ trunk/blender/source/blender/python/intern/bpy_interface.c 2010-09-18 19:38:27 UTC (rev 32004)
@@ -339,15 +339,17 @@
* '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);
Modified: trunk/blender/source/gameengine/Ketsji/KX_PythonInit.cpp
===================================================================
--- trunk/blender/source/gameengine/Ketsji/KX_PythonInit.cpp 2010-09-18 16:17:32 UTC (rev 32003)
+++ trunk/blender/source/gameengine/Ketsji/KX_PythonInit.cpp 2010-09-18 19:38:27 UTC (rev 32004)
@@ -38,6 +38,7 @@
extern "C" {
#include "bpy_internal_import.h" /* from the blender python api, but we want to import text too! */
+ #include "py_capi_utils.h"
#include "mathutils.h" // Blender.Mathutils module copied here so the blenderlayer can use.
#include "geometry.h" // Blender.Geometry module copied here so the blenderlayer can use.
#include "bgl.h"
@@ -1920,7 +1921,7 @@
PyObjectPlus::ClearDeprecationWarning();
- return bpy_namespace_dict_new(NULL);
+ return PyC_DefaultNameSpace(NULL);
}
void exitGamePlayerPythonScripting()
@@ -1956,7 +1957,7 @@
PyObjectPlus::NullDeprecationWarning();
- return bpy_namespace_dict_new(NULL);
+ return PyC_DefaultNameSpace(NULL);
}
void exitGamePythonScripting()
More information about the Bf-blender-cvs
mailing list