diff options
author | Campbell Barton <ideasman42@gmail.com> | 2010-03-14 20:18:36 +0300 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2010-03-14 20:18:36 +0300 |
commit | e3c746659e378d5e739f97a9256cbfe1fdec6fee (patch) | |
tree | e8cd2bfd88ab1b24c8fcd6508e5536c76f77c918 /source/blender/python | |
parent | 128ecc7e822cdc989175a348edcc20f6858d6805 (diff) |
strip quites off buildinfo at startup (was doing this for splash screen and python api)
Diffstat (limited to 'source/blender/python')
-rw-r--r-- | source/blender/python/intern/bpy_app.c | 37 | ||||
-rw-r--r-- | source/blender/python/intern/bpy_interface.c | 6 |
2 files changed, 12 insertions, 31 deletions
diff --git a/source/blender/python/intern/bpy_app.c b/source/blender/python/intern/bpy_app.c index be0406ce7c7..ce5eea728a8 100644 --- a/source/blender/python/intern/bpy_app.c +++ b/source/blender/python/intern/bpy_app.c @@ -24,16 +24,18 @@ #include "bpy_app.h" +#include "BLI_path_util.h" + #include "BKE_blender.h" #include "BKE_global.h" #include "structseq.h" #ifdef BUILD_DATE -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; +extern char build_date[]; +extern char build_time[]; +extern char build_rev[]; +extern char build_platform[]; +extern char build_type[]; #endif static PyTypeObject BlenderAppType; @@ -61,24 +63,9 @@ static PyStructSequence_Desc app_info_desc = { 10 }; -static char *strip_quotes(char *buf, const char *input) -{ - int i; - strcpy(buf, input); - if(buf[0]=='\0') return buf; - while(buf[1] && (buf[0]=='"' || buf[0]=='\'')) buf++; - if(buf[0]=='\0') return buf; - i= strlen(buf) - 1; - while(i>=0 && (buf[i]=='"' || buf[i]=='\'')) i--; - buf[i+1]= '\0'; - - return buf; -} - static PyObject *make_app_info(void) { extern char bprogname[]; /* argv[0] from creator.c */ - char buf[256]; PyObject *app_info; int pos = 0; @@ -103,11 +90,11 @@ static PyObject *make_app_info(void) /* 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)); + SetStrItem(build_date); + SetStrItem(build_time); + SetStrItem(build_rev); + SetStrItem(build_platform); + SetStrItem(build_type); #else SetStrItem(strip_quotes(buf, "Unknown")); SetStrItem(strip_quotes(buf, "Unknown")); diff --git a/source/blender/python/intern/bpy_interface.c b/source/blender/python/intern/bpy_interface.c index a4acaba8611..8e93751a490 100644 --- a/source/blender/python/intern/bpy_interface.c +++ b/source/blender/python/intern/bpy_interface.c @@ -526,12 +526,6 @@ int BPY_run_python_script_space(const char *modulename, const char *func) } #endif -// #define TIME_REGISTRATION - -#ifdef TIME_REGISTRATION -//(INCLUDE_LINT)#include "PIL_time.h" -#endif - int BPY_button_eval(bContext *C, char *expr, double *value) { |