use BLI_path_cmp() rather then strcmp()
authorCampbell Barton <ideasman42@gmail.com>
Thu, 8 Mar 2012 02:19:41 +0000 (02:19 +0000)
committerCampbell Barton <ideasman42@gmail.com>
Thu, 8 Mar 2012 02:19:41 +0000 (02:19 +0000)
source/blender/blenkernel/intern/dynamicpaint.c
source/blender/blenkernel/intern/image.c
source/blender/python/intern/bpy_traceback.c
source/tests/bl_run_operators.py

index 4830d7ed61e0c48a06351f9073c5f5c3732592d4..5bc3b958f2e49748d0df04df3801d89a2755fded 100644 (file)
@@ -313,8 +313,8 @@ static int surface_duplicateOutputExists(void *arg, const char *name)
        for(; surface; surface=surface->next) {
                if (surface!=t_surface && surface->type==t_surface->type &&
                        surface->format==t_surface->format) {
-                       if (surface->output_name[0]!='\0' && !strcmp(name, surface->output_name)) return 1;
-                       if (surface->output_name2[0]!='\0' && !strcmp(name, surface->output_name2)) return 1;
+                       if (surface->output_name[0]!='\0' && !BLI_path_cmp(name, surface->output_name)) return 1;
+                       if (surface->output_name2[0]!='\0' && !BLI_path_cmp(name, surface->output_name2)) return 1;
                }
        }
        return 0;
index 22e9d1ccf4bdfd7b66e1b9621a2d4d95fed790d0..3ac95b83e7418d1b77d068be4333c986e503f0c7 100644 (file)
@@ -531,13 +531,13 @@ Image *BKE_add_image_file(const char *name)
                        BLI_strncpy(strtest, ima->name, sizeof(ima->name));
                        BLI_path_abs(strtest, G.main->name);
                        
-                       if( strcmp(strtest, str)==0 ) {
+                       if (BLI_path_cmp(strtest, str)==0) {
                                if(ima->anim==NULL || ima->id.us==0) {
                                        BLI_strncpy(ima->name, name, sizeof(ima->name));        /* for stringcode */
                                        ima->id.us++;                                                                           /* officially should not, it doesn't link here! */
                                        if(ima->ok==0)
                                                ima->ok= IMA_OK;
-                       /* RETURN! */
+                                       /* RETURN! */
                                        return ima;
                                }
                        }
index e3272c9da1ab78b9a729b9f8ad13aafcc4603e1a..84d1fdd45ebd58e035aaf2c23248564324dec39a 100644 (file)
@@ -29,6 +29,8 @@
 #include <Python.h>
 #include <frameobject.h>
 
+#include "BLI_path_util.h"
+
 #include "bpy_traceback.h"
 
 static const char *traceback_filepath(PyTracebackObject *tb, PyObject **coerce)
@@ -127,8 +129,8 @@ void python_script_error_jump(const char *filepath, int *lineno, int *offset)
 
                        if (parse_syntax_error(value, &message, &filename, lineno, offset, &text)) {
                                /* python adds a '/', prefix, so check for both */
-                               if ((strcmp(filename, filepath) == 0) ||
-                                       ((filename[0] == '\\' || filename[0] == '/') && strcmp(filename + 1, filepath) == 0)
+                               if ((BLI_path_cmp(filename, filepath) == 0) ||
+                                       ((filename[0] == '\\' || filename[0] == '/') && BLI_path_cmp(filename + 1, filepath) == 0)
                                ) {
                                        /* good */
                                }
@@ -152,7 +154,7 @@ void python_script_error_jump(const char *filepath, int *lineno, int *offset)
                {
                        PyObject *coerce;
                        const char *tb_filepath = traceback_filepath(tb, &coerce);
-                       const int match = strcmp(tb_filepath, filepath) != 0;
+                       const int match = BLI_path_cmp(tb_filepath, filepath) != 0;
                        Py_DECREF(coerce);
 
                        if (match) {
index 08e9d5d59e49170107999489dcb7f5779d089882..658a6849320195e8178182de89f702a15a34b5dc 100644 (file)
@@ -42,6 +42,9 @@ op_blacklist = (
     "wm.doc_view",
     "wm.path_open",
     "help.operator_cheat_sheet",
+    "wm.keyconfig_test",     # just annoying - but harmless
+    "wm.memory_statistics",  # another annoying one
+    # "mesh.vertex_color_remove",  #crashes! fixme
     )