blob: 5d2178d0ee378a573f4143d04e7031b8c5dcfb33 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
|
This file is part of MXE. See LICENSE.md for licensing information.
commit eb4c3507be8a468da07d6ad9f8019c90fbd31b76
Author: Boris Nagaev <bnagaev@gmail.com>
Date: Fri Aug 22 16:24:28 2014 +0400
lua_getfenv/lua_setfenv
diff --git a/src/object_rep.cpp b/src/object_rep.cpp
index 6977bee..bd322e1 100755
--- a/src/object_rep.cpp
+++ b/src/object_rep.cpp
@@ -25,6 +25,15 @@
#include <luabind/detail/object_rep.hpp>
#include <luabind/detail/class_rep.hpp>
+// http://lua-users.org/lists/lua-l/2010-01/msg00516.html
+
+#ifndef LUA_ENVIRONINDEX
+
+#define lua_getfenv lua_getuservalue
+#define lua_setfenv lua_setuservalue
+
+#endif
+
namespace luabind { namespace detail
{
|