diff options
author | Pavel Labath <pavelo@centrum.sk> | 2011-05-19 12:58:31 (GMT) |
---|---|---|
committer | Pavel Labath <pavelo@centrum.sk> | 2011-06-15 15:59:22 (GMT) |
commit | 0e23f87962ac85e77fd344b054495017a0f48f57 (patch) | |
tree | af8c9fd33e210392f25500424a3471e72bece059 /src/FbTk/Luamm.hh | |
parent | 6d52dced6ca025c713bd2136315a529e9c18239d (diff) | |
download | fluxbox_pavel-0e23f87962ac85e77fd344b054495017a0f48f57.zip fluxbox_pavel-0e23f87962ac85e77fd344b054495017a0f48f57.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>); } |