aboutsummaryrefslogtreecommitdiff
path: root/ldo.c
diff options
context:
space:
mode:
authorRoberto Ierusalimschy <roberto@inf.puc-rio.br>2000-10-20 14:39:03 -0200
committerRoberto Ierusalimschy <roberto@inf.puc-rio.br>2000-10-20 14:39:03 -0200
commit64eecc0b8219cc3bcaa2b717826a4376c60d9305 (patch)
treea1633501cdf21016a00bd555c475daea58ec24f5 /ldo.c
parent8b88ab07f7cfc216407a88d75ad8f0546224c8d7 (diff)
downloadlua-64eecc0b8219cc3bcaa2b717826a4376c60d9305.tar.gz
lua-64eecc0b8219cc3bcaa2b717826a4376c60d9305.tar.bz2
lua-64eecc0b8219cc3bcaa2b717826a4376c60d9305.zip
new macro LUA_API
Diffstat (limited to 'ldo.c')
-rw-r--r--ldo.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/ldo.c b/ldo.c
index ab61e40d..8b5b1d63 100644
--- a/ldo.c
+++ b/ldo.c
@@ -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
215int lua_call (lua_State *L, int nargs, int nresults) { 215LUA_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
287int lua_dofile (lua_State *L, const char *filename) { 287LUA_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
304int lua_dobuffer (lua_State *L, const char *buff, size_t size, 304LUA_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
313int lua_dostring (lua_State *L, const char *str) { 313LUA_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*/
346void lua_error (lua_State *L, const char *s) { 346LUA_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}