Browse Source

removed export of function only for coco

Roberto Ierusalimschy 15 years ago
parent
commit
e0f9d1c8f5
2 changed files with 6 additions and 9 deletions
  1. 5 5
      ldo.c
  2. 1 4
      ldo.h

+ 5 - 5
ldo.c

@@ -1,5 +1,5 @@
 /*
 /*
-** $Id: ldo.c,v 2.76 2009/12/10 18:20:07 roberto Exp roberto $
+** $Id: ldo.c,v 2.77 2009/12/17 12:26:09 roberto Exp roberto $
 ** Stack and Call structure of Lua
 ** Stack and Call structure of Lua
 ** See Copyright Notice in lua.h
 ** See Copyright Notice in lua.h
 */
 */
@@ -81,7 +81,7 @@ struct lua_longjmp {
 };
 };
 
 
 
 
-void luaD_seterrorobj (lua_State *L, int errcode, StkId oldtop) {
+static void seterrorobj (lua_State *L, int errcode, StkId oldtop) {
   switch (errcode) {
   switch (errcode) {
     case LUA_ERRMEM: {
     case LUA_ERRMEM: {
       setsvalue2s(L, oldtop, luaS_newliteral(L, MEMERRMSG));
       setsvalue2s(L, oldtop, luaS_newliteral(L, MEMERRMSG));
@@ -454,7 +454,7 @@ static int recover (lua_State *L, int status) {
   /* "finish" luaD_pcall */
   /* "finish" luaD_pcall */
   oldtop = restorestack(L, ci->u.c.oldtop);
   oldtop = restorestack(L, ci->u.c.oldtop);
   luaF_close(L, oldtop);
   luaF_close(L, oldtop);
-  luaD_seterrorobj(L, status, oldtop);
+  seterrorobj(L, status, oldtop);
   L->ci = ci;
   L->ci = ci;
   L->allowhook = ci->u.c.old_allowhook;
   L->allowhook = ci->u.c.old_allowhook;
   L->nny = 0;  /* should be zero to be yieldable */
   L->nny = 0;  /* should be zero to be yieldable */
@@ -535,7 +535,7 @@ LUA_API int lua_resume (lua_State *L, int nargs) {
         status = luaD_rawrunprotected(L, unroll, NULL);  /* run continuation */
         status = luaD_rawrunprotected(L, unroll, NULL);  /* run continuation */
       else {  /* unrecoverable error */
       else {  /* unrecoverable error */
         L->status = cast_byte(status);  /* mark thread as `dead' */
         L->status = cast_byte(status);  /* mark thread as `dead' */
-        luaD_seterrorobj(L, status, L->top);
+        seterrorobj(L, status, L->top);
         L->ci->top = L->top;
         L->ci->top = L->top;
         break;
         break;
       }
       }
@@ -586,7 +586,7 @@ int luaD_pcall (lua_State *L, Pfunc func, void *u,
   if (status != LUA_OK) {  /* an error occurred? */
   if (status != LUA_OK) {  /* an error occurred? */
     StkId oldtop = restorestack(L, old_top);
     StkId oldtop = restorestack(L, old_top);
     luaF_close(L, oldtop);  /* close possible pending closures */
     luaF_close(L, oldtop);  /* close possible pending closures */
-    luaD_seterrorobj(L, status, oldtop);
+    seterrorobj(L, status, oldtop);
     L->ci = old_ci;
     L->ci = old_ci;
     L->allowhook = old_allowhooks;
     L->allowhook = old_allowhooks;
     L->nny = old_nny;
     L->nny = old_nny;

+ 1 - 4
ldo.h

@@ -1,5 +1,5 @@
 /*
 /*
-** $Id: ldo.h,v 2.16 2009/11/19 16:24:41 roberto Exp roberto $
+** $Id: ldo.h,v 2.17 2009/11/25 15:27:51 roberto Exp roberto $
 ** Stack and Call structure of Lua
 ** Stack and Call structure of Lua
 ** See Copyright Notice in lua.h
 ** See Copyright Notice in lua.h
 */
 */
@@ -41,8 +41,5 @@ LUAI_FUNC void luaD_shrinkstack (lua_State *L);
 LUAI_FUNC void luaD_throw (lua_State *L, int errcode);
 LUAI_FUNC void luaD_throw (lua_State *L, int errcode);
 LUAI_FUNC int luaD_rawrunprotected (lua_State *L, Pfunc f, void *ud);
 LUAI_FUNC int luaD_rawrunprotected (lua_State *L, Pfunc f, void *ud);
 
 
-/* exported for Coco */
-LUAI_FUNC void luaD_seterrorobj (lua_State *L, int errcode, StkId oldtop);
-
 #endif
 #endif