From 0c49857c1ab08a5adfe1e21e5370e8aa132e4da1 Mon Sep 17 00:00:00 2001 From: Roberto Ierusalimschy Date: Mon, 21 Jun 2004 17:05:29 -0300 Subject: new scheme to search paths --- lauxlib.h | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'lauxlib.h') diff --git a/lauxlib.h b/lauxlib.h index 9ac7549f..ba83d14a 100644 --- a/lauxlib.h +++ b/lauxlib.h @@ -1,5 +1,5 @@ /* -** $Id: lauxlib.h,v 1.65 2004/05/31 19:27:14 roberto Exp roberto $ +** $Id: lauxlib.h,v 1.66 2004/06/02 17:37:03 roberto Exp roberto $ ** Auxiliary functions for building Lua libraries ** See Copyright Notice in lua.h */ @@ -25,6 +25,8 @@ typedef struct luaL_reg { } luaL_reg; +typedef int (*luaL_Loader)(void *data, const char *name); + LUALIB_API void luaL_openlib (lua_State *L, const char *libname, const luaL_reg *l, int nup); LUALIB_API int luaL_getmetafield (lua_State *L, int obj, const char *e); @@ -54,6 +56,9 @@ LUALIB_API int luaL_error (lua_State *L, const char *fmt, ...); LUALIB_API int luaL_findstring (const char *st, const char *const lst[]); +LUALIB_API int luaL_searchpath (lua_State *L, const char *name, + const char *path, luaL_Loader f, void *data); + LUALIB_API int luaL_ref (lua_State *L, int t); LUALIB_API void luaL_unref (lua_State *L, int t, int ref); -- cgit v1.2.3-55-g6feb