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-07-02 00:55:32 +0400
committerCampbell Barton <ideasman42@gmail.com>2009-07-02 00:55:32 +0400
commit666ce6de80935c614c7e700c6a3f9775edb15ac2 (patch)
tree92b9b6402bacfa8165ab85076a5a13715dff2390
parent594c8802d748dc0701af491e8a2c590f2d2e0038 (diff)
needed for building with py2
-rw-r--r--source/blender/python/generic/matrix.c4
-rw-r--r--source/blender/python/generic/vector.c4
2 files changed, 8 insertions, 0 deletions
diff --git a/source/blender/python/generic/matrix.c b/source/blender/python/generic/matrix.c
index 34d29dacdd1..5bdbf804618 100644
--- a/source/blender/python/generic/matrix.c
+++ b/source/blender/python/generic/matrix.c
@@ -1182,7 +1182,11 @@ PyTypeObject matrix_Type = {
(reprfunc) Matrix_repr, /*tp_repr*/
&Matrix_NumMethods, /*tp_as_number*/
&Matrix_SeqMethods, /*tp_as_sequence*/
+#if (PY_VERSION_HEX >= 0x03000000)
&Matrix_AsMapping, /*tp_as_mapping*/
+#else
+ 0,
+#endif
0, /*tp_hash*/
0, /*tp_call*/
0, /*tp_str*/
diff --git a/source/blender/python/generic/vector.c b/source/blender/python/generic/vector.c
index 5abc68c63ca..b4c74787e05 100644
--- a/source/blender/python/generic/vector.c
+++ b/source/blender/python/generic/vector.c
@@ -1897,7 +1897,11 @@ PyTypeObject vector_Type = {
&Vector_NumMethods, /* PyNumberMethods *tp_as_number; */
&Vector_SeqMethods, /* PySequenceMethods *tp_as_sequence; */
+#if (PY_VERSION_HEX >= 0x03000000)
&Vector_AsMapping, /* PyMappingMethods *tp_as_mapping; */
+#else
+ NULL,
+#endif
/* More standard operations (here for binary compatibility) */