diff options
| author | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 1997-03-17 14:02:29 -0300 |
|---|---|---|
| committer | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 1997-03-17 14:02:29 -0300 |
| commit | eea734aa881002e90bd9130171a2b94cd9dc3267 (patch) | |
| tree | b2816a614fca723d8c0b06e96cd093438e6e098b /lua.h | |
| parent | b6d91e24e23edfe98ad732660fd456e91658edb9 (diff) | |
| download | lua-eea734aa881002e90bd9130171a2b94cd9dc3267.tar.gz lua-eea734aa881002e90bd9130171a2b94cd9dc3267.tar.bz2 lua-eea734aa881002e90bd9130171a2b94cd9dc3267.zip | |
new module 'auxlib' centralizes functions to get/check parameters.
Diffstat (limited to 'lua.h')
| -rw-r--r-- | lua.h | 13 |
1 files changed, 12 insertions, 1 deletions
| @@ -2,7 +2,7 @@ | |||
| 2 | ** LUA - Linguagem para Usuarios de Aplicacao | 2 | ** LUA - Linguagem para Usuarios de Aplicacao |
| 3 | ** Grupo de Tecnologia em Computacao Grafica | 3 | ** Grupo de Tecnologia em Computacao Grafica |
| 4 | ** TeCGraf - PUC-Rio | 4 | ** TeCGraf - PUC-Rio |
| 5 | ** $Id: lua.h,v 3.34 1997/02/20 15:51:14 roberto Exp roberto $ | 5 | ** $Id: lua.h,v 3.35 1997/02/26 17:38:41 roberto Unstable roberto $ |
| 6 | */ | 6 | */ |
| 7 | 7 | ||
| 8 | 8 | ||
| @@ -80,6 +80,7 @@ void lua_unref (int ref); | |||
| 80 | lua_Object lua_createtable (void); | 80 | lua_Object lua_createtable (void); |
| 81 | 81 | ||
| 82 | 82 | ||
| 83 | /* =============================================================== */ | ||
| 83 | /* some useful macros */ | 84 | /* some useful macros */ |
| 84 | 85 | ||
| 85 | #define lua_refobject(o,l) (lua_pushobject(o), lua_ref(l)) | 86 | #define lua_refobject(o,l) (lua_pushobject(o), lua_ref(l)) |
| @@ -89,7 +90,17 @@ lua_Object lua_createtable (void); | |||
| 89 | #define lua_pushuserdata(u) lua_pushusertag(u, 0) | 90 | #define lua_pushuserdata(u) lua_pushusertag(u, 0) |
| 90 | 91 | ||
| 91 | 92 | ||
| 93 | /* =============================================================== */ | ||
| 94 | /* Auxiliar functions for libraries */ | ||
| 92 | 95 | ||
| 96 | void luaL_arg_check(int cond, char *funcname, int numarg, char *extramsg); | ||
| 97 | char *luaL_check_string (int numArg, char *funcname); | ||
| 98 | char *luaL_opt_string (int numArg, char *def, char *funcname); | ||
| 99 | double luaL_check_number (int numArg, char *funcname); | ||
| 100 | double luaL_opt_number (int numArg, double def, char *funcname); | ||
| 101 | |||
| 102 | |||
| 103 | /* =============================================================== */ | ||
| 93 | /* for compatibility with old versions. Avoid using these macros */ | 104 | /* for compatibility with old versions. Avoid using these macros */ |
| 94 | 105 | ||
| 95 | #define lua_type(o) (lua_tag(o)) | 106 | #define lua_type(o) (lua_tag(o)) |
