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:
authorAndrea Weikert <elubie@gmx.net>2011-04-12 21:58:54 +0400
committerAndrea Weikert <elubie@gmx.net>2011-04-12 21:58:54 +0400
commitd78220549b2b4031d9d0426b8d171989683509ce (patch)
tree7ec842b0bfe20bff578fbd3ef95b9ebbf9209e68 /source/blender/python/intern
parent771390793fa41add5e1071b3736fa829da5438a5 (diff)
fix for compile issue on MSVC 2008 due to macro expansion differences with gcc.
Diffstat (limited to 'source/blender/python/intern')
-rw-r--r--source/blender/python/intern/bpy_app.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/source/blender/python/intern/bpy_app.c b/source/blender/python/intern/bpy_app.c
index 99b20167dba..41de1171aaa 100644
--- a/source/blender/python/intern/bpy_app.c
+++ b/source/blender/python/intern/bpy_app.c
@@ -84,6 +84,9 @@ static PyStructSequence_Desc app_info_desc= {
(sizeof(app_info_fields)/sizeof(PyStructSequence_Field)) - 1
};
+#define DO_EXPAND(VAL) VAL ## 1
+#define EXPAND(VAL) DO_EXPAND(VAL)
+
static PyObject *make_app_info(void)
{
extern char bprogname[]; /* argv[0] from creator.c */
@@ -105,7 +108,11 @@ static PyObject *make_app_info(void)
SetObjItem(Py_BuildValue("(iii)", BLENDER_VERSION/100, BLENDER_VERSION%100, BLENDER_SUBVERSION));
SetObjItem(PyUnicode_FromFormat("%d.%02d (sub %d)", BLENDER_VERSION/100, BLENDER_VERSION%100, BLENDER_SUBVERSION));
+#if defined(BLENDER_VERSION_CHAR) && EXPAND(BLENDER_VERSION_CHAR) != 1
SetStrItem(STRINGIFY(BLENDER_VERSION_CHAR));
+#else
+ SetStrItem("");
+#endif
SetStrItem(STRINGIFY(BLENDER_VERSION_CYCLE));
SetStrItem(bprogname);
SetObjItem(PyBool_FromLong(G.background));