aboutsummaryrefslogtreecommitdiff
path: root/src/FbTk/Luamm.hh
diff options
context:
space:
mode:
authorPavel Labath <pavelo@centrum.sk>2011-05-19 12:58:31 (GMT)
committerPavel Labath <pavelo@centrum.sk>2011-11-01 09:52:45 (GMT)
commit230269bf4fbb051dde7f7b5b10f2d3841ebc06a2 (patch)
treebbcda2a976a0002a43a912013ba1502c6a39cd1c /src/FbTk/Luamm.hh
parentb4117e5dce073c02bf66b336b8eed1ce413cdc92 (diff)
downloadfluxbox_pavel-230269bf4fbb051dde7f7b5b10f2d3841ebc06a2.zip
fluxbox_pavel-230269bf4fbb051dde7f7b5b10f2d3841ebc06a2.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.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>); }