diff options
author | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 2005-01-10 15:31:50 -0200 |
---|---|---|
committer | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 2005-01-10 15:31:50 -0200 |
commit | 6eb68ba57a58679cc69837b03490b12ba0cba8d4 (patch) | |
tree | 23aa714ea6259e027b58cd45fa1d074158438828 /lauxlib.h | |
parent | a27497aa03b080d8e7a2481aaf7af5d4784b40ec (diff) | |
download | lua-6eb68ba57a58679cc69837b03490b12ba0cba8d4.tar.gz lua-6eb68ba57a58679cc69837b03490b12ba0cba8d4.tar.bz2 lua-6eb68ba57a58679cc69837b03490b12ba0cba8d4.zip |
all function declarations surround name with parentheses
Diffstat (limited to 'lauxlib.h')
-rw-r--r-- | lauxlib.h | 89 |
1 files changed, 46 insertions, 43 deletions
@@ -1,5 +1,5 @@ | |||
1 | /* | 1 | /* |
2 | ** $Id: lauxlib.h,v 1.72 2004/09/29 21:00:25 roberto Exp roberto $ | 2 | ** $Id: lauxlib.h,v 1.73 2004/10/18 12:51:44 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 | */ |
@@ -25,55 +25,58 @@ typedef struct luaL_reg { | |||
25 | } luaL_reg; | 25 | } luaL_reg; |
26 | 26 | ||
27 | 27 | ||
28 | LUALIB_API void luaL_openlib (lua_State *L, const char *libname, | 28 | LUALIB_API void (luaL_openlib) (lua_State *L, const char *libname, |
29 | const luaL_reg *l, int nup); | 29 | const luaL_reg *l, int nup); |
30 | LUALIB_API int luaL_getmetafield (lua_State *L, int obj, const char *e); | 30 | LUALIB_API int (luaL_getmetafield) (lua_State *L, int obj, const char *e); |
31 | LUALIB_API int luaL_callmeta (lua_State *L, int obj, const char *e); | 31 | LUALIB_API int (luaL_callmeta) (lua_State *L, int obj, const char *e); |
32 | LUALIB_API int luaL_typerror (lua_State *L, int narg, const char *tname); | 32 | LUALIB_API int (luaL_typerror) (lua_State *L, int narg, const char *tname); |
33 | LUALIB_API int luaL_argerror (lua_State *L, int numarg, const char *extramsg); | 33 | LUALIB_API int (luaL_argerror) (lua_State *L, int numarg, const char *extramsg); |
34 | LUALIB_API const char *luaL_checklstring (lua_State *L, int numArg, size_t *l); | 34 | LUALIB_API const char *(luaL_checklstring) (lua_State *L, int numArg, |
35 | LUALIB_API const char *luaL_optlstring (lua_State *L, int numArg, | 35 | size_t *l); |
36 | const char *def, size_t *l); | 36 | LUALIB_API const char *(luaL_optlstring) (lua_State *L, int numArg, |
37 | LUALIB_API lua_Number luaL_checknumber (lua_State *L, int numArg); | 37 | const char *def, size_t *l); |
38 | LUALIB_API lua_Number luaL_optnumber (lua_State *L, int nArg, lua_Number def); | 38 | LUALIB_API lua_Number (luaL_checknumber) (lua_State *L, int numArg); |
39 | LUALIB_API lua_Number (luaL_optnumber) (lua_State *L, int nArg, lua_Number def); | ||
39 | 40 | ||
40 | LUALIB_API lua_Integer luaL_checkinteger (lua_State *L, int numArg); | 41 | LUALIB_API lua_Integer (luaL_checkinteger) (lua_State *L, int numArg); |
41 | LUALIB_API lua_Integer luaL_optinteger (lua_State *L, int nArg, | 42 | LUALIB_API lua_Integer (luaL_optinteger) (lua_State *L, int nArg, |
42 | lua_Integer def); | 43 | lua_Integer def); |
43 | 44 | ||
44 | LUALIB_API void luaL_checkstack (lua_State *L, int sz, const char *msg); | 45 | LUALIB_API void (luaL_checkstack) (lua_State *L, int sz, const char *msg); |
45 | LUALIB_API void luaL_checktype (lua_State *L, int narg, int t); | 46 | LUALIB_API void (luaL_checktype) (lua_State *L, int narg, int t); |
46 | LUALIB_API void luaL_checkany (lua_State *L, int narg); | 47 | LUALIB_API void (luaL_checkany) (lua_State *L, int narg); |
47 | 48 | ||
48 | LUALIB_API int luaL_newmetatable (lua_State *L, const char *tname); | 49 | LUALIB_API int (luaL_newmetatable) (lua_State *L, const char *tname); |
49 | LUALIB_API void luaL_getmetatable (lua_State *L, const char *tname); | 50 | LUALIB_API void (luaL_getmetatable) (lua_State *L, const char *tname); |
50 | LUALIB_API void *luaL_checkudata (lua_State *L, int ud, const char *tname); | 51 | LUALIB_API void *(luaL_checkudata) (lua_State *L, int ud, const char *tname); |
51 | 52 | ||
52 | LUALIB_API void luaL_where (lua_State *L, int lvl); | 53 | LUALIB_API void (luaL_where) (lua_State *L, int lvl); |
53 | LUALIB_API int luaL_error (lua_State *L, const char *fmt, ...); | 54 | LUALIB_API int (luaL_error) (lua_State *L, const char *fmt, ...); |
54 | 55 | ||
55 | LUALIB_API int luaL_findstring (const char *st, const char *const lst[]); | 56 | LUALIB_API int (luaL_findstring) (const char *st, const char *const lst[]); |
56 | 57 | ||
57 | LUALIB_API const char *luaL_searchpath (lua_State *L, const char *name, | 58 | LUALIB_API const char *(luaL_searchpath) (lua_State *L, const char *name, |
58 | const char *path); | 59 | const char *path); |
59 | 60 | ||
60 | LUALIB_API int luaL_ref (lua_State *L, int t); | 61 | LUALIB_API int (luaL_ref) (lua_State *L, int t); |
61 | LUALIB_API void luaL_unref (lua_State *L, int t, int ref); | 62 | LUALIB_API void (luaL_unref) (lua_State *L, int t, int ref); |
62 | 63 | ||
63 | LUALIB_API int luaL_getn (lua_State *L, int t); | 64 | LUALIB_API int (luaL_getn) (lua_State *L, int t); |
64 | LUALIB_API void luaL_setn (lua_State *L, int t, int n); | 65 | LUALIB_API void (luaL_setn) (lua_State *L, int t, int n); |
65 | 66 | ||
66 | LUALIB_API int luaL_loadfile (lua_State *L, const char *filename); | 67 | LUALIB_API int (luaL_loadfile) (lua_State *L, const char *filename); |
67 | LUALIB_API int luaL_loadbuffer (lua_State *L, const char *buff, size_t sz, | 68 | LUALIB_API int (luaL_loadbuffer) (lua_State *L, const char *buff, size_t sz, |
68 | const char *name); | 69 | const char *name); |
69 | 70 | ||
70 | LUALIB_API lua_State *(luaL_newstate) (void); | 71 | LUALIB_API lua_State *(luaL_newstate) (void); |
71 | 72 | ||
72 | 73 | ||
73 | LUALIB_API const char *luaL_gsub (lua_State *L, const char *s, const char *p, | 74 | LUALIB_API const char *(luaL_gsub) (lua_State *L, const char *s, const char *p, |
74 | const char *r); | 75 | const char *r); |
75 | LUALIB_API const char *luaL_getfield (lua_State *L, int idx, const char *fname); | 76 | LUALIB_API const char *(luaL_getfield) (lua_State *L, int idx, |
76 | LUALIB_API const char *luaL_setfield (lua_State *L, int idx, const char *fname); | 77 | const char *fname); |
78 | LUALIB_API const char *(luaL_setfield) (lua_State *L, int idx, | ||
79 | const char *fname); | ||
77 | 80 | ||
78 | 81 | ||
79 | 82 | ||
@@ -115,12 +118,12 @@ typedef struct luaL_Buffer { | |||
115 | 118 | ||
116 | #define luaL_addsize(B,n) ((B)->p += (n)) | 119 | #define luaL_addsize(B,n) ((B)->p += (n)) |
117 | 120 | ||
118 | LUALIB_API void luaL_buffinit (lua_State *L, luaL_Buffer *B); | 121 | LUALIB_API void (luaL_buffinit) (lua_State *L, luaL_Buffer *B); |
119 | LUALIB_API char *luaL_prepbuffer (luaL_Buffer *B); | 122 | LUALIB_API char *(luaL_prepbuffer) (luaL_Buffer *B); |
120 | LUALIB_API void luaL_addlstring (luaL_Buffer *B, const char *s, size_t l); | 123 | LUALIB_API void (luaL_addlstring) (luaL_Buffer *B, const char *s, size_t l); |
121 | LUALIB_API void luaL_addstring (luaL_Buffer *B, const char *s); | 124 | LUALIB_API void (luaL_addstring) (luaL_Buffer *B, const char *s); |
122 | LUALIB_API void luaL_addvalue (luaL_Buffer *B); | 125 | LUALIB_API void (luaL_addvalue) (luaL_Buffer *B); |
123 | LUALIB_API void luaL_pushresult (luaL_Buffer *B); | 126 | LUALIB_API void (luaL_pushresult) (luaL_Buffer *B); |
124 | 127 | ||
125 | 128 | ||
126 | /* }====================================================== */ | 129 | /* }====================================================== */ |