diff options
author | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 1999-03-04 18:23:39 -0300 |
---|---|---|
committer | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 1999-03-04 18:23:39 -0300 |
commit | 5a8bb00df443dfdb5708689f32c64e90f2557bf8 (patch) | |
tree | f0328ef79978ce9bd8ceb63fdef2299b74c87490 /lapi.c | |
parent | 677188de8aa0c4ed49a3db570f0c9ee7cd641ddc (diff) | |
download | lua-5a8bb00df443dfdb5708689f32c64e90f2557bf8.tar.gz lua-5a8bb00df443dfdb5708689f32c64e90f2557bf8.tar.bz2 lua-5a8bb00df443dfdb5708689f32c64e90f2557bf8.zip |
storing chunk "sources" instead of "filenames".
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 | } |