mirror of
https://github.com/lua/lua.git
synced 2024-11-24 10:43:44 +08:00
name: lua_pushCclosure -> lua_pushcclosure.
This commit is contained in:
parent
bdb1db4d37
commit
02134b4a87
4
lapi.c
4
lapi.c
@ -1,5 +1,5 @@
|
||||
/*
|
||||
** $Id: lapi.c,v 1.23 1998/03/06 18:47:42 roberto Exp roberto $
|
||||
** $Id: lapi.c,v 1.24 1998/03/09 21:49:52 roberto Exp roberto $
|
||||
** Lua API
|
||||
** See Copyright Notice in lua.h
|
||||
*/
|
||||
@ -345,7 +345,7 @@ void lua_pushstring (char *s)
|
||||
lua_pushlstring(s, strlen(s));
|
||||
}
|
||||
|
||||
void lua_pushCclosure (lua_CFunction fn, int n)
|
||||
void lua_pushcclosure (lua_CFunction fn, int n)
|
||||
{
|
||||
if (fn == NULL)
|
||||
lua_error("API error - attempt to push a NULL Cfunction");
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
** $Id: lbuiltin.c,v 1.27 1998/03/09 21:49:52 roberto Exp roberto $
|
||||
** $Id: lbuiltin.c,v 1.28 1998/05/31 22:19:35 roberto Exp roberto $
|
||||
** Built-in functions
|
||||
** See Copyright Notice in lua.h
|
||||
*/
|
||||
@ -430,7 +430,7 @@ static void testC (void)
|
||||
|
||||
case 'c': reg[getnum(s)] = lua_createtable(); break;
|
||||
case 'C': { lua_CFunction f = lua_getcfunction(lua_getglobal(getname(s)));
|
||||
lua_pushCclosure(f, getnum(s));
|
||||
lua_pushcclosure(f, getnum(s));
|
||||
break;
|
||||
}
|
||||
case 'P': reg[getnum(s)] = lua_pop(); break;
|
||||
|
4
liolib.c
4
liolib.c
@ -1,5 +1,5 @@
|
||||
/*
|
||||
** $Id: liolib.c,v 1.18 1998/05/20 22:21:35 roberto Exp roberto $
|
||||
** $Id: liolib.c,v 1.19 1998/06/02 21:20:54 roberto Exp roberto $
|
||||
** Standard I/O (and system) library
|
||||
** See Copyright Notice in lua.h
|
||||
*/
|
||||
@ -427,7 +427,7 @@ static void openwithtags (void)
|
||||
/* put both tags as upvalues for these functions */
|
||||
lua_pushnumber(iotag);
|
||||
lua_pushnumber(closedtag);
|
||||
lua_pushCclosure(iolibtag[i].func, 2);
|
||||
lua_pushcclosure(iolibtag[i].func, 2);
|
||||
lua_setglobal(iolibtag[i].name);
|
||||
}
|
||||
setfile(stdin, FINPUT, iotag);
|
||||
|
6
lua.h
6
lua.h
@ -1,5 +1,5 @@
|
||||
/*
|
||||
** $Id: lua.h,v 1.18 1998/05/18 22:26:03 roberto Exp roberto $
|
||||
** $Id: lua.h,v 1.19 1998/06/02 20:37:04 roberto Exp roberto $
|
||||
** Lua - An Extensible Extension Language
|
||||
** TeCGraf: Grupo de Tecnologia em Computacao Grafica, PUC-Rio, Brazil
|
||||
** e-mail: lua@tecgraf.puc-rio.br
|
||||
@ -104,7 +104,7 @@ void lua_pushnil (void);
|
||||
void lua_pushnumber (double n);
|
||||
void lua_pushlstring (char *s, long len);
|
||||
void lua_pushstring (char *s);
|
||||
void lua_pushCclosure (lua_CFunction fn, int n);
|
||||
void lua_pushcclosure (lua_CFunction fn, int n);
|
||||
void lua_pushusertag (void *u, int tag);
|
||||
void lua_pushobject (lua_Object object);
|
||||
|
||||
@ -151,7 +151,7 @@ void (lua_pushuserdata) (void *u);
|
||||
#define lua_pushuserdata(u) lua_pushusertag(u, 0)
|
||||
|
||||
void (lua_pushcfunction) (lua_CFunction f);
|
||||
#define lua_pushcfunction(f) lua_pushCclosure(f, 0)
|
||||
#define lua_pushcfunction(f) lua_pushcclosure(f, 0)
|
||||
|
||||
int (lua_clonetag) (int t);
|
||||
#define lua_clonetag(t) lua_copytagmethods(lua_newtag(), (t))
|
||||
|
Loading…
Reference in New Issue
Block a user