aboutsummaryrefslogtreecommitdiff
path: root/src/FbTk/Luamm.cc
diff options
context:
space:
mode:
authorPavel Labath <pavelo@centrum.sk>2011-05-19 11:25:32 (GMT)
committerPaul Tagliamonte <paultag@fluxbox.org>2012-04-07 02:10:13 (GMT)
commit789b365e3b46ddc9d1a8591cf4d58bc7a3a60835 (patch)
tree491533cf8055f24679b484397f75ba3ecd4ef4ef /src/FbTk/Luamm.cc
parentf3a7c05e55f995d0a83961078a319ad73be56177 (diff)
downloadfluxbox_paul-789b365e3b46ddc9d1a8591cf4d58bc7a3a60835.zip
fluxbox_paul-789b365e3b46ddc9d1a8591cf4d58bc7a3a60835.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)