summaryrefslogtreecommitdiff
path: root/lauxlib.h
diff options
context:
space:
mode:
Diffstat (limited to 'lauxlib.h')
-rw-r--r--lauxlib.h16
1 files changed, 9 insertions, 7 deletions
diff --git a/lauxlib.h b/lauxlib.h
index 708297f5..b996a6f1 100644
--- a/lauxlib.h
+++ b/lauxlib.h
@@ -1,5 +1,5 @@
1/* 1/*
2** $Id: lauxlib.h,v 1.13 1999/08/16 20:52:00 roberto Exp roberto $ 2** $Id: lauxlib.h,v 1.14 1999/11/22 13:12:07 roberto Exp roberto $
3** Auxiliary functions for building Lua libraries 3** Auxiliary functions for building Lua libraries
4** See Copyright Notice in lua.h 4** See Copyright Notice in lua.h
5*/ 5*/
@@ -22,12 +22,13 @@ struct luaL_reg {
22 22
23#define luaL_arg_check(L, cond,numarg,extramsg) if (!(cond)) \ 23#define luaL_arg_check(L, cond,numarg,extramsg) if (!(cond)) \
24 luaL_argerror(L, numarg,extramsg) 24 luaL_argerror(L, numarg,extramsg)
25#define luaL_check_string(L, n) (luaL_check_lstr(L, (n), NULL)) 25#define luaL_check_string(L,n) (luaL_check_lstr(L, (n), NULL))
26#define luaL_opt_string(L, n, d) (luaL_opt_lstr(L, (n), (d), NULL)) 26#define luaL_opt_string(L,n,d) (luaL_opt_lstr(L, (n), (d), NULL))
27#define luaL_check_int(L, n) ((int)luaL_check_number(L, n)) 27#define luaL_check_int(L,n) ((int)luaL_check_number(L, n))
28#define luaL_check_long(L, n) ((long)luaL_check_number(L, n)) 28#define luaL_check_long(L,n) ((long)luaL_check_number(L, n))
29#define luaL_opt_int(L, n,d) ((int)luaL_opt_number(L, n,d)) 29#define luaL_opt_int(L,n,d) ((int)luaL_opt_number(L, n,d))
30#define luaL_opt_long(L, n,d) ((long)luaL_opt_number(L, n,d)) 30#define luaL_opt_long(L,n,d) ((long)luaL_opt_number(L, n,d))
31#define luaL_openl(L,a) luaL_openlib(L, a, (sizeof(a)/sizeof(a[0])))
31 32
32#else 33#else
33 34
@@ -39,6 +40,7 @@ struct luaL_reg {
39#define luaL_check_long(n) ((long)luaL_check_number(n)) 40#define luaL_check_long(n) ((long)luaL_check_number(n))
40#define luaL_opt_int(n,d) ((int)luaL_opt_number(n,d)) 41#define luaL_opt_int(n,d) ((int)luaL_opt_number(n,d))
41#define luaL_opt_long(n,d) ((long)luaL_opt_number(n,d)) 42#define luaL_opt_long(n,d) ((long)luaL_opt_number(n,d))
43#define luaL_openl(a) luaL_openlib(a, (sizeof(a)/sizeof(a[0])))
42 44
43#endif 45#endif
44 46