[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [36125] trunk/blender/source/blender/ python/intern/bpy_app.c: fix for compile issue on MSVC 2008 due to macro expansion differences with gcc .
Andrea Weikert
elubie at gmx.net
Tue Apr 12 19:58:54 CEST 2011
Revision: 36125
http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=36125
Author: elubie
Date: 2011-04-12 17:58:54 +0000 (Tue, 12 Apr 2011)
Log Message:
-----------
fix for compile issue on MSVC 2008 due to macro expansion differences with gcc.
Modified Paths:
--------------
trunk/blender/source/blender/python/intern/bpy_app.c
Modified: trunk/blender/source/blender/python/intern/bpy_app.c
===================================================================
--- trunk/blender/source/blender/python/intern/bpy_app.c 2011-04-12 17:18:02 UTC (rev 36124)
+++ trunk/blender/source/blender/python/intern/bpy_app.c 2011-04-12 17:58:54 UTC (rev 36125)
@@ -84,6 +84,9 @@
(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 @@
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));
More information about the Bf-blender-cvs
mailing list