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:
Diffstat (limited to 'source/gameengine/Expressions/InputParser.cpp')
-rw-r--r--source/gameengine/Expressions/InputParser.cpp19
1 files changed, 19 insertions, 0 deletions
diff --git a/source/gameengine/Expressions/InputParser.cpp b/source/gameengine/Expressions/InputParser.cpp
index 834dff7af89..d45a9375dc7 100644
--- a/source/gameengine/Expressions/InputParser.cpp
+++ b/source/gameengine/Expressions/InputParser.cpp
@@ -658,10 +658,29 @@ static PyMethodDef CParserMethods[] =
{ NULL,NULL} // Sentinel
};
+
+#if (PY_VERSION_HEX >= 0x03000000)
+static struct PyModuleDef Expression_module_def = {
+ {}, /* m_base */
+ "Expression", /* m_name */
+ 0, /* m_doc */
+ 0, /* m_size */
+ CParserMethods, /* m_methods */
+ 0, /* m_reload */
+ 0, /* m_traverse */
+ 0, /* m_clear */
+ 0, /* m_free */
+};
+#endif
+
extern "C" {
void initExpressionModule(void)
{
+#if (PY_VERSION_HEX >= 0x03000000)
+ PyModule_Create(&Expression_module_def);
+#else
Py_InitModule("Expression",CParserMethods);
+#endif
}
}