mirror of
https://github.com/lua/lua.git
synced 2025-02-04 06:13:04 +08:00
detail
This commit is contained in:
parent
39cdbce23e
commit
be666a662b
5
lua.c
5
lua.c
@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
** $Id: lua.c,v 1.146 2005/06/28 13:01:50 roberto Exp roberto $
|
** $Id: lua.c,v 1.147 2005/08/25 15:39:16 roberto Exp roberto $
|
||||||
** Lua stand-alone interpreter
|
** Lua stand-alone interpreter
|
||||||
** See Copyright Notice in lua.h
|
** See Copyright Notice in lua.h
|
||||||
*/
|
*/
|
||||||
@ -137,8 +137,7 @@ static int dolibrary (lua_State *L, const char *name) {
|
|||||||
|
|
||||||
static const char *get_prompt (lua_State *L, int firstline) {
|
static const char *get_prompt (lua_State *L, int firstline) {
|
||||||
const char *p;
|
const char *p;
|
||||||
lua_pushstring(L, firstline ? "_PROMPT" : "_PROMPT2");
|
lua_getfield(L, LUA_GLOBALSINDEX, firstline ? "_PROMPT" : "_PROMPT2");
|
||||||
lua_rawget(L, LUA_GLOBALSINDEX);
|
|
||||||
p = lua_tostring(L, -1);
|
p = lua_tostring(L, -1);
|
||||||
if (p == NULL) p = (firstline ? LUA_PROMPT : LUA_PROMPT2);
|
if (p == NULL) p = (firstline ? LUA_PROMPT : LUA_PROMPT2);
|
||||||
lua_pop(L, 1); /* remove global */
|
lua_pop(L, 1); /* remove global */
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
** $Id: luaconf.h,v 1.60 2005/08/17 18:32:09 roberto Exp roberto $
|
** $Id: luaconf.h,v 1.61 2005/08/22 19:58:29 roberto Exp roberto $
|
||||||
** Configuration file for Lua
|
** Configuration file for Lua
|
||||||
** See Copyright Notice in lua.h
|
** See Copyright Notice in lua.h
|
||||||
*/
|
*/
|
||||||
@ -631,7 +631,7 @@ union luai_Cast { double l_d; long l_l; };
|
|||||||
#else
|
#else
|
||||||
|
|
||||||
#define lua_popen(L,c,m) \
|
#define lua_popen(L,c,m) \
|
||||||
((void)c, (void)m, luaL_error(L, LUA_QL("popen") "not supported"), NULL)
|
((void)c, (void)m, luaL_error(L, LUA_QL("popen") " not supported"), (FILE*)0)
|
||||||
#define lua_pclose(L,file) ((void)file, 0)
|
#define lua_pclose(L,file) ((void)file, 0)
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
Loading…
x
Reference in New Issue
Block a user