diff options
author | Pavel Labath <pavelo@centrum.sk> | 2011-05-19 12:58:31 (GMT) |
---|---|---|
committer | Pavel Labath <pavelo@centrum.sk> | 2013-02-16 23:19:15 (GMT) |
commit | d2c2c4f33a59b419145c33536fb7ea7acb36faf1 (patch) | |
tree | d4155e4fe5b22c3e10bff3f4f234d091f20f07b6 /src/FbTk/Luamm.hh | |
parent | 08e6c68912fdbf7c7f2011a3a754bbc8731fd231 (diff) | |
download | fluxbox_pavel-d2c2c4f33a59b419145c33536fb7ea7acb36faf1.zip fluxbox_pavel-d2c2c4f33a59b419145c33536fb7ea7acb36faf1.tar.bz2 |
Remove the possibility to transport exceptions through lua code
It's impossible to do this without C++0x features (we need std::exception_ptr).
Diffstat (limited to 'src/FbTk/Luamm.hh')
-rw-r--r-- | src/FbTk/Luamm.hh | 2 |
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>); } |