diff options
author | Campbell Barton <ideasman42@gmail.com> | 2012-03-08 06:19:41 +0400 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2012-03-08 06:19:41 +0400 |
commit | 1c91d62c7e682c72173750e88505ba08f6fabcdf (patch) | |
tree | 0a4e1fce12f509453f55de5a6ed7f732bb579999 /source/blender/python | |
parent | 6029640bcae139d4df59be1b4de5645d4ee251a3 (diff) |
use BLI_path_cmp() rather then strcmp()
Diffstat (limited to 'source/blender/python')
-rw-r--r-- | source/blender/python/intern/bpy_traceback.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/source/blender/python/intern/bpy_traceback.c b/source/blender/python/intern/bpy_traceback.c index e3272c9da1a..84d1fdd45eb 100644 --- a/source/blender/python/intern/bpy_traceback.c +++ b/source/blender/python/intern/bpy_traceback.c @@ -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) { |