lua/lauxlib.h

48 lines
1.2 KiB
C
Raw Normal View History

1997-03-18 18:30:50 +03:00
/*
1998-06-19 20:14:09 +04:00
** $Id: lauxlib.h,v 1.8 1998/06/18 16:57:03 roberto Exp roberto $
** Auxiliary functions for building Lua libraries
** See Copyright Notice in lua.h
1997-03-18 18:30:50 +03:00
*/
1997-03-18 18:30:50 +03:00
#ifndef auxlib_h
#define auxlib_h
1997-03-18 18:30:50 +03:00
#include "lua.h"
1997-03-18 18:30:50 +03:00
struct luaL_reg {
char *name;
lua_CFunction func;
};
1998-01-09 18:09:53 +03:00
#define luaL_arg_check(cond,numarg,extramsg) if (!(cond)) \
luaL_argerror(numarg,extramsg)
1997-03-18 18:30:50 +03:00
void luaL_openlib (struct luaL_reg *l, int n);
1998-01-09 18:09:53 +03:00
void luaL_argerror (int numarg, char *extramsg);
1998-03-06 19:54:42 +03:00
#define luaL_check_string(n) (luaL_check_lstr((n), NULL))
char *luaL_check_lstr (int numArg, long *len);
#define luaL_opt_string(n, d) (luaL_opt_lstr((n), (d), NULL))
char *luaL_opt_lstr (int numArg, char *def, long *len);
double luaL_check_number (int numArg);
double luaL_opt_number (int numArg, double def);
1997-12-09 16:50:08 +03:00
lua_Object luaL_functionarg (int arg);
lua_Object luaL_tablearg (int arg);
lua_Object luaL_nonnullarg (int numArg);
1997-03-18 18:30:50 +03:00
void luaL_verror (char *fmt, ...);
char *luaL_openspace (int size);
void luaL_resetbuffer (void);
void luaL_addchar (int c);
1998-03-06 19:54:42 +03:00
int luaL_getsize (void);
void luaL_addsize (int n);
int luaL_newbuffer (int size);
void luaL_oldbuffer (int old);
char *luaL_buffer (void);
int luaL_findstring (char *name, char *list[]);
1997-03-18 18:30:50 +03:00
1997-03-18 18:30:50 +03:00
#endif