text
stringlengths
1
24.5M
#include <JSON/Number.hpp> #include <fmt/core.h> #include <fmt/xchar.h> namespace RC::JSON { Number::Number(uint32_t value) { *std::bit_cast<uint32_t*>(&m_value.as_integer) = value; m_stored_type = Type::UInt32; m_is_signed = false; } Number::Number(uint64_t value) { ...
#include <JSON/Array.hpp> #include <JSON/Bool.hpp> #include <JSON/Null.hpp> #include <JSON/Object.hpp> #include <JSON/String.hpp> #include <fmt/core.h> #include <fmt/xchar.h> namespace RC::JSON { auto Object::find_value_by_key(const StringType& look_for_key) const -> Value* { if (auto it = m_members.f...
#include <JSON/String.hpp> #include <fmt/core.h> #include <fmt/xchar.h> namespace RC::JSON { String::String(StringViewType string) : m_data(string) { } auto String::serialize([[maybe_unused]] ShouldFormat should_format, [[maybe_unused]] int32_t* indent_level) -> StringType { return fmt::f...
#include <JSON/Parser/Parser.hpp> #include <JSON/Parser/TokenParser.hpp> #include <JSON/Parser/Tokens.hpp> #include <ParserBase/Token.hpp> namespace RC::JSON::Parser { namespace Internal { static auto create_available_tokens_for_tokenizer() -> ParserBase::TokenContainer { ParserBase...
#include <algorithm> #include <cwctype> #include <format> #include <stdexcept> #include <string> #include <Helpers/String.hpp> #include <JSON/Parser/TokenParser.hpp> #include <ParserBase/Token.hpp> namespace RC::JSON::Parser { #define RC_ASSERT(Expression) ...
#pragma once #ifndef RC_LUA_MADE_SIMPLE_EXPORTS #ifndef RC_LUA_MADE_SIMPLE_BUILD_STATIC #ifndef RC_LMS_API #define RC_LMS_API __declspec(dllimport) #endif #else #ifndef RC_LMS_API #define RC_LMS_API #endif #endif #else #ifndef RC_LMS_API #define RC_LMS_API __declspec(dllexport) #endif #endif
#pragma once #include <format> #include <functional> #include <optional> #include <LuaMadeSimple/Common.hpp> #include <lua.hpp> #include <fmt/core.h> namespace RC::LuaMadeSimple { // To be used in the future to decide whether it's safe to perform any Lua actions enum class GlobalState { Ready, ...
#pragma once #include <LuaMadeSimple/LuaMadeSimple.hpp> #include <string> namespace RC::LuaMadeSimple::Type { enum class IsFinal { Yes, No }; enum class Operation { Get, // Return to Lua some value that it can work with GetNonTrivialLocal, // Return ...
#include <stdexcept> #include <vector> #include <LuaMadeSimple/LuaMadeSimple.hpp> #include <LuaMadeSimple/LuaObject.hpp> #include <Helpers/String.hpp> namespace RC::LuaMadeSimple { // All lua instances, lua_State* are stored in the Lua class static std::unordered_map<lua_State*, std::shared_ptr<Lua>> lua_ins...
#include <LuaMadeSimple/LuaObject.hpp> namespace RC::LuaMadeSimple::Type { }
/* ** $Id: lapi.h $ ** Auxiliary functions from Lua API ** See Copyright Notice in lua.h */ #ifndef lapi_h #define lapi_h #include "llimits.h" #include "lstate.h" /* Increments 'L->top.p', checking for stack overflows */ #define api_incr_top(L) {L->top.p++; \ api_check(L, L->top.p <= L->ci->top.p, \ "stac...
/* ** $Id: lauxlib.h $ ** Auxiliary functions for building Lua libraries ** See Copyright Notice in lua.h */ #ifndef lauxlib_h #define lauxlib_h #include <stddef.h> #include <stdio.h> #include "luaconf.h" #include "lua.h" /* global table */ #define LUA_GNAME "_G" typedef struct luaL_Buffer luaL_Buffer; /* ex...
/* ** $Id: lcode.h $ ** Code generator for Lua ** See Copyright Notice in lua.h */ #ifndef lcode_h #define lcode_h #include "llex.h" #include "lobject.h" #include "lopcodes.h" #include "lparser.h" /* ** Marks the end of a patch list. It is an invalid value both as an absolute ** address, and as a list link (would l...
/* ** $Id: lctype.h $ ** 'ctype' functions for Lua ** See Copyright Notice in lua.h */ #ifndef lctype_h #define lctype_h #include "lua.h" /* ** WARNING: the functions defined here do not necessarily correspond ** to the similar functions in the standard C ctype.h. They are ** optimized for the specific needs of Lua...
/* ** $Id: ldebug.h $ ** Auxiliary functions from Debug Interface module ** See Copyright Notice in lua.h */ #ifndef ldebug_h #define ldebug_h #include "lstate.h" #define pcRel(pc, p) (cast_int((pc) - (p)->code) - 1) /* Active Lua function (given call info) */ #define ci_func(ci) (clLvalue(s2v((ci)->func.p))) ...
/* ** $Id: ldo.h $ ** Stack and Call structure of Lua ** See Copyright Notice in lua.h */ #ifndef ldo_h #define ldo_h #include "llimits.h" #include "lobject.h" #include "lstate.h" #include "lzio.h" /* ** Macro to check stack size and grow stack if needed. Parameters ** 'pre'/'pos' allow the macro to preserve a po...
/* ** $Id: lfunc.h $ ** Auxiliary functions to manipulate prototypes and closures ** See Copyright Notice in lua.h */ #ifndef lfunc_h #define lfunc_h #include "lobject.h" #define sizeCclosure(n) (cast_int(offsetof(CClosure, upvalue)) + \ cast_int(sizeof(TValue)) * (n)) #define sizeLclosur...
/* ** $Id: lgc.h $ ** Garbage Collector ** See Copyright Notice in lua.h */ #ifndef lgc_h #define lgc_h #include "lobject.h" #include "lstate.h" /* ** Collectable objects may have one of three colors: white, which means ** the object is not marked; gray, which means the object is marked, but ** its references may b...
/* ** $Id: ljumptab.h $ ** Jump Table for the Lua interpreter ** See Copyright Notice in lua.h */ #undef vmdispatch #undef vmcase #undef vmbreak #define vmdispatch(x) goto *disptab[x]; #define vmcase(l) L_##l: #define vmbreak vmfetch(); vmdispatch(GET_OPCODE(i)); static const void *const disptab[NUM_OPC...
/* ** $Id: llex.h $ ** Lexical Analyzer ** See Copyright Notice in lua.h */ #ifndef llex_h #define llex_h #include <limits.h> #include "lobject.h" #include "lzio.h" /* ** Single-char tokens (terminal symbols) are represented by their own ** numeric code. Other tokens start at the following value. */ #define FIRST_...
/* ** $Id: llimits.h $ ** Limits, basic types, and some other 'installation-dependent' definitions ** See Copyright Notice in lua.h */ #ifndef llimits_h #define llimits_h #include <limits.h> #include <stddef.h> #include "lua.h" /* ** 'lu_mem' and 'l_mem' are unsigned/signed integers big enough to count ** the to...
/* ** $Id: lmem.h $ ** Interface to Memory Manager ** See Copyright Notice in lua.h */ #ifndef lmem_h #define lmem_h #include <stddef.h> #include "llimits.h" #include "lua.h" #define luaM_error(L) luaD_throw(L, LUA_ERRMEM) /* ** This macro tests whether it is safe to multiply 'n' by the size of ** type 't' with...
/* ** $Id: lobject.h $ ** Type definitions for Lua objects ** See Copyright Notice in lua.h */ #ifndef lobject_h #define lobject_h #include <stdarg.h> #include "llimits.h" #include "lua.h" /* ** Extra types for collectable non-values */ #define LUA_TUPVAL LUA_NUMTYPES /* upvalues */ #define LUA_TPROTO (LUA_NUM...
/* ** $Id: lopcodes.h $ ** Opcodes for Lua virtual machine ** See Copyright Notice in lua.h */ #ifndef lopcodes_h #define lopcodes_h #include "llimits.h" /*=========================================================================== We assume that instructions are unsigned 32-bit integers. All instructions have ...
/* ** $Id: lopnames.h $ ** Opcode names ** See Copyright Notice in lua.h */ #if !defined(lopnames_h) #define lopnames_h #include <stddef.h> /* ORDER OP */ static const char *const opnames[] = { "MOVE", "LOADI", "LOADF", "LOADK", "LOADKX", "LOADFALSE", "LFALSESKIP", "LOADTRUE", "LOADNIL", "GETUP...
/* ** $Id: lparser.h $ ** Lua Parser ** See Copyright Notice in lua.h */ #ifndef lparser_h #define lparser_h #include "llimits.h" #include "lobject.h" #include "lzio.h" /* ** Expression and variable descriptor. ** Code generation for variables and expressions can be delayed to allow ** optimizations; An 'expdesc' s...
/* ** $Id: lprefix.h $ ** Definitions for Lua code that must come before any other header file ** See Copyright Notice in lua.h */ #ifndef lprefix_h #define lprefix_h /* ** Allows POSIX/XSI stuff */ #if !defined(LUA_USE_C89) /* { */ #if !defined(_XOPEN_SOURCE) #define _XOPEN_SOURCE 600 #elif _XOPEN_SOURCE...
/* ** $Id: lstate.h $ ** Global State ** See Copyright Notice in lua.h */ #ifndef lstate_h #define lstate_h #include "lua.h" /* Some header files included here need this definition */ typedef struct CallInfo CallInfo; #include "lobject.h" #include "ltm.h" #include "lzio.h" /* ** Some notes about garbage-collect...
/* ** $Id: lstring.h $ ** String table (keep all strings handled by Lua) ** See Copyright Notice in lua.h */ #ifndef lstring_h #define lstring_h #include "lgc.h" #include "lobject.h" #include "lstate.h" /* ** Memory-allocation error message must be preallocated (it cannot ** be created after memory is exhausted) */...
/* ** $Id: ltable.h $ ** Lua tables (hash) ** See Copyright Notice in lua.h */ #ifndef ltable_h #define ltable_h #include "lobject.h" #define gnode(t,i) (&(t)->node[i]) #define gval(n) (&(n)->i_val) #define gnext(n) ((n)->u.next) /* ** Clear all bits of fast-access metamethods, which means that the table ** may ...
/* ** $Id: ltests.h $ ** Internal Header for Debugging of the Lua Implementation ** See Copyright Notice in lua.h */ #ifndef ltests_h #define ltests_h #include <stdio.h> #include <stdlib.h> /* test Lua with compatibility code */ #define LUA_COMPAT_MATHLIB #define LUA_COMPAT_LT_LE #define LUA_DEBUG /* turn on as...
/* ** $Id: ltm.h $ ** Tag methods ** See Copyright Notice in lua.h */ #ifndef ltm_h #define ltm_h #include "lobject.h" /* * WARNING: if you change the order of this enumeration, * grep "ORDER TM" and "ORDER OP" */ typedef enum { TM_INDEX, TM_NEWINDEX, TM_GC, TM_MODE, TM_LEN, TM_EQ, /* last tag method ...
/* ** $Id: lua.h $ ** Lua - A Scripting Language ** Lua.org, PUC-Rio, Brazil (http://www.lua.org) ** See Copyright Notice at the end of this file */ #ifndef lua_h #define lua_h #include <stdarg.h> #include <stddef.h> #include "luaconf.h" #define LUA_VERSION_MAJOR "5" #define LUA_VERSION_MINOR "4" #define LUA_VER...
// lua.hpp // Lua header files for C++ // <<extern "C">> not supplied automatically because Lua also compiles as C++ // When Lua is compiled as C, we need extern "C" wrappers // When Lua is compiled as C++, we don't want them #ifndef LUA_COMPILED_AS_CPP extern "C" { #endif #include "lua.h" #include "lualib.h" ...
/* ** $Id: luaconf.h $ ** Configuration file for Lua ** See Copyright Notice in lua.h */ #ifndef luaconf_h #define luaconf_h #include <limits.h> #include <stddef.h> /* ** =================================================================== ** General Configuration File for Lua ** ** Some definitions here can be cha...
/* ** $Id: lualib.h $ ** Lua standard libraries ** See Copyright Notice in lua.h */ #ifndef lualib_h #define lualib_h #include "lua.h" /* version suffix for environment variable names */ #define LUA_VERSUFFIX "_" LUA_VERSION_MAJOR "_" LUA_VERSION_MINOR LUAMOD_API int (luaopen_base) (lua_State *L); #def...
/* ** $Id: lundump.h $ ** load precompiled Lua chunks ** See Copyright Notice in lua.h */ #ifndef lundump_h #define lundump_h #include "llimits.h" #include "lobject.h" #include "lzio.h" /* data to catch conversion errors */ #define LUAC_DATA "\x19\x93\r\n\x1a\n" #define LUAC_INT 0x5678 #define LUAC_NUM cast_num(37...
/* ** $Id: lvm.h $ ** Lua virtual machine ** See Copyright Notice in lua.h */ #ifndef lvm_h #define lvm_h #include "ldo.h" #include "lobject.h" #include "ltm.h" #if !defined(LUA_NOCVTN2S) #define cvt2str(o) ttisnumber(o) #else #define cvt2str(o) 0 /* no conversion from numbers to strings */ #endif #if !defined(L...
/* ** $Id: lzio.h $ ** Buffered streams ** See Copyright Notice in lua.h */ #ifndef lzio_h #define lzio_h #include "lua.h" #include "lmem.h" #define EOZ (-1) /* end of stream */ typedef struct Zio ZIO; #define zgetc(z) (((z)->n--)>0 ? cast_uchar(*(z)->p++) : luaZ_fill(z)) typedef struct Mbuffer { char *...
/* ** $Id: lapi.c $ ** Lua API ** See Copyright Notice in lua.h */ #define lapi_c #define LUA_CORE #include "lprefix.h" #include <limits.h> #include <stdarg.h> #include <string.h> #include "lua.h" #include "lapi.h" #include "ldebug.h" #include "ldo.h" #include "lfunc.h" #include "lgc.h" #include "lmem.h" #include...
/* ** $Id: lauxlib.c $ ** Auxiliary functions for building Lua libraries ** See Copyright Notice in lua.h */ #define lauxlib_c #define LUA_LIB #include "lprefix.h" #include <errno.h> #include <stdarg.h> #include <stdio.h> #include <stdlib.h> #include <string.h> /* ** This file uses only the official API of Lua. *...
/* ** $Id: lbaselib.c $ ** Basic library ** See Copyright Notice in lua.h */ #define lbaselib_c #define LUA_LIB #include "lprefix.h" #include <ctype.h> #include <stdio.h> #include <stdlib.h> #include <string.h> #include "lua.h" #include "lauxlib.h" #include "lualib.h" static int luaB_print (lua_State *L) { in...
/* ** $Id: lcode.c $ ** Code generator for Lua ** See Copyright Notice in lua.h */ #define lcode_c #define LUA_CORE #include "lprefix.h" #include <float.h> #include <limits.h> #include <math.h> #include <stdlib.h> #include "lua.h" #include "lcode.h" #include "ldebug.h" #include "ldo.h" #include "lgc.h" #include "...
/* ** $Id: lcorolib.c $ ** Coroutine Library ** See Copyright Notice in lua.h */ #define lcorolib_c #define LUA_LIB #include "lprefix.h" #include <stdlib.h> #include "lua.h" #include "lauxlib.h" #include "lualib.h" static lua_State *getco (lua_State *L) { lua_State *co = lua_tothread(L, 1); luaL_argexpected...
/* ** $Id: lctype.c $ ** 'ctype' functions for Lua ** See Copyright Notice in lua.h */ #define lctype_c #define LUA_CORE #include "lprefix.h" #include "lctype.h" #if !LUA_USE_CTYPE /* { */ #include <limits.h> #if defined (LUA_UCID) /* accept UniCode IDentifiers? */ /* consider all non-ascii codepoints to be al...
/* ** $Id: ldblib.c $ ** Interface from Lua to its debug API ** See Copyright Notice in lua.h */ #define ldblib_c #define LUA_LIB #include "lprefix.h" #include <stdio.h> #include <stdlib.h> #include <string.h> #include "lua.h" #include "lauxlib.h" #include "lualib.h" /* ** The hook table at registry[HOOKKEY] ma...
/* ** $Id: ldebug.c $ ** Debug Interface ** See Copyright Notice in lua.h */ #define ldebug_c #define LUA_CORE #include "lprefix.h" #include <stdarg.h> #include <stddef.h> #include <string.h> #include "lua.h" #include "lapi.h" #include "lcode.h" #include "ldebug.h" #include "ldo.h" #include "lfunc.h" #include "lo...
/* ** $Id: ldo.c $ ** Stack and Call structure of Lua ** See Copyright Notice in lua.h */ #define ldo_c #define LUA_CORE #include "lprefix.h" #include <setjmp.h> #include <stdlib.h> #include <string.h> #include "lua.h" #include "lapi.h" #include "ldebug.h" #include "ldo.h" #include "lfunc.h" #include "lgc.h" #inc...
/* ** $Id: ldump.c $ ** save precompiled Lua chunks ** See Copyright Notice in lua.h */ #define ldump_c #define LUA_CORE #include "lprefix.h" #include <limits.h> #include <stddef.h> #include "lua.h" #include "lobject.h" #include "lstate.h" #include "lundump.h" typedef struct { lua_State *L; lua_Writer write...
/* ** $Id: lfunc.c $ ** Auxiliary functions to manipulate prototypes and closures ** See Copyright Notice in lua.h */ #define lfunc_c #define LUA_CORE #include "lprefix.h" #include <stddef.h> #include "lua.h" #include "ldebug.h" #include "ldo.h" #include "lfunc.h" #include "lgc.h" #include "lmem.h" #include "lobj...
/* ** $Id: lgc.c $ ** Garbage Collector ** See Copyright Notice in lua.h */ #define lgc_c #define LUA_CORE #include "lprefix.h" #include <stdio.h> #include <string.h> #include "lua.h" #include "ldebug.h" #include "ldo.h" #include "lfunc.h" #include "lgc.h" #include "lmem.h" #include "lobject.h" #include "lstate.h...
/* ** $Id: linit.c $ ** Initialization of libraries for lua.c and other clients ** See Copyright Notice in lua.h */ #define linit_c #define LUA_LIB /* ** If you embed Lua in your program and need to open the standard ** libraries, call luaL_openlibs in your program. If you need a ** different set of libraries, copy ...
/* ** $Id: liolib.c $ ** Standard I/O (and system) library ** See Copyright Notice in lua.h */ #define liolib_c #define LUA_LIB #include "lprefix.h" #include <ctype.h> #include <errno.h> #include <locale.h> #include <stdio.h> #include <stdlib.h> #include <string.h> #include "lua.h" #include "lauxlib.h" #include "...
/* ** $Id: llex.c $ ** Lexical Analyzer ** See Copyright Notice in lua.h */ #define llex_c #define LUA_CORE #include "lprefix.h" #include <locale.h> #include <string.h> #include "lua.h" #include "lctype.h" #include "ldebug.h" #include "ldo.h" #include "lgc.h" #include "llex.h" #include "lobject.h" #include "lpars...
/* ** $Id: lmathlib.c $ ** Standard mathematical library ** See Copyright Notice in lua.h */ #define lmathlib_c #define LUA_LIB #include "lprefix.h" #include <float.h> #include <limits.h> #include <math.h> #include <stdlib.h> #include <time.h> #include "lua.h" #include "lauxlib.h" #include "lualib.h" #undef PI ...
/* ** $Id: lmem.c $ ** Interface to Memory Manager ** See Copyright Notice in lua.h */ #define lmem_c #define LUA_CORE #include "lprefix.h" #include <stddef.h> #include "lua.h" #include "ldebug.h" #include "ldo.h" #include "lgc.h" #include "lmem.h" #include "lobject.h" #include "lstate.h" /* ** About the reall...
/* ** $Id: loadlib.c $ ** Dynamic library loader for Lua ** See Copyright Notice in lua.h ** ** This module contains an implementation of loadlib for Unix systems ** that have dlfcn, an implementation for Windows, and a stub for other ** systems. */ #define loadlib_c #define LUA_LIB #include "lprefix.h" #include <s...
/* ** $Id: lobject.c $ ** Some generic functions over Lua objects ** See Copyright Notice in lua.h */ #define lobject_c #define LUA_CORE #include "lprefix.h" #include <locale.h> #include <math.h> #include <stdarg.h> #include <stdio.h> #include <stdlib.h> #include <string.h> #include "lua.h" #include "lctype.h" #i...
/* ** $Id: lopcodes.c $ ** Opcodes for Lua virtual machine ** See Copyright Notice in lua.h */ #define lopcodes_c #define LUA_CORE #include "lprefix.h" #include "lopcodes.h" /* ORDER OP */ LUAI_DDEF const lu_byte luaP_opmodes[NUM_OPCODES] = { /* MM OT IT T A mode opcode */ opmode(0, 0, 0, 0, 1, iA...
/* ** $Id: loslib.c $ ** Standard Operating System library ** See Copyright Notice in lua.h */ #define loslib_c #define LUA_LIB #include "lprefix.h" #include <errno.h> #include <locale.h> #include <stdlib.h> #include <string.h> #include <time.h> #include "lua.h" #include "lauxlib.h" #include "lualib.h" /* ** {=...
/* ** $Id: lparser.c $ ** Lua Parser ** See Copyright Notice in lua.h */ #define lparser_c #define LUA_CORE #include "lprefix.h" #include <limits.h> #include <string.h> #include "lua.h" #include "lcode.h" #include "ldebug.h" #include "ldo.h" #include "lfunc.h" #include "llex.h" #include "lmem.h" #include "lobject...
/* ** $Id: lstate.c $ ** Global State ** See Copyright Notice in lua.h */ #define lstate_c #define LUA_CORE #include "lprefix.h" #include <stddef.h> #include <string.h> #include "lua.h" #include "lapi.h" #include "ldebug.h" #include "ldo.h" #include "lfunc.h" #include "lgc.h" #include "llex.h" #include "lmem.h" #...
/* ** $Id: lstring.c $ ** String table (keeps all strings handled by Lua) ** See Copyright Notice in lua.h */ #define lstring_c #define LUA_CORE #include "lprefix.h" #include <string.h> #include "lua.h" #include "ldebug.h" #include "ldo.h" #include "lmem.h" #include "lobject.h" #include "lstate.h" #include "lstri...
/* ** $Id: lstrlib.c $ ** Standard library for string operations and pattern-matching ** See Copyright Notice in lua.h */ #define lstrlib_c #define LUA_LIB #include "lprefix.h" #include <ctype.h> #include <float.h> #include <limits.h> #include <locale.h> #include <math.h> #include <stddef.h> #include <stdio.h> #inc...
/* ** $Id: ltable.c $ ** Lua tables (hash) ** See Copyright Notice in lua.h */ #define ltable_c #define LUA_CORE #include "lprefix.h" /* ** Implementation of tables (aka arrays, objects, or hash tables). ** Tables keep its elements in two parts: an array part and a hash part. ** Non-negative integer keys are all ca...
/* ** $Id: ltablib.c $ ** Library for Table Manipulation ** See Copyright Notice in lua.h */ #define ltablib_c #define LUA_LIB #include "lprefix.h" #include <limits.h> #include <stddef.h> #include <string.h> #include "lua.h" #include "lauxlib.h" #include "lualib.h" /* ** Operations that an object must define to...
/* ** $Id: ltm.c $ ** Tag methods ** See Copyright Notice in lua.h */ #define ltm_c #define LUA_CORE #include "lprefix.h" #include <string.h> #include "lua.h" #include "ldebug.h" #include "ldo.h" #include "lgc.h" #include "lobject.h" #include "lstate.h" #include "lstring.h" #include "ltable.h" #include "ltm.h" #i...
/* ** $Id: lua.c $ ** Lua stand-alone interpreter ** See Copyright Notice in lua.h */ #define lua_c #include "lprefix.h" #include <stdio.h> #include <stdlib.h> #include <string.h> #include <signal.h> #include "lua.h" #include "lauxlib.h" #include "lualib.h" #if !defined(LUA_PROGNAME) #define LUA_PROGNAME "lua...
/* ** $Id: luac.c $ ** Lua compiler (saves bytecodes to files; also lists bytecodes) ** See Copyright Notice in lua.h */ #define luac_c #define LUA_CORE #include "lprefix.h" #include <ctype.h> #include <errno.h> #include <stdio.h> #include <stdlib.h> #include <string.h> #include "lua.h" #include "lauxlib.h" #inclu...
#include <windows.h> #include "lua.h" static struct { CRITICAL_SECTION LockSct; BOOL Init; } Gl; void LuaLockInitial(lua_State* L) { if (!Gl.Init) { /* Create a mutex */ InitializeCriticalSection(&Gl.LockSct); Gl.Init = TRUE; } } void LuaLockFinal(lua_State* L) { /* De...
/* ** $Id: lundump.c $ ** load precompiled Lua chunks ** See Copyright Notice in lua.h */ #define lundump_c #define LUA_CORE #include "lprefix.h" #include <limits.h> #include <string.h> #include "lua.h" #include "ldebug.h" #include "ldo.h" #include "lfunc.h" #include "lmem.h" #include "lobject.h" #include "lstrin...
/* ** $Id: lutf8lib.c $ ** Standard library for UTF-8 manipulation ** See Copyright Notice in lua.h */ #define lutf8lib_c #define LUA_LIB #include "lprefix.h" #include <assert.h> #include <limits.h> #include <stdlib.h> #include <string.h> #include "lua.h" #include "lauxlib.h" #include "lualib.h" #define MAXUNIC...
/* ** $Id: lvm.c $ ** Lua virtual machine ** See Copyright Notice in lua.h */ #define lvm_c #define LUA_CORE #include "lprefix.h" #include <float.h> #include <limits.h> #include <math.h> #include <stdio.h> #include <stdlib.h> #include <string.h> #include "lua.h" #include "ldebug.h" #include "ldo.h" #include "lfunc...
/* ** $Id: lzio.c $ ** Buffered streams ** See Copyright Notice in lua.h */ #define lzio_c #define LUA_CORE #include "lprefix.h" #include <string.h> #include "lua.h" #include "llimits.h" #include "lmem.h" #include "lstate.h" #include "lzio.h" int luaZ_fill (ZIO *z) { size_t size; lua_State *L = z->L; cons...
#pragma once #include <cstdio> namespace RC { class ErrorObject { private: static constexpr unsigned long long m_message_buffer_max_size = 2000; char m_message[m_message_buffer_max_size]{"An error occurred but no error message was supplied."}; bool m_close_program{false}; ...
#pragma once #include <initializer_list> #include <memory> #include <ErrorObject.hpp> #include <ProgramFeatures/CanError.hpp> namespace RC { class MProgram : public CanError { public: enum BinaryOptions : int { Nothing = 0, CloseOnError, Max ...
#ifndef UE4SS_CANERROR_HPP #define UE4SS_CANERROR_HPP // Define MPROGRAM_USE_EXCEPTIONS to enable exceptions #include <memory> #include <stdexcept> #include <utility> #include <ErrorObject.hpp> namespace RC { class CanError { protected: std::shared_ptr<ErrorObject> m_error_object{}; pub...
#pragma once #ifndef RC_PARSER_BASE_EXPORTS #ifndef RC_PARSER_BASE_BUILD_STATIC #ifndef RC_PB_API #define RC_PB_API __declspec(dllimport) #endif #else #ifndef RC_PB_API #define RC_PB_API #endif #endif #else #ifndef RC_PB_API #define RC_PB_API __declspec(dllexport) #endif #endif
#pragma once #include <memory> #include <string> #include <vector> #include <File/Macros.hpp> #include <ParserBase/Common.hpp> namespace RC::ParserBase { class TokenRule { private: File::StringType m_debug_name; public: explicit TokenRule(File::StringViewType rule_name) : m_debug...
#pragma once #include <memory> #include <stdexcept> #include <string> #include <vector> #include <File/Macros.hpp> #include <ParserBase/Common.hpp> #include <String/StringType.hpp> namespace RC::ParserBase { class Token; template <typename SupposedEnum> concept EnumType = std::is_enum_v<SupposedEnum> &&...
#pragma once #include <functional> #include <optional> #include <string> #include <vector> #include <File/Macros.hpp> #include <ParserBase/Common.hpp> namespace RC::ParserBase { using OrDoCallable = void (*)(); class TokenParser { public: enum class Operation { ContinueA...
#include <ParserBase/Token.hpp> namespace RC::ParserBase { Token::Token(int type, File::StringViewType name, File::StringViewType identifier, Token::HasData has_data) : m_debug_name(name), m_identifier(identifier), m_type(type), m_has_data(has_data) { } auto Token::get_type() const -> int ...
#include <fstream> #include <sstream> #include <ParserBase/Token.hpp> #include <ParserBase/Tokenizer.hpp> namespace RC::ParserBase { auto TokenContainer::add(Token token) -> size_t { m_tokens.emplace_back(std::move(token)); return m_tokens.size() - 1; } auto TokenContainer::set_eof_to...
#include <ParserBase/Token.hpp> #include <ParserBase/TokenParser.hpp> #include <ParserBase/Tokenizer.hpp> namespace RC::ParserBase { TokenParser::TokenParser(const Tokenizer& tokenizer, File::StringType& input) : m_tokenizer(tokenizer), m_data(input) { } auto TokenParser::get_token(size_t index) const...
#pragma once #if STATS && !DISABLE_PROFILER #if IS_TRACY #define TRACY_ENABLE 1 #include <tracy/Tracy.hpp> #define ProfilerFrameMark() FrameMark #define ProfilerFrameMarkNamed(name) FrameMarkNamed(name) #define ProfilerScope() ZoneScoped #define ProfilerTransientScopeNamed(scope, name, active) ZoneTransientN(scop...
#ifndef UE4SS_REWRITTEN_SCOPEDTIMER_HPP #define UE4SS_REWRITTEN_SCOPEDTIMER_HPP #include <chrono> namespace RC { class ScopedTimer { private: std::chrono::time_point<std::chrono::steady_clock> m_start; double* m_dur_storage; bool m_timer_stopped{}; public: ScopedTi...
#pragma once #ifndef RC_SINGLE_PASS_SIG_SCANNER_EXPORTS #ifndef RC_SINGLE_PASS_SIG_SCANNER_BUILD_STATIC #ifndef RC_SPSS_API #define RC_SPSS_API __declspec(dllimport) #endif #else #ifndef RC_SPSS_API #define RC_SPSS_API #endif #endif #else #ifndef RC_SPSS_API #define RC_SPSS_API __declspec(dllexport) #endif #endif
#pragma once #include <array> #include <functional> #include <mutex> #include <vector> #include <SigScanner/Common.hpp> #define HI_NIBBLE(b) (((b) >> 4) & 0x0F) #define LO_NIBBLE(b) ((b) & 0x0F) // Windows.h forward declarations struct _SYSTEM_INFO; typedef _SYSTEM_INFO SYSTEM_INFO; struct _MODULEINFO; typedef _MOD...
#include <format> #include <future> #include <regex> #define NOMINMAX #include <Windows.h> #include <Psapi.h> #include <fmt/core.h> #include <Profiler/Profiler.hpp> #include <SigScanner/SinglePassSigScanner.hpp> namespace RC { ScanTargetArray SigScannerStaticData::m_modules_info; bool SigScannerStaticData::m...
#pragma once #include <string> #include <type_traits> // We will use this once we solve the circular dependency issue // #include <Unreal/Core/HAL/Platform.hpp> // This is a debug flag to force the use of u16string for testing purposes // char16_t and wchar_t are two different types, so we need to force the use of o...
/* OpenGL loader generated by glad 0.1.36 on Tue Feb 6 22:08:17 2024. Language/Generator: C/C++ Specification: gl APIs: gl=3.3 Profile: core Extensions: Loader: True Local files: False Omit khrplatform: False Reproducible: False Commandline: --profile="co...
#ifndef __khrplatform_h_ #define __khrplatform_h_ /* ** Copyright (c) 2008-2018 The Khronos Group Inc. ** ** Permission is hereby granted, free of charge, to any person obtaining a ** copy of this software and/or associated documentation files (the ** "Materials"), to deal in the Materials without restriction, includi...
/* OpenGL loader generated by glad 0.1.36 on Tue Feb 6 22:08:17 2024. Language/Generator: C/C++ Specification: gl APIs: gl=3.3 Profile: core Extensions: Loader: True Local files: False Omit khrplatform: False Reproducible: False Commandline: --profile="co...
/************************************************************************* * GLFW 3.3 - www.glfw.org * A library for OpenGL, window and input *------------------------------------------------------------------------ * Copyright (c) 2002-2006 Marcus Geelnard * Copyright (c) 2006-2019 Camilla Löwy <elmindreda@glfw....
/************************************************************************* * GLFW 3.3 - www.glfw.org * A library for OpenGL, window and input *------------------------------------------------------------------------ * Copyright (c) 2002-2006 Marcus Geelnard * Copyright (c) 2006-2018 Camilla Löwy <elmindreda@glfw....
if (auto val = parser.get_int64(STR("UObjectBase"), STR("ObjectFlags"), -1); val != -1) Unreal::UObjectBase::MemberOffsets.emplace(STR("ObjectFlags"), static_cast<int32_t>(val)); if (auto val = parser.get_int64(STR("UObjectBase"), STR("InternalIndex"), -1); val != -1) Unreal::UObjectBase::MemberOffsets.emplace(...
#pragma once #ifndef RC_UE4SS_EXPORTS #ifndef RC_UE4SS_API #define RC_UE4SS_API __declspec(dllimport) #endif #else #ifndef RC_UE4SS_API #define RC_UE4SS_API __declspec(dllexport) #endif #endif
#pragma once #include <memory> namespace PLH { class IatHook; } namespace RC { class CrashDumper { private: bool enabled = false; void* m_previous_exception_filter = nullptr; std::unique_ptr<PLH::IatHook> m_set_unhandled_exception_filter_hook; uint64_t m_hook_trampol...
#pragma once #include <stdexcept> #include <DynamicOutput/DynamicOutput.hpp> #include <Helpers/String.hpp> #define UE4SS_ERROR_OUTPUTTER() \ if (!Output::has_internal_error()) ...
#pragma once #include <unordered_map> #include <Unreal/Core/HAL/Platform.hpp> #include <Unreal/Core/Containers/ScriptArray.hpp> #include <Unreal/Property/FArrayProperty.hpp> #include <Unreal/Property/FObjectProperty.hpp> #include <Unreal/UObject.hpp> #include <Unreal/UScriptStruct.hpp> #include <lua.hpp> namespace R...