diff options
author | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 1997-04-03 15:24:23 -0300 |
---|---|---|
committer | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 1997-04-03 15:24:23 -0300 |
commit | d0339e7b726219dfbbf3b19a7cb2429c8b74841e (patch) | |
tree | 3c6bcca2b2c80633df0f6cf0e5c7c49585fefd54 | |
parent | 075b7918c3dcc1e8b4d5e7f19ae213b081e01bf2 (diff) | |
download | lua-d0339e7b726219dfbbf3b19a7cb2429c8b74841e.tar.gz lua-d0339e7b726219dfbbf3b19a7cb2429c8b74841e.tar.bz2 lua-d0339e7b726219dfbbf3b19a7cb2429c8b74841e.zip |
"setintmethod" returns old method (to be coerent with seterrormethod).
obs: version 2 is due to internal methods.
-rw-r--r-- | fallback.c | 3 |
1 files changed, 2 insertions, 1 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.37 1997/04/02 22:52:42 roberto Exp roberto $"; | 6 | char *rcs_fallback="$Id: fallback.c,v 1.38 1997/04/02 23:04:12 roberto Exp roberto $"; |
7 | 7 | ||
8 | #include <stdio.h> | 8 | #include <stdio.h> |
9 | #include <string.h> | 9 | #include <string.h> |
@@ -243,6 +243,7 @@ void luaI_setintmethod (void) | |||
243 | lua_error("cannot change this internal method"); | 243 | lua_error("cannot change this internal method"); |
244 | luaL_arg_check(lua_isnil(func) || lua_isfunction(func), "setintmethod", | 244 | luaL_arg_check(lua_isnil(func) || lua_isfunction(func), "setintmethod", |
245 | 3, "function expected"); | 245 | 3, "function expected"); |
246 | luaI_pushobject(&luaI_IMtable[-t].int_method[e]); | ||
246 | luaI_IMtable[-t].int_method[e] = *luaI_Address(func); | 247 | luaI_IMtable[-t].int_method[e] = *luaI_Address(func); |
247 | } | 248 | } |
248 | 249 | ||