diff options
Diffstat (limited to 'lapi.c')
-rw-r--r-- | lapi.c | 9 |
1 files changed, 4 insertions, 5 deletions
@@ -1,5 +1,5 @@ | |||
1 | /* | 1 | /* |
2 | ** $Id: lapi.c,v 1.39 1999/02/25 19:13:56 roberto Exp roberto $ | 2 | ** $Id: lapi.c,v 1.40 1999/03/01 17:49:04 roberto Exp roberto $ |
3 | ** Lua API | 3 | ** Lua API |
4 | ** See Copyright Notice in lua.h | 4 | ** See Copyright Notice in lua.h |
5 | */ | 5 | */ |
@@ -594,18 +594,17 @@ int lua_setlocal (lua_Function func, int local_number) | |||
594 | } | 594 | } |
595 | 595 | ||
596 | 596 | ||
597 | void lua_funcinfo (lua_Object func, char **filename, int *linedefined) | 597 | void lua_funcinfo (lua_Object func, char **source, int *linedefined) { |
598 | { | ||
599 | if (!lua_isfunction(func)) | 598 | if (!lua_isfunction(func)) |
600 | lua_error("API - `funcinfo' called with a non-function value"); | 599 | lua_error("API - `funcinfo' called with a non-function value"); |
601 | else { | 600 | else { |
602 | TObject *f = luaA_protovalue(Address(func)); | 601 | TObject *f = luaA_protovalue(Address(func)); |
603 | if (normalized_type(f) == LUA_T_PROTO) { | 602 | if (normalized_type(f) == LUA_T_PROTO) { |
604 | *filename = tfvalue(f)->fileName->str; | 603 | *source = tfvalue(f)->source->str; |
605 | *linedefined = tfvalue(f)->lineDefined; | 604 | *linedefined = tfvalue(f)->lineDefined; |
606 | } | 605 | } |
607 | else { | 606 | else { |
608 | *filename = "(C)"; | 607 | *source = "(C)"; |
609 | *linedefined = -1; | 608 | *linedefined = -1; |
610 | } | 609 | } |
611 | } | 610 | } |