aboutsummaryrefslogtreecommitdiff
path: root/src/FbTk/Luamm.hh
diff options
context:
space:
mode:
authorPavel Labath <pavelo@centrum.sk>2011-06-05 12:07:46 (GMT)
committerPaul Tagliamonte <paultag@fluxbox.org>2012-04-07 02:10:13 (GMT)
commitf1376883a6cb68bb692b6031c9560e0409649573 (patch)
treecaadd43d32a09b474fe5f4fa4cc9a7dde326615a /src/FbTk/Luamm.hh
parent106cedd4d118998288cd0d9f62c5103846dddd2c (diff)
downloadfluxbox_paul-f1376883a6cb68bb692b6031c9560e0409649573.zip
fluxbox_paul-f1376883a6cb68bb692b6031c9560e0409649573.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>