diff options
author | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 2000-10-20 14:39:03 -0200 |
---|---|---|
committer | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 2000-10-20 14:39:03 -0200 |
commit | 64eecc0b8219cc3bcaa2b717826a4376c60d9305 (patch) | |
tree | a1633501cdf21016a00bd555c475daea58ec24f5 /ldo.c | |
parent | 8b88ab07f7cfc216407a88d75ad8f0546224c8d7 (diff) | |
download | lua-64eecc0b8219cc3bcaa2b717826a4376c60d9305.tar.gz lua-64eecc0b8219cc3bcaa2b717826a4376c60d9305.tar.bz2 lua-64eecc0b8219cc3bcaa2b717826a4376c60d9305.zip |
new macro LUA_API
Diffstat (limited to 'ldo.c')
-rw-r--r-- | ldo.c | 12 |
1 files changed, 6 insertions, 6 deletions
@@ -1,5 +1,5 @@ | |||
1 | /* | 1 | /* |
2 | ** $Id: ldo.c,v 1.106 2000/10/09 15:46:43 roberto Exp roberto $ | 2 | ** $Id: ldo.c,v 1.107 2000/10/10 19:51:39 roberto Exp roberto $ |
3 | ** Stack and Call structure of Lua | 3 | ** Stack and Call structure of Lua |
4 | ** See Copyright Notice in lua.h | 4 | ** See Copyright Notice in lua.h |
5 | */ | 5 | */ |
@@ -212,7 +212,7 @@ static void f_call (lua_State *L, void *ud) { | |||
212 | } | 212 | } |
213 | 213 | ||
214 | 214 | ||
215 | int lua_call (lua_State *L, int nargs, int nresults) { | 215 | LUA_API int lua_call (lua_State *L, int nargs, int nresults) { |
216 | StkId func = L->top - (nargs+1); /* function to be called */ | 216 | StkId func = L->top - (nargs+1); /* function to be called */ |
217 | struct CallS c; | 217 | struct CallS c; |
218 | int status; | 218 | int status; |
@@ -284,7 +284,7 @@ static int parse_file (lua_State *L, const char *filename) { | |||
284 | } | 284 | } |
285 | 285 | ||
286 | 286 | ||
287 | int lua_dofile (lua_State *L, const char *filename) { | 287 | LUA_API int lua_dofile (lua_State *L, const char *filename) { |
288 | int status = parse_file(L, filename); | 288 | int status = parse_file(L, filename); |
289 | if (status == 0) /* parse OK? */ | 289 | if (status == 0) /* parse OK? */ |
290 | status = lua_call(L, 0, LUA_MULTRET); /* call main */ | 290 | status = lua_call(L, 0, LUA_MULTRET); /* call main */ |
@@ -301,7 +301,7 @@ static int parse_buffer (lua_State *L, const char *buff, size_t size, | |||
301 | } | 301 | } |
302 | 302 | ||
303 | 303 | ||
304 | int lua_dobuffer (lua_State *L, const char *buff, size_t size, | 304 | LUA_API int lua_dobuffer (lua_State *L, const char *buff, size_t size, |
305 | const char *name) { | 305 | const char *name) { |
306 | int status = parse_buffer(L, buff, size, name); | 306 | int status = parse_buffer(L, buff, size, name); |
307 | if (status == 0) /* parse OK? */ | 307 | if (status == 0) /* parse OK? */ |
@@ -310,7 +310,7 @@ int lua_dobuffer (lua_State *L, const char *buff, size_t size, | |||
310 | } | 310 | } |
311 | 311 | ||
312 | 312 | ||
313 | int lua_dostring (lua_State *L, const char *str) { | 313 | LUA_API int lua_dostring (lua_State *L, const char *str) { |
314 | return lua_dobuffer(L, str, strlen(str), str); | 314 | return lua_dobuffer(L, str, strlen(str), str); |
315 | } | 315 | } |
316 | 316 | ||
@@ -343,7 +343,7 @@ static void message (lua_State *L, const char *s) { | |||
343 | /* | 343 | /* |
344 | ** Reports an error, and jumps up to the available recovery label | 344 | ** Reports an error, and jumps up to the available recovery label |
345 | */ | 345 | */ |
346 | void lua_error (lua_State *L, const char *s) { | 346 | LUA_API void lua_error (lua_State *L, const char *s) { |
347 | if (s) message(L, s); | 347 | if (s) message(L, s); |
348 | luaD_breakrun(L, LUA_ERRRUN); | 348 | luaD_breakrun(L, LUA_ERRRUN); |
349 | } | 349 | } |