luafar/src/exported.c
int GetExportFunction(lua_State* L, const char* FuncName)
{
  lua_getglobal(L, "export");
  if (lua_istable(L,-1))
  {
    lua_getfield(L, -1, FuncName);
    if(lua_isfunction(L,-1))
      return lua_remove(L,-2), 1;
    lua_pop(L,1);
  }
  return lua_pop(L,1), 0;
}
// if the function is successfully retrieved, it's on the stack top; 1 is returned
// else 0 returned (and the stack is unchanged)
if the function is successfully retrieved, it's on the stack top; 1 is returned
else 0 returned (and the stack is unchanged)
if the function is successfully retrieved it ' s on the stack top ; 1 is returned else 0 returned ( and the stack is unchanged )
int GetExportFunction(lua_State* L, const char* FuncName)
{
  lua_getglobal(L, "export");
  if (lua_istable(L,-1))
  {
    lua_getfield(L, -1, FuncName);
    if(lua_isfunction(L,-1))
      return lua_remove(L,-2), 1;
    lua_pop(L,1);
  }
  return lua_pop(L,1), 0;
}
int GetExportFunction ( lua_State * L , const char * FuncName ) { lua_getglobal ( L , " " ) ; if ( lua_istable ( L , -1 ) ) { lua_getfield ( L , -1 , FuncName ) ; if ( lua_isfunction ( L , -1 ) ) return lua_remove ( L , -2 ) , 1 ; lua_pop ( L , 1 ) ; } return lua_pop ( L , 1 ) , 0 ; }
if the function is successfully retrieved, it's on the stack top; 1 is returned
else 0 returned (and the stack is unchanged)
if the function is successfully retrieved it ' s on the stack top ; 1 is returned else 0 returned ( and the stack is unchanged )