Revision: 27196
          
http://projects.blender.org/plugins/scmsvn/viewcvs.php?view=rev&root=bf-blender&revision=27196
Author:   campbellbarton
Date:     2010-02-28 23:48:50 +0100 (Sun, 28 Feb 2010)

Log Message:
-----------
patch from Clark Gaebel, use const char * for buildinfo strings, also updated 
bpy_app.c

Modified Paths:
--------------
    trunk/blender/source/blender/python/intern/bpy_app.c
    trunk/blender/source/creator/creator.c

Modified: trunk/blender/source/blender/python/intern/bpy_app.c
===================================================================
--- trunk/blender/source/blender/python/intern/bpy_app.c        2010-02-28 
19:51:16 UTC (rev 27195)
+++ trunk/blender/source/blender/python/intern/bpy_app.c        2010-02-28 
22:48:50 UTC (rev 27196)
@@ -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 @@
        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

Modified: trunk/blender/source/creator/creator.c
===================================================================
--- trunk/blender/source/creator/creator.c      2010-02-28 19:51:16 UTC (rev 
27195)
+++ trunk/blender/source/creator/creator.c      2010-02-28 22:48:50 UTC (rev 
27196)
@@ -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 */


_______________________________________________
Bf-blender-cvs mailing list
[email protected]
http://lists.blender.org/mailman/listinfo/bf-blender-cvs

Reply via email to