evas filters: Disable extra debug

Forgot to remove that! It's better to disable for the release,
DBG() and XDBG() are disabled anyway.

CID 1308611
This commit is contained in:
Jean-Philippe Andre 2017-08-02 20:00:49 +09:00
parent de99a71c43
commit b10be4e2ed
2 changed files with 15 additions and 12 deletions

View File

@ -2231,26 +2231,29 @@ static inline void
_lua_import_path_get(char *path, size_t len, const char *name) _lua_import_path_get(char *path, size_t len, const char *name)
{ {
const char *pfx = _evas_module_datadir_get(); const char *pfx = _evas_module_datadir_get();
size_t r; size_t r = 0;
#ifdef FILTERS_DEBUG #ifdef FILTERS_DEBUG
// This is a hack to fetch the most recent file from source // This is a hack to fetch the most recent file from source
char *sep = evas_file_path_join("", ""); char *sep = evas_file_path_join("", "");
char *src = strdup(__FILE__); char *src = strdup(__FILE__);
char *slash = strrchr(src, *sep);
struct stat st; struct stat st;
if (slash) if (sep && src)
{ {
*slash = '\0'; char *slash = strrchr(src, *sep);
if (*src == '/') if (slash)
r = snprintf(path, len - 1, "%s/lua/%s.lua", src, name); {
else // abs_srcdir is unknown here *slash = '\0';
r = snprintf(path, len - 1, "%s/src/%s/lua/%s.lua", PACKAGE_BUILD_DIR, src, name); if (*src == '/')
if (r >= len) path[len - 1] = '\0'; r = snprintf(path, len - 1, "%s/lua/%s.lua", src, name);
else // abs_srcdir is unknown here
r = snprintf(path, len - 1, "%s/src/%s/lua/%s.lua", PACKAGE_BUILD_DIR, src, name);
if (r >= len) path[len - 1] = '\0';
}
} }
free(sep); free(sep);
free(src); free(src);
if (!stat(path, &st)) return; if (r && !stat(path, &st)) return;
#endif #endif
r = snprintf(path, len - 1, "%s/filters/lua/%s.lua", pfx ? pfx : ".", name); r = snprintf(path, len - 1, "%s/filters/lua/%s.lua", pfx ? pfx : ".", name);

View File

@ -32,9 +32,9 @@
# endif # endif
#endif /* ! _WIN32 */ #endif /* ! _WIN32 */
//#ifdef DEBUG #ifdef DEBUG
# define FILTERS_DEBUG # define FILTERS_DEBUG
//#endif #endif
typedef struct _Evas_Filter_Instruction Evas_Filter_Instruction; typedef struct _Evas_Filter_Instruction Evas_Filter_Instruction;
typedef struct _Evas_Filter_Buffer Evas_Filter_Buffer; typedef struct _Evas_Filter_Buffer Evas_Filter_Buffer;