bug: lua_getlocal breaks when called with a CFunction.
This commit is contained in:
2
bugs
2
bugs
@@ -1,3 +1,3 @@
|
|||||||
- arquivo comecando com # fica com numero da linha defazado (inout.c 2.69)
|
- arquivo comecando com # fica com numero da linha defazado (inout.c 2.69)
|
||||||
- LUA_COMPAT2_5 escrito errado em opcode.c (faltou o LUA_)
|
- LUA_COMPAT2_5 escrito errado em opcode.c (faltou o LUA_)
|
||||||
-
|
- opcode.c
|
||||||
|
|||||||
5
opcode.c
5
opcode.c
@@ -3,7 +3,7 @@
|
|||||||
** TecCGraf - PUC-Rio
|
** TecCGraf - PUC-Rio
|
||||||
*/
|
*/
|
||||||
|
|
||||||
char *rcs_opcode="$Id: opcode.c,v 4.17 1997/07/04 14:55:37 roberto Exp roberto $";
|
char *rcs_opcode="$Id: opcode.c,v 4.18 1997/07/29 13:35:06 roberto Exp roberto $";
|
||||||
|
|
||||||
#include <setjmp.h>
|
#include <setjmp.h>
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
@@ -538,6 +538,9 @@ int lua_currentline (lua_Function func)
|
|||||||
lua_Object lua_getlocal (lua_Function func, int local_number, char **name)
|
lua_Object lua_getlocal (lua_Function func, int local_number, char **name)
|
||||||
{
|
{
|
||||||
TObject *f = luaI_Address(func);
|
TObject *f = luaI_Address(func);
|
||||||
|
/* check whether func is a Lua function */
|
||||||
|
if (ttype(f) != LUA_T_MARK && ttype(f) != LUA_T_FUNCTION)
|
||||||
|
return LUA_NOOBJECT;
|
||||||
*name = luaI_getlocalname(f->value.tf, local_number, lua_currentline(func));
|
*name = luaI_getlocalname(f->value.tf, local_number, lua_currentline(func));
|
||||||
if (*name)
|
if (*name)
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in New Issue
Block a user