@@ -83,6 +83,11 @@ namespace df {
8383 typedef RT type; \
8484 typedef CT class_type; \
8585 static const bool is_method = true ; \
86+ }; \
87+ template <FW_TARGSC class RT , class CT > struct return_type <RT (CT ::*) FArgs const > { \
88+ typedef RT type; \
89+ typedef CT class_type; \
90+ static const bool is_method = true ; \
8691 };
8792
8893#define INSTANTIATE_WRAPPERS2 (Count, FArgs, Args, Loads ) \
@@ -99,10 +104,20 @@ namespace df {
99104 static void execute (lua_State *state, int base, void (CT ::*cb) FArgs) { \
100105 LOAD_CLASS () Loads; INVOKE_VOID ((self->*cb) Args); } \
101106 }; \
107+ template <FW_TARGSC class CT > struct function_wrapper <void (CT ::*) FArgs const , true > { \
108+ static const int num_args = Count+1 ; \
109+ static void execute (lua_State *state, int base, void (CT ::*cb) FArgs const ) { \
110+ LOAD_CLASS () Loads; INVOKE_VOID ((self->*cb) Args); } \
111+ }; \
102112 template <FW_TARGSC class RT , class CT > struct function_wrapper <RT (CT ::*) FArgs, false > { \
103113 static const int num_args = Count+1 ; \
104114 static void execute (lua_State *state, int base, RT (CT ::*cb) FArgs) { \
105115 LOAD_CLASS (); Loads; INVOKE_RV ((self->*cb) Args); } \
116+ }; \
117+ template <FW_TARGSC class RT , class CT > struct function_wrapper <RT (CT ::*) FArgs const , false > { \
118+ static const int num_args = Count+1 ; \
119+ static void execute (lua_State *state, int base, RT (CT ::*cb) FArgs const ) { \
120+ LOAD_CLASS (); Loads; INVOKE_RV ((self->*cb) Args); } \
106121 };
107122
108123#define INSTANTIATE_WRAPPERS (Count, FArgs, OFArgs, Args, OArgs, Loads ) \
0 commit comments