aboutsummaryrefslogtreecommitdiff
path: root/lua.h
diff options
context:
space:
mode:
authorRoberto Ierusalimschy <roberto@inf.puc-rio.br>2001-04-06 18:17:37 -0300
committerRoberto Ierusalimschy <roberto@inf.puc-rio.br>2001-04-06 18:17:37 -0300
commit2a501882692afaa08ecc38af3052e9b4f60f6e85 (patch)
tree6a7b1fcba9e355a3aa7bab442931afd9ae2fdb87 /lua.h
parent9aedea6ec8feaa163fe0503005dee30d4ed0ba55 (diff)
downloadlua-2a501882692afaa08ecc38af3052e9b4f60f6e85.tar.gz
lua-2a501882692afaa08ecc38af3052e9b4f60f6e85.tar.bz2
lua-2a501882692afaa08ecc38af3052e9b4f60f6e85.zip
avoid use of l_char outside INTERNALs (use lua_char instead)
Diffstat (limited to 'lua.h')
-rw-r--r--lua.h60
1 files changed, 31 insertions, 29 deletions
diff --git a/lua.h b/lua.h
index 95b86cdf..a6f32e98 100644
--- a/lua.h
+++ b/lua.h
@@ -1,5 +1,5 @@
1/* 1/*
2** $Id: lua.h,v 1.91 2001/03/09 18:05:05 roberto Exp roberto $ 2** $Id: lua.h,v 1.92 2001/03/26 14:31:49 roberto Exp roberto $
3** Lua - An Extensible Extension Language 3** Lua - An Extensible Extension Language
4** TeCGraf: Grupo de Tecnologia em Computacao Grafica, PUC-Rio, Brazil 4** TeCGraf: Grupo de Tecnologia em Computacao Grafica, PUC-Rio, Brazil
5** e-mail: lua@tecgraf.puc-rio.br 5** e-mail: lua@tecgraf.puc-rio.br
@@ -86,7 +86,7 @@ typedef LUA_NUMBER lua_Number;
86#ifndef L_CHAR 86#ifndef L_CHAR
87#define L_CHAR char 87#define L_CHAR char
88#endif 88#endif
89typedef L_CHAR l_char; 89typedef L_CHAR lua_char;
90 90
91 91
92/* mark for all API functions */ 92/* mark for all API functions */
@@ -117,23 +117,23 @@ LUA_API int lua_stackspace (lua_State *L);
117** access functions (stack -> C) 117** access functions (stack -> C)
118*/ 118*/
119 119
120LUA_API int lua_type (lua_State *L, int index); 120LUA_API int lua_type (lua_State *L, int index);
121LUA_API const l_char *lua_typename (lua_State *L, int t); 121LUA_API const lua_char *lua_typename (lua_State *L, int t);
122LUA_API const l_char *lua_xtype (lua_State *L, int index); 122LUA_API const lua_char *lua_xtype (lua_State *L, int index);
123LUA_API int lua_isnumber (lua_State *L, int index); 123LUA_API int lua_isnumber (lua_State *L, int index);
124LUA_API int lua_isstring (lua_State *L, int index); 124LUA_API int lua_isstring (lua_State *L, int index);
125LUA_API int lua_iscfunction (lua_State *L, int index); 125LUA_API int lua_iscfunction (lua_State *L, int index);
126LUA_API int lua_tag (lua_State *L, int index); 126LUA_API int lua_tag (lua_State *L, int index);
127 127
128LUA_API int lua_equal (lua_State *L, int index1, int index2); 128LUA_API int lua_equal (lua_State *L, int index1, int index2);
129LUA_API int lua_lessthan (lua_State *L, int index1, int index2); 129LUA_API int lua_lessthan (lua_State *L, int index1, int index2);
130 130
131LUA_API lua_Number lua_tonumber (lua_State *L, int index); 131LUA_API lua_Number lua_tonumber (lua_State *L, int index);
132LUA_API const l_char *lua_tostring (lua_State *L, int index); 132LUA_API const lua_char *lua_tostring (lua_State *L, int index);
133LUA_API size_t lua_strlen (lua_State *L, int index); 133LUA_API size_t lua_strlen (lua_State *L, int index);
134LUA_API lua_CFunction lua_tocfunction (lua_State *L, int index); 134LUA_API lua_CFunction lua_tocfunction (lua_State *L, int index);
135LUA_API void *lua_touserdata (lua_State *L, int index); 135LUA_API void *lua_touserdata (lua_State *L, int index);
136LUA_API const void *lua_topointer (lua_State *L, int index); 136LUA_API const void *lua_topointer (lua_State *L, int index);
137 137
138 138
139/* 139/*
@@ -141,8 +141,8 @@ LUA_API const void *lua_topointer (lua_State *L, int index);
141*/ 141*/
142LUA_API void lua_pushnil (lua_State *L); 142LUA_API void lua_pushnil (lua_State *L);
143LUA_API void lua_pushnumber (lua_State *L, lua_Number n); 143LUA_API void lua_pushnumber (lua_State *L, lua_Number n);
144LUA_API void lua_pushlstring (lua_State *L, const l_char *s, size_t len); 144LUA_API void lua_pushlstring (lua_State *L, const lua_char *s, size_t len);
145LUA_API void lua_pushstring (lua_State *L, const l_char *s); 145LUA_API void lua_pushstring (lua_State *L, const lua_char *s);
146LUA_API void lua_pushcclosure (lua_State *L, lua_CFunction fn, int n); 146LUA_API void lua_pushcclosure (lua_State *L, lua_CFunction fn, int n);
147LUA_API int lua_pushuserdata (lua_State *L, void *u); 147LUA_API int lua_pushuserdata (lua_State *L, void *u);
148 148
@@ -150,12 +150,12 @@ LUA_API int lua_pushuserdata (lua_State *L, void *u);
150/* 150/*
151** get functions (Lua -> stack) 151** get functions (Lua -> stack)
152*/ 152*/
153LUA_API void lua_getglobal (lua_State *L, const l_char *name); 153LUA_API void lua_getglobal (lua_State *L, const lua_char *name);
154LUA_API void lua_gettable (lua_State *L, int index); 154LUA_API void lua_gettable (lua_State *L, int index);
155LUA_API void lua_rawget (lua_State *L, int index); 155LUA_API void lua_rawget (lua_State *L, int index);
156LUA_API void lua_rawgeti (lua_State *L, int index, int n); 156LUA_API void lua_rawgeti (lua_State *L, int index, int n);
157LUA_API void lua_getglobals (lua_State *L); 157LUA_API void lua_getglobals (lua_State *L);
158LUA_API void lua_gettagmethod (lua_State *L, int tag, const l_char *event); 158LUA_API void lua_gettagmethod (lua_State *L, int tag, const lua_char *event);
159LUA_API int lua_getref (lua_State *L, int ref); 159LUA_API int lua_getref (lua_State *L, int ref);
160LUA_API void lua_newtable (lua_State *L); 160LUA_API void lua_newtable (lua_State *L);
161 161
@@ -163,12 +163,12 @@ LUA_API void lua_newtable (lua_State *L);
163/* 163/*
164** set functions (stack -> Lua) 164** set functions (stack -> Lua)
165*/ 165*/
166LUA_API void lua_setglobal (lua_State *L, const l_char *name); 166LUA_API void lua_setglobal (lua_State *L, const lua_char *name);
167LUA_API void lua_settable (lua_State *L, int index); 167LUA_API void lua_settable (lua_State *L, int index);
168LUA_API void lua_rawset (lua_State *L, int index); 168LUA_API void lua_rawset (lua_State *L, int index);
169LUA_API void lua_rawseti (lua_State *L, int index, int n); 169LUA_API void lua_rawseti (lua_State *L, int index, int n);
170LUA_API void lua_setglobals (lua_State *L); 170LUA_API void lua_setglobals (lua_State *L);
171LUA_API void lua_settagmethod (lua_State *L, int tag, const l_char *event); 171LUA_API void lua_settagmethod (lua_State *L, int tag, const lua_char *event);
172LUA_API int lua_ref (lua_State *L, int lock); 172LUA_API int lua_ref (lua_State *L, int lock);
173 173
174 174
@@ -177,10 +177,10 @@ LUA_API int lua_ref (lua_State *L, int lock);
177*/ 177*/
178LUA_API int lua_call (lua_State *L, int nargs, int nresults); 178LUA_API int lua_call (lua_State *L, int nargs, int nresults);
179LUA_API void lua_rawcall (lua_State *L, int nargs, int nresults); 179LUA_API void lua_rawcall (lua_State *L, int nargs, int nresults);
180LUA_API int lua_dofile (lua_State *L, const l_char *filename); 180LUA_API int lua_dofile (lua_State *L, const lua_char *filename);
181LUA_API int lua_dostring (lua_State *L, const l_char *str); 181LUA_API int lua_dostring (lua_State *L, const lua_char *str);
182LUA_API int lua_dobuffer (lua_State *L, const l_char *buff, size_t size, 182LUA_API int lua_dobuffer (lua_State *L, const lua_char *buff, size_t size,
183 const l_char *name); 183 const lua_char *name);
184 184
185/* 185/*
186** Garbage-collection functions 186** Garbage-collection functions
@@ -192,12 +192,12 @@ LUA_API void lua_setgcthreshold (lua_State *L, int newthreshold);
192/* 192/*
193** miscellaneous functions 193** miscellaneous functions
194*/ 194*/
195LUA_API int lua_newtype (lua_State *L, const l_char *name, int basictype); 195LUA_API int lua_newtype (lua_State *L, const lua_char *name, int basictype);
196LUA_API int lua_type2tag (lua_State *L, const l_char *name); 196LUA_API int lua_type2tag (lua_State *L, const lua_char *name);
197LUA_API int lua_copytagmethods (lua_State *L, int tagto, int tagfrom); 197LUA_API int lua_copytagmethods (lua_State *L, int tagto, int tagfrom);
198LUA_API void lua_settag (lua_State *L, int tag); 198LUA_API void lua_settag (lua_State *L, int tag);
199 199
200LUA_API void lua_error (lua_State *L, const l_char *s); 200LUA_API void lua_error (lua_State *L, const lua_char *s);
201 201
202LUA_API void lua_unref (lua_State *L, int ref); 202LUA_API void lua_unref (lua_State *L, int ref);
203 203
@@ -233,7 +233,7 @@ LUA_API void *lua_newuserdata (lua_State *L, size_t size);
233#define lua_getregistry(L) lua_getref(L, LUA_REFREGISTRY) 233#define lua_getregistry(L) lua_getref(L, LUA_REFREGISTRY)
234 234
235#define lua_pushliteral(L, s) lua_pushlstring(L, s, \ 235#define lua_pushliteral(L, s) lua_pushlstring(L, s, \
236 (sizeof(s)/sizeof(l_char))-1) 236 (sizeof(s)/sizeof(lua_char))-1)
237 237
238 238
239 239
@@ -249,6 +249,8 @@ LUA_API void *lua_newuserdata (lua_State *L, size_t size);
249*/ 249*/
250#ifdef LUA_PRIVATE 250#ifdef LUA_PRIVATE
251 251
252#define l_char lua_char
253
252/* macro to control type of literal strings */ 254/* macro to control type of literal strings */
253#ifndef l_s 255#ifndef l_s
254#define l_s(x) x 256#define l_s(x) x