diff options
Diffstat (limited to 'src/lindafactory.cpp')
-rw-r--r-- | src/lindafactory.cpp | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/lindafactory.cpp b/src/lindafactory.cpp index 1a8782e..0ec5a0a 100644 --- a/src/lindafactory.cpp +++ b/src/lindafactory.cpp | |||
@@ -34,6 +34,9 @@ THE SOFTWARE. | |||
34 | 34 | ||
35 | #include "linda.h" | 35 | #include "linda.h" |
36 | 36 | ||
37 | // must be a #define instead of a constexpr to work with lua_pushliteral (until I templatize it) | ||
38 | #define kLindaMetatableName "Linda" | ||
39 | |||
37 | // ################################################################################################# | 40 | // ################################################################################################# |
38 | 41 | ||
39 | void LindaFactory::createMetatable(lua_State* L_) const | 42 | void LindaFactory::createMetatable(lua_State* L_) const |
@@ -45,7 +48,7 @@ void LindaFactory::createMetatable(lua_State* L_) const | |||
45 | lua_setfield(L_, -2, "__index"); | 48 | lua_setfield(L_, -2, "__index"); |
46 | 49 | ||
47 | // protect metatable from external access | 50 | // protect metatable from external access |
48 | lua_pushliteral(L_, "Linda"); | 51 | lua_pushliteral(L_, kLindaMetatableName); |
49 | lua_setfield(L_, -2, "__metatable"); | 52 | lua_setfield(L_, -2, "__metatable"); |
50 | 53 | ||
51 | // the linda functions | 54 | // the linda functions |