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>2009-04-29 20:54:45 +0400
committerCampbell Barton <ideasman42@gmail.com>2009-04-29 20:54:45 +0400
commit81dfdf8374382c766c88bbed421ed70c02565234 (patch)
tree397ddc7c0a25bd554f8a83313100660ec2b006a8 /source/gameengine/Expressions/InputParser.cpp
parentd6c525d624ea98bf6eeac1a7f3483f41fed1ef4f (diff)
ifdef's for future py3 support, after this adding py3 can mostly be done with defines or batch renaming funcs (with the exception of CListValue slicing)
. No changes for py2.x.
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
}
}