diff options
author | dshaligram <dshaligram@c06c8d41-db1a-0410-9941-cceddc491573> | 2007-06-22 12:26:53 +0000 |
---|---|---|
committer | dshaligram <dshaligram@c06c8d41-db1a-0410-9941-cceddc491573> | 2007-06-22 12:26:53 +0000 |
commit | abb8fd86e78c57461f6729faafec5ea35ccd18a9 (patch) | |
tree | c262a150967152852cb015ddcd12a08530aedf7f /crawl-ref/source/clua.h | |
parent | 609ccd171cbe8473c0a03c47392a12e72de2baaa (diff) | |
download | crawl-ref-abb8fd86e78c57461f6729faafec5ea35ccd18a9.tar.gz crawl-ref-abb8fd86e78c57461f6729faafec5ea35ccd18a9.zip |
Pull c_macro out of the code and into clua/macro.lua.
User-script dofile and loadfile check for "clua" anywhere in the file name and
refuse to load the file in that case; only core Crawl code can load Lua files
from clua/*.
git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@1622 c06c8d41-db1a-0410-9941-cceddc491573
Diffstat (limited to 'crawl-ref/source/clua.h')
-rw-r--r-- | crawl-ref/source/clua.h | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/crawl-ref/source/clua.h b/crawl-ref/source/clua.h index 419d34c908..0ec9723544 100644 --- a/crawl-ref/source/clua.h +++ b/crawl-ref/source/clua.h @@ -64,7 +64,7 @@ public: void getregistry(const char *name); int execstring(const char *str, const char *context = "init.txt"); - int execfile(const char *filename); + int execfile(const char *filename, bool trusted = false); bool callbooleanfn(bool defval, const char *fn, const char *params, ...); bool callfn(const char *fn, int nargs, int nret = 1); @@ -73,8 +73,8 @@ public: bool runhook(const char *hook, const char *params, ...); static int file_write(lua_State *ls); - static int loadfile(lua_State *ls, const char *file); - static bool is_path_safe(const char *file); + static int loadfile(lua_State *ls, const char *file, bool trusted = false); + static bool is_path_safe(std::string file, bool trusted = false); public: std::string error; |