\hypertarget{lstate_8c}{
\section{lstate.c File Reference}
\label{lstate_8c}\index{lstate.c@{lstate.c}}
}
{\tt \#include $<$stddef.h$>$}\par
{\tt \#include \char`\"{}lua.h\char`\"{}}\par
{\tt \#include \char`\"{}ldebug.h\char`\"{}}\par
{\tt \#include \char`\"{}ldo.h\char`\"{}}\par
{\tt \#include \char`\"{}lfunc.h\char`\"{}}\par
{\tt \#include \char`\"{}lgc.h\char`\"{}}\par
{\tt \#include \char`\"{}llex.h\char`\"{}}\par
{\tt \#include \char`\"{}lmem.h\char`\"{}}\par
{\tt \#include \char`\"{}lstate.h\char`\"{}}\par
{\tt \#include \char`\"{}lstring.h\char`\"{}}\par
{\tt \#include \char`\"{}ltable.h\char`\"{}}\par
{\tt \#include \char`\"{}ltm.h\char`\"{}}\par
\subsection*{Classes}
\begin{CompactItemize}
\item 
struct \hyperlink{structLG}{LG}
\end{CompactItemize}
\subsection*{Defines}
\begin{CompactItemize}
\item 
\#define \hyperlink{lstate_8c_b8ab59be0dd5b14c27c052f876de46a0}{lstate\_\-c}
\item 
\#define \hyperlink{lstate_8c_bf0b3947b59218777a8e928a10be205b}{LUA\_\-CORE}
\item 
\#define \hyperlink{lstate_8c_3811212bc40d0eec396932c747a46e76}{state\_\-size}(x)~(sizeof(x) + LUAI\_\-EXTRASPACE)
\item 
\#define \hyperlink{lstate_8c_f98e2cd9b46dea42c45b7d1b3c2bed96}{fromstate}(l)~(cast(\hyperlink{llimits_8h_e1fe9ac10d9803bd1d7bdf30b18bad68}{lu\_\-byte} $\ast$, (l)) - LUAI\_\-EXTRASPACE)
\item 
\#define \hyperlink{lstate_8c_4d489bdc6810f0363c3c45673ae029d9}{tostate}(l)~(cast(\hyperlink{structlua__State}{lua\_\-State} $\ast$, cast(\hyperlink{llimits_8h_e1fe9ac10d9803bd1d7bdf30b18bad68}{lu\_\-byte} $\ast$, l) + LUAI\_\-EXTRASPACE))
\end{CompactItemize}
\subsection*{Functions}
\begin{CompactItemize}
\item 
static void \hyperlink{lstate_8c_55b60427432d47460c6e1eaa9a31953f}{stack\_\-init} (\hyperlink{structlua__State}{lua\_\-State} $\ast$L1, \hyperlink{structlua__State}{lua\_\-State} $\ast$\hyperlink{main_8c_62f94dfc0036bec0c14106c2f15caf3e}{L})
\item 
static void \hyperlink{lstate_8c_9832b1be2eeaf06a9a6cc10a4d14e43e}{freestack} (\hyperlink{structlua__State}{lua\_\-State} $\ast$\hyperlink{main_8c_62f94dfc0036bec0c14106c2f15caf3e}{L}, \hyperlink{structlua__State}{lua\_\-State} $\ast$L1)
\item 
static void \hyperlink{lstate_8c_b65e96a7498fd886f7223b92e91fd830}{f\_\-luaopen} (\hyperlink{structlua__State}{lua\_\-State} $\ast$\hyperlink{main_8c_62f94dfc0036bec0c14106c2f15caf3e}{L}, void $\ast$ud)
\item 
static void \hyperlink{lstate_8c_bf6542aab8c19064bee6e59f4a8fabc3}{preinit\_\-state} (\hyperlink{structlua__State}{lua\_\-State} $\ast$\hyperlink{main_8c_62f94dfc0036bec0c14106c2f15caf3e}{L}, \hyperlink{structglobal__State}{global\_\-State} $\ast$g)
\item 
static void \hyperlink{lstate_8c_4940327dfa3b86df0ef008180bb3fcb3}{close\_\-state} (\hyperlink{structlua__State}{lua\_\-State} $\ast$\hyperlink{main_8c_62f94dfc0036bec0c14106c2f15caf3e}{L})
\item 
\hyperlink{structlua__State}{lua\_\-State} $\ast$ \hyperlink{lstate_8c_37e72603bb5f5f82e35938b696ce36a7}{luaE\_\-newthread} (\hyperlink{structlua__State}{lua\_\-State} $\ast$\hyperlink{main_8c_62f94dfc0036bec0c14106c2f15caf3e}{L})
\item 
void \hyperlink{lstate_8c_8c121cf8444c9c54e934aeb509c4b73a}{luaE\_\-freethread} (\hyperlink{structlua__State}{lua\_\-State} $\ast$\hyperlink{main_8c_62f94dfc0036bec0c14106c2f15caf3e}{L}, \hyperlink{structlua__State}{lua\_\-State} $\ast$L1)
\item 
LUA\_\-API \hyperlink{structlua__State}{lua\_\-State} $\ast$ \hyperlink{lstate_8c_59a0d54f62839bcb7dfa8d0d7b4761b4}{lua\_\-newstate} (\hyperlink{lua_8h_1c6fb648cd80375673a99321e15fcc36}{lua\_\-Alloc} f, void $\ast$ud)
\item 
static void \hyperlink{lstate_8c_fb71dc445b16fe56f0f24f8b5d5eb1d1}{callallgcTM} (\hyperlink{structlua__State}{lua\_\-State} $\ast$\hyperlink{main_8c_62f94dfc0036bec0c14106c2f15caf3e}{L}, void $\ast$ud)
\item 
LUA\_\-API void \hyperlink{lstate_8c_5d903983f1497b2fc58fba9df09e354d}{lua\_\-close} (\hyperlink{structlua__State}{lua\_\-State} $\ast$\hyperlink{main_8c_62f94dfc0036bec0c14106c2f15caf3e}{L})
\end{CompactItemize}


\subsection{Define Documentation}
\hypertarget{lstate_8c_f98e2cd9b46dea42c45b7d1b3c2bed96}{
\index{lstate.c@{lstate.c}!fromstate@{fromstate}}
\index{fromstate@{fromstate}!lstate.c@{lstate.c}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}\#define fromstate(l)~(cast({\bf lu\_\-byte} $\ast$, (l)) - LUAI\_\-EXTRASPACE)}}
\label{lstate_8c_f98e2cd9b46dea42c45b7d1b3c2bed96}


\hypertarget{lstate_8c_b8ab59be0dd5b14c27c052f876de46a0}{
\index{lstate.c@{lstate.c}!lstate\_\-c@{lstate\_\-c}}
\index{lstate\_\-c@{lstate\_\-c}!lstate.c@{lstate.c}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}\#define lstate\_\-c}}
\label{lstate_8c_b8ab59be0dd5b14c27c052f876de46a0}


\hypertarget{lstate_8c_bf0b3947b59218777a8e928a10be205b}{
\index{lstate.c@{lstate.c}!LUA\_\-CORE@{LUA\_\-CORE}}
\index{LUA\_\-CORE@{LUA\_\-CORE}!lstate.c@{lstate.c}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}\#define LUA\_\-CORE}}
\label{lstate_8c_bf0b3947b59218777a8e928a10be205b}


\hypertarget{lstate_8c_3811212bc40d0eec396932c747a46e76}{
\index{lstate.c@{lstate.c}!state\_\-size@{state\_\-size}}
\index{state\_\-size@{state\_\-size}!lstate.c@{lstate.c}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}\#define state\_\-size(x)~(sizeof(x) + LUAI\_\-EXTRASPACE)}}
\label{lstate_8c_3811212bc40d0eec396932c747a46e76}


\hypertarget{lstate_8c_4d489bdc6810f0363c3c45673ae029d9}{
\index{lstate.c@{lstate.c}!tostate@{tostate}}
\index{tostate@{tostate}!lstate.c@{lstate.c}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}\#define tostate(l)~(cast({\bf lua\_\-State} $\ast$, cast({\bf lu\_\-byte} $\ast$, l) + LUAI\_\-EXTRASPACE))}}
\label{lstate_8c_4d489bdc6810f0363c3c45673ae029d9}




\subsection{Function Documentation}
\hypertarget{lstate_8c_fb71dc445b16fe56f0f24f8b5d5eb1d1}{
\index{lstate.c@{lstate.c}!callallgcTM@{callallgcTM}}
\index{callallgcTM@{callallgcTM}!lstate.c@{lstate.c}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}static void callallgcTM ({\bf lua\_\-State} $\ast$ {\em L}, \/  void $\ast$ {\em ud})\hspace{0.3cm}{\tt  \mbox{[}static\mbox{]}}}}
\label{lstate_8c_fb71dc445b16fe56f0f24f8b5d5eb1d1}


\hypertarget{lstate_8c_4940327dfa3b86df0ef008180bb3fcb3}{
\index{lstate.c@{lstate.c}!close\_\-state@{close\_\-state}}
\index{close\_\-state@{close\_\-state}!lstate.c@{lstate.c}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}static void close\_\-state ({\bf lua\_\-State} $\ast$ {\em L})\hspace{0.3cm}{\tt  \mbox{[}static\mbox{]}}}}
\label{lstate_8c_4940327dfa3b86df0ef008180bb3fcb3}


\hypertarget{lstate_8c_b65e96a7498fd886f7223b92e91fd830}{
\index{lstate.c@{lstate.c}!f\_\-luaopen@{f\_\-luaopen}}
\index{f\_\-luaopen@{f\_\-luaopen}!lstate.c@{lstate.c}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}static void f\_\-luaopen ({\bf lua\_\-State} $\ast$ {\em L}, \/  void $\ast$ {\em ud})\hspace{0.3cm}{\tt  \mbox{[}static\mbox{]}}}}
\label{lstate_8c_b65e96a7498fd886f7223b92e91fd830}


\hypertarget{lstate_8c_9832b1be2eeaf06a9a6cc10a4d14e43e}{
\index{lstate.c@{lstate.c}!freestack@{freestack}}
\index{freestack@{freestack}!lstate.c@{lstate.c}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}static void freestack ({\bf lua\_\-State} $\ast$ {\em L}, \/  {\bf lua\_\-State} $\ast$ {\em L1})\hspace{0.3cm}{\tt  \mbox{[}static\mbox{]}}}}
\label{lstate_8c_9832b1be2eeaf06a9a6cc10a4d14e43e}


\hypertarget{lstate_8c_5d903983f1497b2fc58fba9df09e354d}{
\index{lstate.c@{lstate.c}!lua\_\-close@{lua\_\-close}}
\index{lua\_\-close@{lua\_\-close}!lstate.c@{lstate.c}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}LUA\_\-API void lua\_\-close ({\bf lua\_\-State} $\ast$ {\em L})}}
\label{lstate_8c_5d903983f1497b2fc58fba9df09e354d}


\hypertarget{lstate_8c_59a0d54f62839bcb7dfa8d0d7b4761b4}{
\index{lstate.c@{lstate.c}!lua\_\-newstate@{lua\_\-newstate}}
\index{lua\_\-newstate@{lua\_\-newstate}!lstate.c@{lstate.c}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}LUA\_\-API {\bf lua\_\-State}$\ast$ lua\_\-newstate ({\bf lua\_\-Alloc} {\em f}, \/  void $\ast$ {\em ud})}}
\label{lstate_8c_59a0d54f62839bcb7dfa8d0d7b4761b4}


\hypertarget{lstate_8c_8c121cf8444c9c54e934aeb509c4b73a}{
\index{lstate.c@{lstate.c}!luaE\_\-freethread@{luaE\_\-freethread}}
\index{luaE\_\-freethread@{luaE\_\-freethread}!lstate.c@{lstate.c}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}void luaE\_\-freethread ({\bf lua\_\-State} $\ast$ {\em L}, \/  {\bf lua\_\-State} $\ast$ {\em L1})}}
\label{lstate_8c_8c121cf8444c9c54e934aeb509c4b73a}


\hypertarget{lstate_8c_37e72603bb5f5f82e35938b696ce36a7}{
\index{lstate.c@{lstate.c}!luaE\_\-newthread@{luaE\_\-newthread}}
\index{luaE\_\-newthread@{luaE\_\-newthread}!lstate.c@{lstate.c}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}{\bf lua\_\-State}$\ast$ luaE\_\-newthread ({\bf lua\_\-State} $\ast$ {\em L})}}
\label{lstate_8c_37e72603bb5f5f82e35938b696ce36a7}


\hypertarget{lstate_8c_bf6542aab8c19064bee6e59f4a8fabc3}{
\index{lstate.c@{lstate.c}!preinit\_\-state@{preinit\_\-state}}
\index{preinit\_\-state@{preinit\_\-state}!lstate.c@{lstate.c}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}static void preinit\_\-state ({\bf lua\_\-State} $\ast$ {\em L}, \/  {\bf global\_\-State} $\ast$ {\em g})\hspace{0.3cm}{\tt  \mbox{[}static\mbox{]}}}}
\label{lstate_8c_bf6542aab8c19064bee6e59f4a8fabc3}


\hypertarget{lstate_8c_55b60427432d47460c6e1eaa9a31953f}{
\index{lstate.c@{lstate.c}!stack\_\-init@{stack\_\-init}}
\index{stack\_\-init@{stack\_\-init}!lstate.c@{lstate.c}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}static void stack\_\-init ({\bf lua\_\-State} $\ast$ {\em L1}, \/  {\bf lua\_\-State} $\ast$ {\em L})\hspace{0.3cm}{\tt  \mbox{[}static\mbox{]}}}}
\label{lstate_8c_55b60427432d47460c6e1eaa9a31953f}


