aboutsummaryrefslogtreecommitdiff
path: root/src/FbTk/Luamm.hh
diff options
context:
space:
mode:
authorPavel Labath <pavelo@centrum.sk>2011-07-07 22:24:40 (GMT)
committerPavel Labath <pavelo@centrum.sk>2011-07-08 13:36:58 (GMT)
commit613df819d690dbe8cdec97457bcf538e980093ae (patch)
tree37bfb2e72e2d9ecb42487cf5f7d55fbc06378db2 /src/FbTk/Luamm.hh
parent8addf3e9c6e50dc85d2a5d7840a752a56b2258da (diff)
downloadfluxbox_pavel-613df819d690dbe8cdec97457bcf538e980093ae.zip
fluxbox_pavel-613df819d690dbe8cdec97457bcf538e980093ae.tar.bz2
A lightweight version of lua::state::pushclosure which handles the simple cases
Diffstat (limited to 'src/FbTk/Luamm.hh')
-rw-r--r--src/FbTk/Luamm.hh3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/FbTk/Luamm.hh b/src/FbTk/Luamm.hh
index 05cb569..96a5eea 100644
--- a/src/FbTk/Luamm.hh
+++ b/src/FbTk/Luamm.hh
@@ -237,9 +237,10 @@ namespace lua {
237 void newtable() { lua_newtable(cobj); } 237 void newtable() { lua_newtable(cobj); }
238 void *newuserdata(size_t size) { return lua_newuserdata(cobj, size); } 238 void *newuserdata(size_t size) { return lua_newuserdata(cobj, size); }
239 // Functor can be anything that FbTk::Slot can handle, everything else remains 239 // Functor can be anything that FbTk::Slot can handle, everything else remains
240 // identical 240 // identical. We also provide a specialized, lightweight version for simple functors
241 template<typename Functor> 241 template<typename Functor>
242 void pushclosure(const Functor &fn, int n); 242 void pushclosure(const Functor &fn, int n);
243 void pushclosure(int (*fn)(state *), int n);
243 template<typename Functor> 244 template<typename Functor>
244 void pushfunction(const Functor &fn) { pushclosure(fn, 0); } 245 void pushfunction(const Functor &fn) { pushclosure(fn, 0); }
245 void pushstring(const char *s) { lua_pushstring(cobj, s); } 246 void pushstring(const char *s) { lua_pushstring(cobj, s); }