The Battle for Wesnoth  1.13.4+dev
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages
Macros | Functions | Variables
lcorolib.cpp File Reference
#include <stdlib.h>
#include "lua.h"
#include "lauxlib.h"
#include "lualib.h"
Include dependency graph for lcorolib.cpp:

Go to the source code of this file.

Macros

#define lcorolib_c
 
#define LUA_LIB
 

Functions

static int auxresume (lua_State *L, lua_State *co, int narg)
 
static int luaB_coresume (lua_State *L)
 
static int luaB_auxwrap (lua_State *L)
 
static int luaB_cocreate (lua_State *L)
 
static int luaB_cowrap (lua_State *L)
 
static int luaB_yield (lua_State *L)
 
static int luaB_costatus (lua_State *L)
 
static int luaB_corunning (lua_State *L)
 
LUAMOD_API int luaopen_coroutine (lua_State *L)
 

Variables

static const luaL_Reg co_funcs []
 

Macro Definition Documentation

#define lcorolib_c

Definition at line 10 of file lcorolib.cpp.

#define LUA_LIB

Definition at line 11 of file lcorolib.cpp.

Function Documentation

static int auxresume ( lua_State L,
lua_State co,
int  narg 
)
static
static int luaB_auxwrap ( lua_State L)
static
static int luaB_cocreate ( lua_State L)
static

Definition at line 81 of file lcorolib.cpp.

References lua_newthread(), lua_pushvalue(), LUA_TFUNCTION, lua_xmove(), and luaL_checktype().

Referenced by luaB_cowrap().

static int luaB_coresume ( lua_State L)
static
static int luaB_corunning ( lua_State L)
static

Definition at line 131 of file lcorolib.cpp.

References lua_pushboolean(), and lua_pushthread().

static int luaB_costatus ( lua_State L)
static
static int luaB_cowrap ( lua_State L)
static

Definition at line 91 of file lcorolib.cpp.

References lua_pushcclosure(), luaB_auxwrap(), and luaB_cocreate().

static int luaB_yield ( lua_State L)
static

Definition at line 98 of file lcorolib.cpp.

References lua_gettop(), and lua_yield.

LUAMOD_API int luaopen_coroutine ( lua_State L)

Definition at line 150 of file lcorolib.cpp.

References luaL_newlib.

Referenced by lua_kernel_base::lua_kernel_base().

Variable Documentation

const luaL_Reg co_funcs[]
static
Initial value:
= {
{"create", luaB_cocreate},
{"resume", luaB_coresume},
{"running", luaB_corunning},
{"status", luaB_costatus},
{"wrap", luaB_cowrap},
{"yield", luaB_yield},
{NULL, NULL}
}
static int luaB_cocreate(lua_State *L)
Definition: lcorolib.cpp:81
static int luaB_yield(lua_State *L)
Definition: lcorolib.cpp:98
static int luaB_cowrap(lua_State *L)
Definition: lcorolib.cpp:91
static int luaB_costatus(lua_State *L)
Definition: lcorolib.cpp:103
static int luaB_coresume(lua_State *L)
Definition: lcorolib.cpp:48
static int luaB_corunning(lua_State *L)
Definition: lcorolib.cpp:131

Definition at line 138 of file lcorolib.cpp.