diff options
Diffstat (limited to 'fallback.c')
-rw-r--r-- | fallback.c | 13 |
1 files changed, 11 insertions, 2 deletions
@@ -3,7 +3,7 @@ | |||
3 | ** TecCGraf - PUC-Rio | 3 | ** TecCGraf - PUC-Rio |
4 | */ | 4 | */ |
5 | 5 | ||
6 | char *rcs_fallback="$Id: fallback.c,v 1.36 1997/03/31 20:59:09 roberto Exp roberto $"; | 6 | char *rcs_fallback="$Id: fallback.c,v 1.37 1997/04/02 22:52:42 roberto Exp roberto $"; |
7 | 7 | ||
8 | #include <stdio.h> | 8 | #include <stdio.h> |
9 | #include <string.h> | 9 | #include <string.h> |
@@ -223,6 +223,16 @@ TObject *luaI_getim (int tag, IMS event) | |||
223 | } | 223 | } |
224 | 224 | ||
225 | 225 | ||
226 | void luaI_getintmethod (void) | ||
227 | { | ||
228 | int t = (int)luaL_check_number(1, "getintmethod"); | ||
229 | int e = luaI_checkevent(luaL_check_string(2, "getintmethod"), luaI_eventname); | ||
230 | checktag(t); | ||
231 | if (validevent(t, e)) | ||
232 | luaI_pushobject(&luaI_IMtable[-t].int_method[e]); | ||
233 | } | ||
234 | |||
235 | |||
226 | void luaI_setintmethod (void) | 236 | void luaI_setintmethod (void) |
227 | { | 237 | { |
228 | int t = (int)luaL_check_number(1, "setintmethod"); | 238 | int t = (int)luaL_check_number(1, "setintmethod"); |
@@ -233,7 +243,6 @@ void luaI_setintmethod (void) | |||
233 | lua_error("cannot change this internal method"); | 243 | lua_error("cannot change this internal method"); |
234 | luaL_arg_check(lua_isnil(func) || lua_isfunction(func), "setintmethod", | 244 | luaL_arg_check(lua_isnil(func) || lua_isfunction(func), "setintmethod", |
235 | 3, "function expected"); | 245 | 3, "function expected"); |
236 | luaI_pushobject(&luaI_IMtable[-t].int_method[e]); | ||
237 | luaI_IMtable[-t].int_method[e] = *luaI_Address(func); | 246 | luaI_IMtable[-t].int_method[e] = *luaI_Address(func); |
238 | } | 247 | } |
239 | 248 | ||