* 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).
This commit is contained in:
@@ -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);
|
||||
|
||||
@@ -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);
|
||||
|
||||
@@ -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 @@ PyObject* initGamePlayerPythonScripting(const STR_String& progname, TPythonSecur
|
||||
|
||||
PyObjectPlus::ClearDeprecationWarning();
|
||||
|
||||
return bpy_namespace_dict_new(NULL);
|
||||
return PyC_DefaultNameSpace(NULL);
|
||||
}
|
||||
|
||||
void exitGamePlayerPythonScripting()
|
||||
@@ -1956,7 +1957,7 @@ PyObject* initGamePythonScripting(const STR_String& progname, TPythonSecurityLev
|
||||
|
||||
PyObjectPlus::NullDeprecationWarning();
|
||||
|
||||
return bpy_namespace_dict_new(NULL);
|
||||
return PyC_DefaultNameSpace(NULL);
|
||||
}
|
||||
|
||||
void exitGamePythonScripting()
|
||||
|
||||
Reference in New Issue
Block a user