From a40b92b8e3e13e131fc3f31bb6d126e033236b3e Mon Sep 17 00:00:00 2001 From: Pavel Labath Date: Sat, 2 Jul 2011 23:53:24 +0200 Subject: Add a version of lua::state::loadstring which accepts std::string --- src/FbTk/Luamm.hh | 1 + 1 file changed, 1 insertion(+) diff --git a/src/FbTk/Luamm.hh b/src/FbTk/Luamm.hh index 1ba9cbe..d853120 100644 --- a/src/FbTk/Luamm.hh +++ b/src/FbTk/Luamm.hh @@ -271,6 +271,7 @@ namespace lua { void loadfile(const char *filename) throw(lua::syntax_error, lua::file_error, std::bad_alloc); void loadstring(const char *s, const char *chunkname = NULL) throw(lua::syntax_error, std::bad_alloc) { loadstring(s, strlen(s), chunkname); } void loadstring(const char *s, size_t len, const char *chunkname = NULL) throw(lua::syntax_error, std::bad_alloc); + void loadstring(const std::string &s, const char *chunkname = NULL) throw(lua::syntax_error, std::bad_alloc) { loadstring(s.c_str(), s.length(), chunkname); } bool next(int index); // register is a reserved word :/ template -- cgit v0.11.2