patch from Clark Gaebel, use const char * for buildinfo strings, also updated bpy_app.c
authorCampbell Barton <ideasman42@gmail.com>
Sun, 28 Feb 2010 22:48:50 +0000 (22:48 +0000)
committerCampbell Barton <ideasman42@gmail.com>
Sun, 28 Feb 2010 22:48:50 +0000 (22:48 +0000)
source/blender/python/intern/bpy_app.c
source/creator/creator.c

index d8a8ecb041ec29977e51471b80186bd04313f9f2..59c1c0bf7c206b52c3588249381a0579d51513bd 100644 (file)
 #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
index 4f3ad5d05d972f06aee1ee50577481b312f3ca10..3b9bac2ccd5ec25b9361cf14326eb45f43b0bcbf 100644 (file)
 
 // 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 */