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:
authorCampbell Barton <ideasman42@gmail.com>2010-10-27 10:05:22 +0400
committerCampbell Barton <ideasman42@gmail.com>2010-10-27 10:05:22 +0400
commit676829ccba10da1d83f809ad243685707bb7543d (patch)
tree6dc48b011794fe29ebed3f0a8f82425ccdcdacc2 /source/blender/python/generic/bpy_internal_import.h
parent27b527c164fcb4b4bd13a1fc49c6627ed460baa6 (diff)
workaround for python bug [#24400] If Script is executed with TEXT Editor, it becomes an error.
having the blend file as a part of the __file__ variable is not essential, this is fixed in python 3.2 so add an ifdef and don't use the blend file path for py older then 3.2.
Diffstat (limited to 'source/blender/python/generic/bpy_internal_import.h')
-rw-r--r--source/blender/python/generic/bpy_internal_import.h18
1 files changed, 7 insertions, 11 deletions
diff --git a/source/blender/python/generic/bpy_internal_import.h b/source/blender/python/generic/bpy_internal_import.h
index f191ab22651..dd7a3ab9f64 100644
--- a/source/blender/python/generic/bpy_internal_import.h
+++ b/source/blender/python/generic/bpy_internal_import.h
@@ -28,8 +28,8 @@
/* Note, the BGE needs to use this too, keep it minimal */
-#ifndef EXPP_bpy_import_h
-#define EXPP_bpy_import_h
+#ifndef BPY_INTERNAL_IMPORT_H
+#define BPY_INTERNAL_IMPORT_H
/* python redefines :/ */
#ifdef _POSIX_C_SOURCE
@@ -40,16 +40,12 @@
#undef _XOPEN_SOURCE
#endif
-#include <Python.h>
-#include "compile.h" /* for the PyCodeObject */
-#include "eval.h" /* for PyEval_EvalCode */
-
struct Text;
-PyObject* bpy_text_import( struct Text *text );
-PyObject* bpy_text_import_name( char *name, int *found );
-PyObject* bpy_text_reimport( PyObject *module, int *found );
-/* void bpy_text_clear_modules( int clear_all );*/ /* Clear user modules */
+PyObject* bpy_text_import(struct Text *text);
+PyObject* bpy_text_import_name(char *name, int *found);
+PyObject* bpy_text_reimport(PyObject *module, int *found);
+/* void bpy_text_clear_modules(int clear_all);*/ /* Clear user modules */
void bpy_text_filename_get(char *fn, struct Text *text);
@@ -60,4 +56,4 @@ extern PyMethodDef bpy_reload_meth;
struct Main *bpy_import_main_get(void);
void bpy_import_main_set(struct Main *maggie);
-#endif /* EXPP_bpy_import_h */
+#endif /* BPY_INTERNAL_IMPORT_H */