text
stringlengths
1
24.5M
//======================================================================== // GLFW 3.4 Win32 - www.glfw.org //------------------------------------------------------------------------ // Copyright (c) 2002-2006 Marcus Geelnard // Copyright (c) 2006-2017 Camilla Löwy <elmindreda@glfw.org> // // This software is provided...
//======================================================================== // GLFW 3.4 Win32 - www.glfw.org //------------------------------------------------------------------------ // Copyright (c) 2002-2006 Marcus Geelnard // Copyright (c) 2006-2019 Camilla Löwy <elmindreda@glfw.org> // // This software is provided...
//======================================================================== // GLFW 3.4 - www.glfw.org //------------------------------------------------------------------------ // Copyright (c) 2002-2006 Marcus Geelnard // Copyright (c) 2006-2019 Camilla Löwy <elmindreda@glfw.org> // Copyright (c) 2012 Torsten Walluhn...
//======================================================================== // GLFW 3.4 Wayland - www.glfw.org //------------------------------------------------------------------------ // Copyright (c) 2014 Jonas Ã…dahl <jadahl@gmail.com> // // This software is provided 'as-is', without any express or implied // warran...
//======================================================================== // GLFW 3.4 Wayland - www.glfw.org //------------------------------------------------------------------------ // Copyright (c) 2014 Jonas Ã…dahl <jadahl@gmail.com> // // This software is provided 'as-is', without any express or implied // warran...
//======================================================================== // GLFW 3.4 Wayland - www.glfw.org //------------------------------------------------------------------------ // Copyright (c) 2014 Jonas Ã…dahl <jadahl@gmail.com> // // This software is provided 'as-is', without any express or implied // warran...
//======================================================================== // GLFW 3.4 Wayland - www.glfw.org //------------------------------------------------------------------------ // Copyright (c) 2014 Jonas Ã…dahl <jadahl@gmail.com> // // This software is provided 'as-is', without any express or implied // warran...
//======================================================================== // GLFW 3.4 X11 - www.glfw.org //------------------------------------------------------------------------ // Copyright (c) 2002-2006 Marcus Geelnard // Copyright (c) 2006-2019 Camilla Löwy <elmindreda@glfw.org> // // This software is provided '...
//======================================================================== // GLFW 3.4 X11 - www.glfw.org //------------------------------------------------------------------------ // Copyright (c) 2002-2006 Marcus Geelnard // Copyright (c) 2006-2019 Camilla Löwy <elmindreda@glfw.org> // // This software is provided '...
//======================================================================== // GLFW 3.4 X11 - www.glfw.org //------------------------------------------------------------------------ // Copyright (c) 2002-2006 Marcus Geelnard // Copyright (c) 2006-2019 Camilla Löwy <elmindreda@glfw.org> // // This software is provided '...
//======================================================================== // GLFW 3.4 X11 - www.glfw.org //------------------------------------------------------------------------ // Copyright (c) 2002-2006 Marcus Geelnard // Copyright (c) 2006-2019 Camilla Löwy <elmindreda@glfw.org> // // This software is provided '...
//======================================================================== // GLFW 3.4 X11 - www.glfw.org //------------------------------------------------------------------------ // Copyright (c) 2002-2006 Marcus Geelnard // Copyright (c) 2006-2017 Camilla Löwy <elmindreda@glfw.org> // // This software is provided '...
//======================================================================== // GLFW 3.4 Linux - www.glfw.org //------------------------------------------------------------------------ // Copyright (c) 2014 Jonas Ã…dahl <jadahl@gmail.com> // // This software is provided 'as-is', without any express or implied // warranty...
#pragma once #include <jni/functions.hpp> namespace jni { // A deleter that gets the JNIEnv via GetEnv, rather than storing the value passed to the constructor. // The deleting thread must have a JVM attachment. // // Useful when deletion will happen on an auxiliary thread, particularly the finaliz...
#pragma once #include <jni/functions.hpp> #include <jni/object.hpp> #include <jni/tagging.hpp> #include <jni/make.hpp> namespace jni { template < class E, class Enable > class Array; template < class E > class Array< E, std::enable_if_t<IsPrimitive<E>::value> > : public Object< ArrayTag<E> > ...
#pragma once #include <type_traits> #include <string> #include <array> #include <vector> namespace jni { template < class T > struct IsArraylike: std::false_type {}; template < class E, std::size_t n > struct IsArraylike< E[n] > : std::true_type {}; template < class E, std::size...
#pragma once #include <jni/class.hpp> #include <jni/object.hpp> namespace jni { template < class > struct Boxer; template < class > struct Unboxer; template < class Unboxed > decltype(auto) Box(JNIEnv& env, Unboxed&& unboxed) { return Boxer<typename std::decay<Unboxed>::type>().Box(...
#pragma once #include <jni/functions.hpp> #include <jni/tagging.hpp> #include <jni/advanced_ownership.hpp> #include <jni/object.hpp> namespace jni { template < class TheTag, class... > class Constructor; template < class TheTag, class > class Field; template < class TheTag, class > class StaticField; ...
#pragma once #include <jni/method.hpp> namespace jni { template < class TagType, class... Args > class Constructor : public Method<TagType, void (Args...)> { public: Constructor(JNIEnv& env, const Class<TagType>& clazz) : Method<TagType, void (Args...)>(env, clazz,...
#pragma once #include <jni/types.hpp> #include <jni/traits.hpp> #include <system_error> #include <string> namespace std { template <> struct is_error_code_enum<jni::error> : public true_type {}; } namespace jni { inline const std::error_category& ErrorCategory() { class Impl : public...
#pragma once #include <jni/functions.hpp> #include <jni/class.hpp> #include <jni/object.hpp> #include <jni/type_signature.hpp> #include <jni/tagging.hpp> namespace jni { template < class TheTag, class T > class Field { private: jfieldID& field; public: using ...
#pragma once #include <jni/types.hpp> #include <jni/errors.hpp> #include <jni/wrapping.hpp> #include <jni/ownership.hpp> #include <jni/typed_methods.hpp> #include <jni/arraylike.hpp> #include <type_traits> #include <cstdlib> namespace jni { inline jint GetVersion(JNIEnv& env) { return env.GetVe...
#pragma once // Low-level #include <jni/types.hpp> #include <jni/functions.hpp> #include <jni/npe.hpp> // High-level #include <jni/unique.hpp> #include <jni/tagging.hpp> #include <jni/class.hpp> #include <jni/object.hpp> #include <jni/string.hpp> #include <jni/array.hpp> #include <jni/constructor.hpp> #include <jn...
#pragma once namespace jni { template < class Result > struct ThingToMake {}; template < class Result, class... P > auto Make(P&&... p) { return MakeAnything(ThingToMake<Result>(), std::forward<P>(p)...); } }
#pragma once #include <jni/functions.hpp> #include <jni/class.hpp> #include <jni/object.hpp> #include <jni/type_signature.hpp> #include <jni/tagging.hpp> namespace jni { template < class TheTag, class > class Method; template < class TheTag, class R, class... Args > class Method< TheTag, R (Args.....
#pragma once #include <jni/types.hpp> #include <jni/errors.hpp> #include <jni/functions.hpp> #include <jni/tagging.hpp> #include <jni/class.hpp> #include <jni/object.hpp> #include <exception> #include <type_traits> namespace jni { template < class M, class Enable = void > struct NativeMethodTraits; t...
#pragma once #include <jni/functions.hpp> namespace jni { [[noreturn]] inline void ThrowNullPointerException(JNIEnv& env, const char* message = nullptr) { ThrowNew(env, FindClass(env, "java/lang/NullPointerException"), message); } template < class T > void NullCheck(JNIEnv& env, ...
#pragma once #include <jni/functions.hpp> #include <jni/tagging.hpp> #include <cstddef> namespace jni { template < class TheTag > class Class; template < class TheTag, class > class Field; template < class TheTag, class > class Method; class ObjectBase { protected: jobj...
#pragma once #include <jni/types.hpp> #include <jni/wrapping.hpp> #include <jni/typed_methods.hpp> namespace jni { struct LocalFrameDeleter { void operator()(JNIEnv* env) const { if (env) { env->PopLocalFrame(nullptr); } ...
#pragma once #include <jni/functions.hpp> #include <jni/class.hpp> #include <jni/object.hpp> #include <jni/type_signature.hpp> #include <jni/tagging.hpp> namespace jni { template < class TheTag, class T > class StaticField { private: jfieldID& field; public: ...
#pragma once #include <jni/functions.hpp> #include <jni/class.hpp> #include <jni/object.hpp> #include <jni/type_signature.hpp> #include <jni/tagging.hpp> namespace jni { template < class TheTag, class > class StaticMethod; template < class TheTag, class R, class... Args > class StaticMethod< TheTa...
#pragma once #include <jni/object.hpp> #include <jni/array.hpp> #include <jni/make.hpp> #include <jni/npe.hpp> #include <jni/string_conversion.hpp> namespace jni { using String = Object<StringTag>; inline std::u16string MakeAnything(ThingToMake<std::u16string>, JNIEnv& env, const String& string) { ...
#pragma once // If you want to supply your own UTF-8 <-> UTF-16 conversion routines, create a header file // that can be found at <jni/string_conversion.hpp> and will be found first in the lookup chain. #include <string> #include <locale> #include <codecvt> namespace jni { inline std::u16string convertUTF8To...
#pragma once #include <jni/traits.hpp> #include <jni/unique.hpp> #include <type_traits> namespace jni { class ObjectBase; template < class Tag > class Object; template < class E, class = void > class Array; template < class > struct TypeSignature; struct ObjectTag { static con...
#pragma once #include <jni/types.hpp> #include <type_traits> namespace jni { template < class T > struct IsPrimitive : std::false_type {}; template <> struct IsPrimitive< jboolean > : std::true_type {}; template <> struct IsPrimitive< jbyte > : std::true_type {}; template <> struct IsPrimitive<...
#pragma once #include <jni.h> namespace jni { template < class R > struct TypedMethods; template <> struct TypedMethods< jobject* > { static constexpr auto CallMethod = &JNIEnv::CallObjectMethod; static constexpr auto CallNonvirtualMethod = &JNIEnv::CallNonvirtualObjectMet...
#pragma once #include <cstddef> #include <cassert> #include <memory> #include <stdexcept> #include <jni.h> namespace jni { // Not using bool because its size is implementation-defined, and a defined size // is necessary for array operations. using ::jboolean; const jboolean jni_false = 0; co...
#pragma once #include <jni/functions.hpp> #include <jni/object.hpp> #include <jni/array.hpp> namespace jni { template < char... chars > struct StringLiteral { operator const char *() const { static const char result[] = { chars..., 0 }; return result; ...
#pragma once namespace jni { /* Ownership type and main interface for high-level references. Client code using the high-level API will most often work with values of this class template, using the following aliases: * Global<P>, a.k.a. Unique<T, DefaultRefDeleter<&JNIEnv::DeleteGlob...
#pragma once #include <jni/class.hpp> #include <jni/object.hpp> namespace jni { struct WeakReferenceTag { static constexpr auto Name() { return "java/lang/ref/WeakReference"; } }; // Wraps a JNI global reference to a java.lang.ref.WeakReference, producing an ownership class // similar to jni::Weak<T> ...
#pragma once #include <cstddef> #include <cassert> #include <limits> #include <memory> #include <utility> #include <jni.h> namespace jni { template < class W > struct Wrapper; template < class W, class U > auto Wrap(U&& u) { return Wrapper<W>().Wrap(std::forward<U>(u)); } t...
#ifndef INCLUDE_LLHTTP_H_ #define INCLUDE_LLHTTP_H_ #define LLHTTP_VERSION_MAJOR 9 #define LLHTTP_VERSION_MINOR 3 #define LLHTTP_VERSION_PATCH 0 #ifndef INCLUDE_LLHTTP_ITSELF_H_ #define INCLUDE_LLHTTP_ITSELF_H_ #ifdef __cplusplus extern "C" { #endif #include <stdint.h> typedef struct llhttp__internal_s llhttp__int...
#include <stdlib.h> #include <stdio.h> #include <string.h> #include "llhttp.h" #define CALLBACK_MAYBE(PARSER, NAME) \ do { \ const llhttp_settings_t* settings; \...
#include <stdio.h> #ifndef LLHTTP__TEST # include "llhttp.h" #else # define llhttp_t llparse_t #endif /* */ int llhttp_message_needs_eof(const llhttp_t* parser); int llhttp_should_keep_alive(const llhttp_t* parser); int llhttp__before_headers_complete(llhttp_t* parser, const char* p, ...
#include <stdlib.h> #include <stdint.h> #include <string.h> #ifdef __SSE4_2__ #ifdef _MSC_VER #include <nmmintrin.h> #else /* !_MSC_VER */ #include <x86intrin.h> #endif /* _MSC_VER */ #endif /* __SSE4_2__ */ #ifdef __ARM_NEON__ #include <arm_neon.h> #endif /* __ARM_NEON__ */ #ifdef __wasm__ #include <wa...
/* fpconv - Floating point conversion routines * * Copyright (c) 2011-2012 Mark Pulford <mark@kyne.com.au> * * Permission is hereby granted, free of charge, to any person obtaining * a copy of this software and associated documentation files (the * "Software"), to deal in the Software without restriction, includ...
/* Lua CJSON floating point conversion routines */ /* Buffer required to store the largest string representation of a double. * * Longest double printed with %.14g is 21 characters long: * -1.7976931348623e+308 */ # define FPCONV_G_FMT_BUFSIZE 32 #ifdef __cplusplus extern "C" { #endif #ifdef USE_INTERNAL_FPCON...
/* Lua CJSON - JSON support for Lua * * Copyright (c) 2019-2020 HALX99 * Copyright (c) 2010-2012 Mark Pulford <mark@kyne.com.au> * * Permission is hereby granted, free of charge, to any person obtaining * a copy of this software and associated documentation files (the * "Software"), to deal in the Software with...
#ifndef __LUA_CJSON_H_ #define __LUA_CJSON_H_ #include "lua.h" #define USE_INTERNAL_FPCONV #if defined(__cplusplus) extern "C" { #endif int luaopen_cjson(lua_State* l); int luaopen_cjson_safe(lua_State* l); #if defined(__cplusplus) } #endif #endif // __LUA_CJSON_H_
/* strbuf - String buffer routines * * Copyright (c) 2010-2012 Mark Pulford <mark@kyne.com.au> * * Permission is hereby granted, free of charge, to any person obtaining * a copy of this software and associated documentation files (the * "Software"), to deal in the Software without restriction, including * witho...
/* strbuf - String buffer routines * * Copyright (c) 2010-2012 Mark Pulford <mark@kyne.com.au> * * Permission is hereby granted, free of charge, to any person obtaining * a copy of this software and associated documentation files (the * "Software"), to deal in the Software without restriction, including * witho...
/* ** $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: 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" #if defined(LUA_USE_APICHECK) #include <assert.h> #define api_check(l,e,msg) assert(e) #else /* for testing */ #define api_check(l,e,msg) ((void)(l), lu...
/* ** $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: 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: 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" #include "llimits.h" static int luaB_print ...
/* ** $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: 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: 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" #include "llimits.h" static lua_State *getco (lua_State *L) { lua_State *co = lua_tothread(L, 1...
/* ** $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: 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: 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" #include "llimits.h" /* ** The hook table at...
/* ** $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: 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.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: 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: 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 "lapi.h" #include "lgc.h" #include "lobject.h" #include "lstate.h" #include "ltable.h" #include "lundump.h...
/* ** $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: 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) \ (offsetof(CClosure, upvalue) + sizeof(TValue) * cast_uint(n)) #define sizeLclosure(n) \ (offsetof(LClosure, upval...
/* ** $Id: lgc.c $ ** Garbage Collector ** See Copyright Notice in lua.h */ #define lgc_c #define LUA_CORE #include "lprefix.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" #include "lstring...
/* ** $Id: lgc.h $ ** Garbage Collector ** See Copyright Notice in lua.h */ #ifndef lgc_h #define lgc_h #include <stddef.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 *...
/* ** $Id: linit.c $ ** Initialization of libraries for lua.c and other clients ** See Copyright Notice in lua.h */ #define linit_c #define LUA_LIB #include "lprefix.h" #include <stddef.h> #include "lua.h" #include "lualib.h" #include "lauxlib.h" #include "llimits.h" /* ** Standard Libraries. (Must be listed ...
/* ** $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: 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.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: 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" #define l_numbits(t) cast_int(sizeof(t) * CHAR_BIT) /* ** 'l_mem' is a signed intege...
/* ** $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" #include "ll...
/* ** $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: 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: 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 <float.h> #include <locale.h> #include <math.h> #include <stdarg.h> #include <stdio.h> #include <stdlib.h> #include <string.h> #include "lua.h" #in...
/* ** $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.c $ ** Opcodes for Lua virtual machine ** See Copyright Notice in lua.h */ #define lopcodes_c #define LUA_CORE #include "lprefix.h" #include "lopcodes.h" #define opmode(mm,ot,it,t,a,m) \ (((mm) << 7) | ((ot) << 6) | ((it) << 5) | ((t) << 4) | ((a) << 3) | (m)) /* ORDER OP */ LUAI_DDEF ...
/* ** $Id: lopcodes.h $ ** Opcodes for Lua virtual machine ** See Copyright Notice in lua.h */ #ifndef lopcodes_h #define lopcodes_h #include "llimits.h" #include "lobject.h" /*=========================================================================== We assume that instructions are unsigned 32-bit integers. A...
/* ** $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: 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" #include "...
/* ** $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: 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.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: 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.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: 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: 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: 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: 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" #include "llimits.h" /* ** Operations that an ...
/* ** $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: 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 ...