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>2010-03-01 01:48:50 +0300
committerCampbell Barton <ideasman42@gmail.com>2010-03-01 01:48:50 +0300
commitb5d6d11abb434bce90ace07242cd5e410574941f (patch)
tree7ea9b61ac15c9b21bf58750eca006ce0d4b86806
parent545591727446bbc553b0cfb0cc9b6fefd2a16d9e (diff)
patch from Clark Gaebel, use const char * for buildinfo strings, also updated bpy_app.c
-rw-r--r--source/blender/python/intern/bpy_app.c24
-rw-r--r--source/creator/creator.c10
2 files changed, 18 insertions, 16 deletions
diff --git a/source/blender/python/intern/bpy_app.c b/source/blender/python/intern/bpy_app.c
index d8a8ecb041e..59c1c0bf7c2 100644
--- a/source/blender/python/intern/bpy_app.c
+++ b/source/blender/python/intern/bpy_app.c
@@ -32,17 +32,11 @@
#include "structseq.h"
#ifdef BUILD_DATE
-extern char * build_date;
-extern char * build_time;
-extern char * build_rev;
-extern char * build_platform;
-extern char * build_type;
-#else
-static char * build_date = "Unknown";
-static char * build_time = "Unknown";
-static char * build_rev = "Unknown";
-static char * build_platform = "Unknown";
-static char * build_type = "Unknown";
+extern const char * build_date;
+extern const char * build_time;
+extern const char * build_rev;
+extern const char * build_platform;
+extern const char * build_type;
#endif
static PyTypeObject BlenderAppType;
@@ -111,11 +105,19 @@ static PyObject *make_app_info(void)
SetObjItem(PyBool_FromLong(G.f & G_DEBUG));
/* build info */
+#ifdef BUILD_DATE
SetStrItem(strip_quotes(buf, build_date));
SetStrItem(strip_quotes(buf, build_time));
SetStrItem(strip_quotes(buf, build_rev));
SetStrItem(strip_quotes(buf, build_platform));
SetStrItem(strip_quotes(buf, build_type));
+#else
+ SetStrItem(strip_quotes(buf, "Unknown"));
+ SetStrItem(strip_quotes(buf, "Unknown"));
+ SetStrItem(strip_quotes(buf, "Unknown"));
+ SetStrItem(strip_quotes(buf, "Unknown"));
+ SetStrItem(strip_quotes(buf, "Unknown"));
+#endif
#undef SetIntItem
#undef SetStrItem
diff --git a/source/creator/creator.c b/source/creator/creator.c
index 4f3ad5d05d9..3b9bac2ccd5 100644
--- a/source/creator/creator.c
+++ b/source/creator/creator.c
@@ -107,11 +107,11 @@
// from buildinfo.c
#ifdef BUILD_DATE
-extern char * build_date;
-extern char * build_time;
-extern char * build_rev;
-extern char * build_platform;
-extern char * build_type;
+extern const char * build_date;
+extern const char * build_time;
+extern const char * build_rev;
+extern const char * build_platform;
+extern const char * build_type;
#endif
/* Local Function prototypes */