aboutsummaryrefslogtreecommitdiff
path: root/src/FbTk/Luamm.cc
diff options
context:
space:
mode:
authorPavel Labath <pavelo@centrum.sk>2011-05-19 11:25:32 (GMT)
committerPavel Labath <pavelo@centrum.sk>2011-11-01 09:52:45 (GMT)
commit7a9411dde66117e9d6e1019e0dd9209ab18e78ed (patch)
treef12a07d1d1d5d9bd64b290b9c6cbefb96b3e4758 /src/FbTk/Luamm.cc
parent1f5591aae5b2ffbd4e1c96aa4ca9442857921264 (diff)
downloadfluxbox_pavel-7a9411dde66117e9d6e1019e0dd9209ab18e78ed.zip
fluxbox_pavel-7a9411dde66117e9d6e1019e0dd9209ab18e78ed.tar.bz2
c++ lua binding: get rid of deleted functions and rvalue references
Diffstat (limited to 'src/FbTk/Luamm.cc')
-rw-r--r--src/FbTk/Luamm.cc15
1 files changed, 11 insertions, 4 deletions
diff --git a/src/FbTk/Luamm.cc b/src/FbTk/Luamm.cc
index 81a8fb3..d17096f 100644
--- a/src/FbTk/Luamm.cc
+++ b/src/FbTk/Luamm.cc
@@ -108,10 +108,6 @@ namespace lua {
108 /* 108 /*
109 * This function is called when lua encounters an error outside of any protected 109 * This function is called when lua encounters an error outside of any protected
110 * environment 110 * environment
111 * Throwing the exception through lua code appears to work, even if it was compiled
112 * without -fexceptions. If it turns out, it fails in some conditions, it could be
113 * replaced with some longjmp() magic. But that shouldn't be necessary, as this function
114 * will not be called under normal conditions (we execute everything in protected mode).
115 */ 111 */
116 int panic_throw(lua_State *l) 112 int panic_throw(lua_State *l)
117 { 113 {
@@ -191,6 +187,17 @@ namespace lua {
191 L->pop(1); 187 L->pop(1);
192 } 188 }
193 189
190 exception::exception(const exception &other)
191 : std::runtime_error(other), L(other.L)
192 {
193 L->checkstack(2);
194
195 L->rawgetfield(REGISTRYINDEX, lua_exception_namespace);
196 L->rawgeti(-1, other.key);
197 key = L->ref(-2);
198 L->pop(1);
199 }
200
194 exception::~exception() throw() 201 exception::~exception() throw()
195 { 202 {
196 if(not L) 203 if(not L)