aboutsummaryrefslogtreecommitdiff
path: root/src/FbTk/Luamm.hh
diff options
context:
space:
mode:
authorPavel Labath <pavelo@centrum.sk>2011-06-05 12:07:46 (GMT)
committerPavel Labath <pavelo@centrum.sk>2011-11-01 09:52:46 (GMT)
commitf64a64ca51e548e4b58f953ec220760cb4db85aa (patch)
treeb16c1d93baf3497689676a09f656d16ff1a211dd /src/FbTk/Luamm.hh
parent151d73da77ca96bedde2042520350b6b097dffdd (diff)
downloadfluxbox_pavel-f64a64ca51e548e4b58f953ec220760cb4db85aa.zip
fluxbox_pavel-f64a64ca51e548e4b58f953ec220760cb4db85aa.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.hh4
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>