aboutsummaryrefslogtreecommitdiff
path: root/src/FbTk/Luamm.hh
diff options
context:
space:
mode:
Diffstat (limited to 'src/FbTk/Luamm.hh')
-rw-r--r--src/FbTk/Luamm.hh2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/FbTk/Luamm.hh b/src/FbTk/Luamm.hh
index f39f3de..ca012c3 100644
--- a/src/FbTk/Luamm.hh
+++ b/src/FbTk/Luamm.hh
@@ -238,7 +238,7 @@ namespace lua {
238 const char* tocstring(int index, size_t *len = NULL) { return lua_tolstring(cobj, index, len); } 238 const char* tocstring(int index, size_t *len = NULL) { return lua_tolstring(cobj, index, len); }
239 // Don't use pushclosure() to create a __gc function. The problem is that lua calls them 239 // Don't use pushclosure() to create a __gc function. The problem is that lua calls them
240 // in an unspecified order, and we may end up destroying the object holding the 240 // in an unspecified order, and we may end up destroying the object holding the
241 // std::function before we get a chance to call it. This pushes a function that simply 241 // FbTk::Slot before we get a chance to call it. This pushes a function that simply
242 // calls ~T when the time comes. Only set it as __gc on userdata of type T. 242 // calls ~T when the time comes. Only set it as __gc on userdata of type T.
243 template<typename T> 243 template<typename T>
244 void pushdestructor() { lua_pushcfunction(cobj, &destroy_cpp_object<T>); } 244 void pushdestructor() { lua_pushcfunction(cobj, &destroy_cpp_object<T>); }