From c44f577d192ef14d11707e358973cf14bc4beb0d Mon Sep 17 00:00:00 2001 From: MisterKH Date: Thu, 5 May 2016 15:12:25 +0200 Subject: [PATCH] add load_buffer function --- sol/state_view.hpp | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/sol/state_view.hpp b/sol/state_view.hpp index d1cee143..3844cf4a 100644 --- a/sol/state_view.hpp +++ b/sol/state_view.hpp @@ -168,6 +168,12 @@ public: return load_result(L, -1, 1, 1, x); } + load_result load_buffer(const char *buff, size_t size, const char *name) + { + load_status x = static_cast(luaL_loadbuffer(L, buff, size, name)); + return load_result(L, -1, 1, 1, x); + } + iterator begin () const { return global.begin(); }