mirror of
https://github.com/lua/lua
synced 2024-11-26 06:39:41 +03:00
details
This commit is contained in:
parent
328d53e77b
commit
8e9b1e4ae9
@ -1,5 +1,5 @@
|
||||
/*
|
||||
** $Id: lobject.h,v 1.110 2001/08/27 15:16:28 roberto Exp $
|
||||
** $Id: lobject.h,v 1.112 2001/09/07 17:39:10 roberto Exp $
|
||||
** Type definitions for Lua objects
|
||||
** See Copyright Notice in lua.h
|
||||
*/
|
||||
@ -178,8 +178,8 @@ typedef struct UpVal {
|
||||
** Closures
|
||||
*/
|
||||
typedef struct Closure {
|
||||
int isC; /* 0 for Lua functions, 1 for C functions */
|
||||
int nupvalues;
|
||||
short isC; /* 0 for Lua functions, 1 for C functions */
|
||||
short nupvalues;
|
||||
struct Closure *next;
|
||||
struct Closure *mark; /* marked closures (point to itself when not marked) */
|
||||
union {
|
||||
|
8
lua.c
8
lua.c
@ -1,5 +1,5 @@
|
||||
/*
|
||||
** $Id: lua.c,v 1.68 2001/06/11 14:57:17 roberto Exp $
|
||||
** $Id: lua.c,v 1.69 2001/08/30 20:54:02 roberto Exp $
|
||||
** Lua stand-alone interpreter
|
||||
** See Copyright Notice in lua.h
|
||||
*/
|
||||
@ -196,7 +196,7 @@ static void manual_input (int version, int prompt) {
|
||||
}
|
||||
if (firstline && buffer[0] == l_c('=')) {
|
||||
buffer[0] = l_c(' ');
|
||||
lua_pushstring(L, l_s("return "));
|
||||
lua_pushstring(L, l_s("return"));
|
||||
toprint = 1;
|
||||
}
|
||||
l = strlen(buffer);
|
||||
@ -212,8 +212,8 @@ static void manual_input (int version, int prompt) {
|
||||
}
|
||||
lua_concat(L, lua_gettop(L));
|
||||
ldo(lua_dostring, lua_tostring(L, 1), 0);
|
||||
if (toprint) {
|
||||
lua_remove(L, 1); /* remove ran string */
|
||||
lua_remove(L, 1); /* remove ran string */
|
||||
if (toprint && lua_gettop(L) > 0) { /* any result to print? */
|
||||
lua_getglobal(L, l_s("print"));
|
||||
lua_insert(L, 1);
|
||||
lua_call(L, lua_gettop(L)-1, 0);
|
||||
|
Loading…
Reference in New Issue
Block a user