function lua_userinit is used only in single-state mode (by lua.c)
This commit is contained in:
18
linit.c
18
linit.c
@@ -1,22 +1,20 @@
|
|||||||
/*
|
/*
|
||||||
** $Id: linit.c,v 1.3 1999/12/06 11:43:09 roberto Exp roberto $
|
** $Id: linit.c,v 1.4 2000/06/12 13:52:05 roberto Exp roberto $
|
||||||
** Initialization of libraries for lua.c
|
** Initialization of libraries for lua.c
|
||||||
** See Copyright Notice in lua.h
|
** See Copyright Notice in lua.h
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#define LUA_REENTRANT
|
|
||||||
|
|
||||||
#include "lua.h"
|
#include "lua.h"
|
||||||
|
|
||||||
#include "lualib.h"
|
#include "lualib.h"
|
||||||
|
|
||||||
|
|
||||||
void lua_userinit (lua_State *L) {
|
void lua_userinit (void) {
|
||||||
lua_beginblock(L);
|
lua_beginblock();
|
||||||
lua_iolibopen(L);
|
lua_iolibopen();
|
||||||
lua_strlibopen(L);
|
lua_strlibopen();
|
||||||
lua_mathlibopen(L);
|
lua_mathlibopen();
|
||||||
lua_dblibopen(L);
|
lua_dblibopen();
|
||||||
lua_endblock(L);
|
lua_endblock();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
10
lualib.h
10
lualib.h
@@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
** $Id: lualib.h,v 1.7 1999/08/16 20:52:00 roberto Exp roberto $
|
** $Id: lualib.h,v 1.8 1999/11/22 13:12:07 roberto Exp roberto $
|
||||||
** Lua standard libraries
|
** Lua standard libraries
|
||||||
** See Copyright Notice in lua.h
|
** See Copyright Notice in lua.h
|
||||||
*/
|
*/
|
||||||
@@ -16,12 +16,10 @@ void lua_mathlibopen (lua_State *L);
|
|||||||
void lua_dblibopen (lua_State *L);
|
void lua_dblibopen (lua_State *L);
|
||||||
|
|
||||||
|
|
||||||
void lua_userinit (lua_State *L);
|
|
||||||
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
** ===============================================================
|
** ===============================================================
|
||||||
** Macros for single-state use
|
** Macros (and functions) for single-state use
|
||||||
** ===============================================================
|
** ===============================================================
|
||||||
*/
|
*/
|
||||||
|
|
||||||
@@ -31,7 +29,9 @@ void lua_userinit (lua_State *L);
|
|||||||
#define lua_strlibopen() (lua_strlibopen)(lua_state)
|
#define lua_strlibopen() (lua_strlibopen)(lua_state)
|
||||||
#define lua_mathlibopen() (lua_mathlibopen)(lua_state)
|
#define lua_mathlibopen() (lua_mathlibopen)(lua_state)
|
||||||
#define lua_dblibopen() (lua_dblibopen)(lua_state)
|
#define lua_dblibopen() (lua_dblibopen)(lua_state)
|
||||||
#define lua_userinit() (lua_userinit)(lua_state)
|
|
||||||
|
/* this function should be used only in single-state mode */
|
||||||
|
void lua_userinit (void);
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user