diff options
author | Pavel Labath <pavelo@centrum.sk> | 2011-06-05 12:07:46 (GMT) |
---|---|---|
committer | Pavel Labath <pavelo@centrum.sk> | 2011-06-15 23:07:45 (GMT) |
commit | 64793e8ae52f2328c33c8dd54cb65b4a38f1fcea (patch) | |
tree | 0d0c3b4417635a68e381b5dac6775a3cf33a283f /src/FbTk/Luamm.hh | |
parent | 2e24590bf815f588c98686f176db881b1d392d55 (diff) | |
download | fluxbox_pavel-64793e8ae52f2328c33c8dd54cb65b4a38f1fcea.zip fluxbox_pavel-64793e8ae52f2328c33c8dd54cb65b4a38f1fcea.tar.bz2 |
luamm: add a version of loadstring which also takes the string length as a parameter
Diffstat (limited to 'src/FbTk/Luamm.hh')
-rw-r--r-- | src/FbTk/Luamm.hh | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/FbTk/Luamm.hh b/src/FbTk/Luamm.hh index 218eea9..0ebe6ef 100644 --- a/src/FbTk/Luamm.hh +++ b/src/FbTk/Luamm.hh | |||
@@ -23,6 +23,7 @@ | |||
23 | #define FBTK_LUAMM_HH | 23 | #define FBTK_LUAMM_HH |
24 | 24 | ||
25 | #include <assert.h> | 25 | #include <assert.h> |
26 | #include <cstring> | ||
26 | #include <memory> | 27 | #include <memory> |
27 | #include <stdexcept> | 28 | #include <stdexcept> |
28 | 29 | ||
@@ -255,7 +256,8 @@ namespace lua { | |||
255 | void getglobal(const char *name) { getfield(GLOBALSINDEX, name); } | 256 | void getglobal(const char *name) { getfield(GLOBALSINDEX, name); } |
256 | bool lessthan(int index1, int index2); | 257 | bool lessthan(int index1, int index2); |
257 | void loadfile(const char *filename) throw(lua::syntax_error, lua::file_error, std::bad_alloc); | 258 | void loadfile(const char *filename) throw(lua::syntax_error, lua::file_error, std::bad_alloc); |
258 | void loadstring(const char *s) throw(lua::syntax_error, std::bad_alloc); | 259 | void loadstring(const char *s, const char *chunkname = NULL) throw(lua::syntax_error, std::bad_alloc) { loadstring(s, strlen(s), chunkname); } |
260 | void loadstring(const char *s, size_t len, const char *chunkname = NULL) throw(lua::syntax_error, std::bad_alloc); | ||
259 | bool next(int index); | 261 | bool next(int index); |
260 | // register is a reserved word :/ | 262 | // register is a reserved word :/ |
261 | template<typename Functor> | 263 | template<typename Functor> |