RetroArch
Classes | Macros | Functions | Variables
testlib.c File Reference
#include <sys/types.h>
#include <sys/stat.h>
#include <unistd.h>
#include <errno.h>
#include <string.h>
#include <streams/file_stream.h>
#include "lua.h"
#include "lauxlib.h"
#include "libretrodb.h"
#include "lua_common.h"
Include dependency graph for testlib.c:

Classes

struct  libretrodb
 

Macros

#define LUA_LIB
 

Functions

static void push_rmsgpack_value (lua_State *L, struct rmsgpack_dom_value *value)
 
static int value_provider (void *ctx, struct rmsgpack_dom_value *out)
 
static int create_db (lua_State *L)
 
static int db_new (lua_State *L)
 
static libretrodb_tcheckdb (lua_State *L)
 
static int db_close (lua_State *L)
 
static int db_cursor_open (lua_State *L)
 
static int db_query (lua_State *L)
 
static libretrodb_cursor_tcheckcursor (lua_State *L)
 
static int cursor_close (lua_State *L)
 
static int cursor_read (lua_State *L)
 
static int cursor_iter (lua_State *L)
 
LUALIB_API int luaopen_testlib (lua_State *L)
 

Variables

static const luaL_Reg testlib []
 
static const struct luaL_Reg cursor_mt []
 
static const struct luaL_Reg libretrodb_mt []
 

Macro Definition Documentation

◆ LUA_LIB

#define LUA_LIB

Function Documentation

◆ checkcursor()

static libretrodb_cursor_t* checkcursor ( lua_State L)
static
Here is the call graph for this function:
Here is the caller graph for this function:

◆ checkdb()

static libretrodb_t* checkdb ( lua_State L)
static
Here is the call graph for this function:
Here is the caller graph for this function:

◆ create_db()

static int create_db ( lua_State L)
static
Here is the call graph for this function:

◆ cursor_close()

static int cursor_close ( lua_State L)
static
Here is the call graph for this function:

◆ cursor_iter()

static int cursor_iter ( lua_State L)
static
Here is the call graph for this function:

◆ cursor_read()

static int cursor_read ( lua_State L)
static
Here is the call graph for this function:

◆ db_close()

static int db_close ( lua_State L)
static
Here is the call graph for this function:

◆ db_cursor_open()

static int db_cursor_open ( lua_State L)
static
Here is the call graph for this function:

◆ db_new()

static int db_new ( lua_State L)
static
Here is the call graph for this function:

◆ db_query()

static int db_query ( lua_State L)
static
Here is the call graph for this function:

◆ luaopen_testlib()

LUALIB_API int luaopen_testlib ( lua_State L)
Here is the call graph for this function:

◆ push_rmsgpack_value()

static void push_rmsgpack_value ( lua_State L,
struct rmsgpack_dom_value value 
)
static
Here is the call graph for this function:
Here is the caller graph for this function:

◆ value_provider()

static int value_provider ( void ctx,
struct rmsgpack_dom_value out 
)
static
Here is the call graph for this function:
Here is the caller graph for this function:

Variable Documentation

◆ cursor_mt

const struct luaL_Reg cursor_mt[]
static
Initial value:
= {
{"__gc", cursor_close},
{"read", cursor_read},
{"iter", cursor_iter},
}
static int cursor_close(lua_State *L)
Definition: testlib.c:223
static int cursor_read(lua_State *L)
Definition: testlib.c:230
#define NULL
Pointer to 0.
Definition: gctypes.h:65
static int cursor_iter(lua_State *L)
Definition: testlib.c:241

◆ libretrodb_mt

const struct luaL_Reg libretrodb_mt[]
static
Initial value:
= {
{"__gc", db_close},
{"list_all", db_cursor_open},
{"query", db_query},
}
static int db_query(lua_State *L)
Definition: testlib.c:181
#define NULL
Pointer to 0.
Definition: gctypes.h:65
static int db_close(lua_State *L)
Definition: testlib.c:153
static int db_cursor_open(lua_State *L)
Definition: testlib.c:160

◆ testlib

const luaL_Reg testlib[]
static
Initial value:
= {
{"create_db", create_db},
{"RarchDB", db_new},
}
#define NULL
Pointer to 0.
Definition: gctypes.h:65
static int db_new(lua_State *L)
Definition: testlib.c:124
static int create_db(lua_State *L)
Definition: testlib.c:97