diff options
author | Soumith Chintala <soumith@fb.com> | 2014-10-27 18:30:31 +0300 |
---|---|---|
committer | Soumith Chintala <soumith@fb.com> | 2014-10-27 18:30:31 +0300 |
commit | 5ca8bbe02ace0970c346938157614e8eec7c1b19 (patch) | |
tree | 14beaf50732b3bda9637a610ce0d6cb91b6e8b52 | |
parent | 4aebd7d7ca4d4146a4809b5c8cae818a93f08a60 (diff) |
adding lua52 compatibility
-rw-r--r-- | paths.c | 7 |
1 files changed, 7 insertions, 0 deletions
@@ -985,6 +985,10 @@ static int readable (const char *filename) return 1; } +#ifndef LUA_PATHSEP /* LUA52 compatibility defs */ +#define LUA_PATHSEP ';' +#define PATHS_LUA_CLEANUP_DEFS 1 +#endif static const char *pushnexttemplate (lua_State *L, const char *path) { const char *l; @@ -995,6 +999,9 @@ static const char *pushnexttemplate (lua_State *L, const char *path) lua_pushlstring(L, path, l - path); /* template */ return l; } +#ifdef PATHS_LUA_CLEANUP_DEFS /* cleanup after yourself */ +#undef LUA_PATHSEP +#endif static const char *pushfilename (lua_State *L, const char *name) { |