Created
November 1, 2012 05:25
-
-
Save johnbartholomew/3992010 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
template <typename T> struct ForceConstRef { typedef const T& type; }; | |
template <typename T> struct ForceConstRef<const T&> { typedef const T& type; }; | |
template <typename T> struct ForceConstRef<const T> { typedef const T& type; }; | |
template <typename T> struct ForceConstRef<T&> { typedef const T& type; }; | |
template <typename T0, typename T1> | |
class LuaSignalTrampoline : public LuaSignalTrampolineBase { | |
public: | |
typedef typename ForceConstRef<T0>::type type0; | |
typedef typename ForceConstRef<T1>::type type1; | |
static inline bool trampoline(type0 arg0, type1 arg1, lua_State *l, int idx) { | |
_trampoline_start(l, idx); | |
pi_lua_generic_push(l, arg0); | |
pi_lua_generic_push(l, arg1); | |
return _trampoline_end(l, 2); | |
} | |
static inline void trampoline_void(type0 arg0, type1 arg1, lua_State *l, int idx) { | |
trampoline(arg0, arg1, l, idx); | |
} | |
}; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment