43 lines
1018 B
C++
43 lines
1018 B
C++
#pragma once
|
|
#include "includes.h"
|
|
|
|
|
|
struct lua_stack
|
|
{
|
|
typedef uint8_t type_t;
|
|
enum TYPES : type_t
|
|
{
|
|
NIL,
|
|
NUMBER,
|
|
BOOLEAN,
|
|
INTEGER,
|
|
LSTRING,
|
|
STRING,
|
|
USERDATA,
|
|
THREAD,
|
|
CFUNCTION,
|
|
CCLOSURE,
|
|
TABLE
|
|
};
|
|
void push_nil (void);
|
|
void push_boolean (const bool val);
|
|
void push_integer (const lua_Integer val);
|
|
void push_number (const lua_Number val);
|
|
void push_lstring (const char* beg, const char* end);
|
|
void push_lstring (const std::string::iterator& beg, const std::string::iterator& end);
|
|
void push_lstring (const char* val, const size_t slen);
|
|
void push_string (const char* val);
|
|
void push_string (const std::string& val);
|
|
void push_lightuserdata (void* p);
|
|
void push_thread (lua_State* L);
|
|
void push_cfunction (const lua_CFunction f);
|
|
void push_cclosure (const lua_CFunction fn, const int num_upvalues);
|
|
void push_table (lua_State* L, const int tbl_idx);
|
|
|
|
void value_type(const size_t idx);
|
|
|
|
uint8_t* m_data;
|
|
uint8_t* m_types;
|
|
size_t m_size;
|
|
size_t m_capacity;
|
|
}; |