\hypertarget{lstate_8h}{
\section{lstate.h File Reference}
\label{lstate_8h}\index{lstate.h@{lstate.h}}
}
{\tt \#include \char`\"{}lua.h\char`\"{}}\par
{\tt \#include \char`\"{}lobject.h\char`\"{}}\par
{\tt \#include \char`\"{}ltm.h\char`\"{}}\par
{\tt \#include \char`\"{}lzio.h\char`\"{}}\par
\subsection*{Classes}
\begin{CompactItemize}
\item 
struct \hyperlink{structstringtable}{stringtable}
\item 
struct \hyperlink{structCallInfo}{CallInfo}
\item 
struct \hyperlink{structglobal__State}{global\_\-State}
\item 
struct \hyperlink{structlua__State}{lua\_\-State}
\item 
union \hyperlink{unionGCObject}{GCObject}
\end{CompactItemize}
\subsection*{Defines}
\begin{CompactItemize}
\item 
\#define \hyperlink{lstate_8h_1108b4374aa20059cd53d90b638c0e4b}{gt}(\hyperlink{main_8c_62f94dfc0036bec0c14106c2f15caf3e}{L})~(\&\hyperlink{main_8c_62f94dfc0036bec0c14106c2f15caf3e}{L} $\rightarrow$ l\_\-gt)
\item 
\#define \hyperlink{lstate_8h_d294d19c007815f4c238efbd221ea705}{registry}(\hyperlink{main_8c_62f94dfc0036bec0c14106c2f15caf3e}{L})~(\&G(\hyperlink{main_8c_62f94dfc0036bec0c14106c2f15caf3e}{L}) $\rightarrow$ l\_\-registry)
\item 
\#define \hyperlink{lstate_8h_9e690b8e4047af306d2dd1f78a9094d7}{EXTRA\_\-STACK}~5
\item 
\#define \hyperlink{lstate_8h_aa041be60f1804880597936cd3d27687}{BASIC\_\-CI\_\-SIZE}~8
\item 
\#define \hyperlink{lstate_8h_8f869ebbbd09a2c657864e11e3d88453}{BASIC\_\-STACK\_\-SIZE}~(2$\ast$LUA\_\-MINSTACK)
\item 
\#define \hyperlink{lstate_8h_db3d2c648d3489e94bf9f685e8651b4e}{curr\_\-func}(\hyperlink{main_8c_62f94dfc0036bec0c14106c2f15caf3e}{L})~(clvalue(\hyperlink{main_8c_62f94dfc0036bec0c14106c2f15caf3e}{L} $\rightarrow$ ci $\rightarrow$ func))
\item 
\#define \hyperlink{lstate_8h_12b504eee786ce8f2c703a22c03d477e}{ci\_\-func}(ci)~(clvalue((ci) $\rightarrow$ func))
\item 
\#define \hyperlink{lstate_8h_cc4169d5ef66325644b3e46c90232919}{f\_\-isLua}(ci)~(!ci\_\-func(ci) $\rightarrow$ c.isC)
\item 
\#define \hyperlink{lstate_8h_489eab424b094f54dd7f6b35e2cf68a2}{isLua}(ci)~(ttisfunction((ci) $\rightarrow$ func) \&\& f\_\-isLua(ci))
\item 
\#define \hyperlink{lstate_8h_103db2de6edf3420c6c6c9a282562406}{G}(\hyperlink{main_8c_62f94dfc0036bec0c14106c2f15caf3e}{L})~(\hyperlink{main_8c_62f94dfc0036bec0c14106c2f15caf3e}{L} $\rightarrow$ l\_\-G)
\item 
\#define \hyperlink{lstate_8h_b553e64ac5980242ff2dba3705e03ed0}{rawgco2ts}(o)~check\_\-exp((o) $\rightarrow$ gch.tt == LUA\_\-TSTRING, \&((o) $\rightarrow$ ts))
\item 
\#define \hyperlink{lstate_8h_f6c16f3aa27ad97ea1bcaa31e05e0b06}{gco2ts}(o)~(\&rawgco2ts(o) $\rightarrow$ tsv)
\item 
\#define \hyperlink{lstate_8h_afc07a99b564b1b307212c61cd9b904a}{rawgco2u}(o)~check\_\-exp((o) $\rightarrow$ gch.tt == LUA\_\-TUSERDATA, \&((o) $\rightarrow$ u))
\item 
\#define \hyperlink{lstate_8h_55e9a228ad0d3a82ee9cfc353002fd8a}{gco2u}(o)~(\&rawgco2u(o) $\rightarrow$ uv)
\item 
\#define \hyperlink{lstate_8h_003658bade3405a30fe2cf7fee2f7e10}{gco2cl}(o)~check\_\-exp((o) $\rightarrow$ gch.tt == LUA\_\-TFUNCTION, \&((o) $\rightarrow$ cl))
\item 
\#define \hyperlink{lstate_8h_aebbd554090bd0625aa3ec0d5309c235}{gco2h}(o)~check\_\-exp((o) $\rightarrow$ gch.tt == LUA\_\-TTABLE, \&((o) $\rightarrow$ h))
\item 
\#define \hyperlink{lstate_8h_8792af5dd4539a71f6ed8ddb31d079c3}{gco2p}(o)~check\_\-exp((o) $\rightarrow$ gch.tt == LUA\_\-TPROTO, \&((o) $\rightarrow$ p))
\item 
\#define \hyperlink{lstate_8h_dc453a25566db47b928eb9bc6f5c7cbe}{gco2uv}(o)~check\_\-exp((o) $\rightarrow$ gch.tt == LUA\_\-TUPVAL, \&((o) $\rightarrow$ uv))
\item 
\#define \hyperlink{lstate_8h_290c99068a6004c9553cb9dab9026a68}{ngcotouv}(o)~check\_\-exp((o) == NULL $|$$|$ (o) $\rightarrow$ gch.tt == LUA\_\-TUPVAL, \&((o) $\rightarrow$ uv))
\item 
\#define \hyperlink{lstate_8h_52c467e11bd40cad5ca78372f7f67b4d}{gco2th}(o)~check\_\-exp((o) $\rightarrow$ gch.tt == LUA\_\-TTHREAD, \&((o) $\rightarrow$ th))
\item 
\#define \hyperlink{lstate_8h_254ca29aba03e47440082d4591a9734e}{obj2gco}(v)~(cast(\hyperlink{unionGCObject}{GCObject} $\ast$, (v)))
\end{CompactItemize}
\subsection*{Functions}
\begin{CompactItemize}
\item 
LUAI\_\-FUNC \hyperlink{structlua__State}{lua\_\-State} $\ast$ \hyperlink{lstate_8h_e92900ed9516fd5c5ca25072741daa18}{luaE\_\-newthread} (\hyperlink{structlua__State}{lua\_\-State} $\ast$\hyperlink{main_8c_62f94dfc0036bec0c14106c2f15caf3e}{L})
\item 
LUAI\_\-FUNC void \hyperlink{lstate_8h_0882226c718293b23af460f7e2faeef0}{luaE\_\-freethread} (\hyperlink{structlua__State}{lua\_\-State} $\ast$\hyperlink{main_8c_62f94dfc0036bec0c14106c2f15caf3e}{L}, \hyperlink{structlua__State}{lua\_\-State} $\ast$L1)
\end{CompactItemize}


\subsection{Define Documentation}
\hypertarget{lstate_8h_aa041be60f1804880597936cd3d27687}{
\index{lstate.h@{lstate.h}!BASIC\_\-CI\_\-SIZE@{BASIC\_\-CI\_\-SIZE}}
\index{BASIC\_\-CI\_\-SIZE@{BASIC\_\-CI\_\-SIZE}!lstate.h@{lstate.h}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}\#define BASIC\_\-CI\_\-SIZE~8}}
\label{lstate_8h_aa041be60f1804880597936cd3d27687}


\hypertarget{lstate_8h_8f869ebbbd09a2c657864e11e3d88453}{
\index{lstate.h@{lstate.h}!BASIC\_\-STACK\_\-SIZE@{BASIC\_\-STACK\_\-SIZE}}
\index{BASIC\_\-STACK\_\-SIZE@{BASIC\_\-STACK\_\-SIZE}!lstate.h@{lstate.h}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}\#define BASIC\_\-STACK\_\-SIZE~(2$\ast$LUA\_\-MINSTACK)}}
\label{lstate_8h_8f869ebbbd09a2c657864e11e3d88453}


\hypertarget{lstate_8h_12b504eee786ce8f2c703a22c03d477e}{
\index{lstate.h@{lstate.h}!ci\_\-func@{ci\_\-func}}
\index{ci\_\-func@{ci\_\-func}!lstate.h@{lstate.h}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}\#define ci\_\-func(ci)~(clvalue((ci) $\rightarrow$ func))}}
\label{lstate_8h_12b504eee786ce8f2c703a22c03d477e}


\hypertarget{lstate_8h_db3d2c648d3489e94bf9f685e8651b4e}{
\index{lstate.h@{lstate.h}!curr\_\-func@{curr\_\-func}}
\index{curr\_\-func@{curr\_\-func}!lstate.h@{lstate.h}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}\#define curr\_\-func({\bf L})~(clvalue({\bf L} $\rightarrow$ ci $\rightarrow$ func))}}
\label{lstate_8h_db3d2c648d3489e94bf9f685e8651b4e}


\hypertarget{lstate_8h_9e690b8e4047af306d2dd1f78a9094d7}{
\index{lstate.h@{lstate.h}!EXTRA\_\-STACK@{EXTRA\_\-STACK}}
\index{EXTRA\_\-STACK@{EXTRA\_\-STACK}!lstate.h@{lstate.h}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}\#define EXTRA\_\-STACK~5}}
\label{lstate_8h_9e690b8e4047af306d2dd1f78a9094d7}


\hypertarget{lstate_8h_cc4169d5ef66325644b3e46c90232919}{
\index{lstate.h@{lstate.h}!f\_\-isLua@{f\_\-isLua}}
\index{f\_\-isLua@{f\_\-isLua}!lstate.h@{lstate.h}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}\#define f\_\-isLua(ci)~(!ci\_\-func(ci) $\rightarrow$ c.isC)}}
\label{lstate_8h_cc4169d5ef66325644b3e46c90232919}


\hypertarget{lstate_8h_103db2de6edf3420c6c6c9a282562406}{
\index{lstate.h@{lstate.h}!G@{G}}
\index{G@{G}!lstate.h@{lstate.h}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}\#define G({\bf L})~({\bf L} $\rightarrow$ l\_\-G)}}
\label{lstate_8h_103db2de6edf3420c6c6c9a282562406}


\hypertarget{lstate_8h_003658bade3405a30fe2cf7fee2f7e10}{
\index{lstate.h@{lstate.h}!gco2cl@{gco2cl}}
\index{gco2cl@{gco2cl}!lstate.h@{lstate.h}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}\#define gco2cl(o)~check\_\-exp((o) $\rightarrow$ gch.tt == LUA\_\-TFUNCTION, \&((o) $\rightarrow$ cl))}}
\label{lstate_8h_003658bade3405a30fe2cf7fee2f7e10}


\hypertarget{lstate_8h_aebbd554090bd0625aa3ec0d5309c235}{
\index{lstate.h@{lstate.h}!gco2h@{gco2h}}
\index{gco2h@{gco2h}!lstate.h@{lstate.h}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}\#define gco2h(o)~check\_\-exp((o) $\rightarrow$ gch.tt == LUA\_\-TTABLE, \&((o) $\rightarrow$ h))}}
\label{lstate_8h_aebbd554090bd0625aa3ec0d5309c235}


\hypertarget{lstate_8h_8792af5dd4539a71f6ed8ddb31d079c3}{
\index{lstate.h@{lstate.h}!gco2p@{gco2p}}
\index{gco2p@{gco2p}!lstate.h@{lstate.h}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}\#define gco2p(o)~check\_\-exp((o) $\rightarrow$ gch.tt == LUA\_\-TPROTO, \&((o) $\rightarrow$ p))}}
\label{lstate_8h_8792af5dd4539a71f6ed8ddb31d079c3}


\hypertarget{lstate_8h_52c467e11bd40cad5ca78372f7f67b4d}{
\index{lstate.h@{lstate.h}!gco2th@{gco2th}}
\index{gco2th@{gco2th}!lstate.h@{lstate.h}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}\#define gco2th(o)~check\_\-exp((o) $\rightarrow$ gch.tt == LUA\_\-TTHREAD, \&((o) $\rightarrow$ th))}}
\label{lstate_8h_52c467e11bd40cad5ca78372f7f67b4d}


\hypertarget{lstate_8h_f6c16f3aa27ad97ea1bcaa31e05e0b06}{
\index{lstate.h@{lstate.h}!gco2ts@{gco2ts}}
\index{gco2ts@{gco2ts}!lstate.h@{lstate.h}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}\#define gco2ts(o)~(\&rawgco2ts(o) $\rightarrow$ tsv)}}
\label{lstate_8h_f6c16f3aa27ad97ea1bcaa31e05e0b06}


\hypertarget{lstate_8h_55e9a228ad0d3a82ee9cfc353002fd8a}{
\index{lstate.h@{lstate.h}!gco2u@{gco2u}}
\index{gco2u@{gco2u}!lstate.h@{lstate.h}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}\#define gco2u(o)~(\&rawgco2u(o) $\rightarrow$ uv)}}
\label{lstate_8h_55e9a228ad0d3a82ee9cfc353002fd8a}


\hypertarget{lstate_8h_dc453a25566db47b928eb9bc6f5c7cbe}{
\index{lstate.h@{lstate.h}!gco2uv@{gco2uv}}
\index{gco2uv@{gco2uv}!lstate.h@{lstate.h}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}\#define gco2uv(o)~check\_\-exp((o) $\rightarrow$ gch.tt == LUA\_\-TUPVAL, \&((o) $\rightarrow$ uv))}}
\label{lstate_8h_dc453a25566db47b928eb9bc6f5c7cbe}


\hypertarget{lstate_8h_1108b4374aa20059cd53d90b638c0e4b}{
\index{lstate.h@{lstate.h}!gt@{gt}}
\index{gt@{gt}!lstate.h@{lstate.h}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}\#define gt({\bf L})~(\&{\bf L} $\rightarrow$ l\_\-gt)}}
\label{lstate_8h_1108b4374aa20059cd53d90b638c0e4b}


\hypertarget{lstate_8h_489eab424b094f54dd7f6b35e2cf68a2}{
\index{lstate.h@{lstate.h}!isLua@{isLua}}
\index{isLua@{isLua}!lstate.h@{lstate.h}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}\#define isLua(ci)~(ttisfunction((ci) $\rightarrow$ func) \&\& f\_\-isLua(ci))}}
\label{lstate_8h_489eab424b094f54dd7f6b35e2cf68a2}


\hypertarget{lstate_8h_290c99068a6004c9553cb9dab9026a68}{
\index{lstate.h@{lstate.h}!ngcotouv@{ngcotouv}}
\index{ngcotouv@{ngcotouv}!lstate.h@{lstate.h}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}\#define ngcotouv(o)~check\_\-exp((o) == NULL $|$$|$ (o) $\rightarrow$ gch.tt == LUA\_\-TUPVAL, \&((o) $\rightarrow$ uv))}}
\label{lstate_8h_290c99068a6004c9553cb9dab9026a68}


\hypertarget{lstate_8h_254ca29aba03e47440082d4591a9734e}{
\index{lstate.h@{lstate.h}!obj2gco@{obj2gco}}
\index{obj2gco@{obj2gco}!lstate.h@{lstate.h}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}\#define obj2gco(v)~(cast({\bf GCObject} $\ast$, (v)))}}
\label{lstate_8h_254ca29aba03e47440082d4591a9734e}


\hypertarget{lstate_8h_b553e64ac5980242ff2dba3705e03ed0}{
\index{lstate.h@{lstate.h}!rawgco2ts@{rawgco2ts}}
\index{rawgco2ts@{rawgco2ts}!lstate.h@{lstate.h}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}\#define rawgco2ts(o)~check\_\-exp((o) $\rightarrow$ gch.tt == LUA\_\-TSTRING, \&((o) $\rightarrow$ ts))}}
\label{lstate_8h_b553e64ac5980242ff2dba3705e03ed0}


\hypertarget{lstate_8h_afc07a99b564b1b307212c61cd9b904a}{
\index{lstate.h@{lstate.h}!rawgco2u@{rawgco2u}}
\index{rawgco2u@{rawgco2u}!lstate.h@{lstate.h}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}\#define rawgco2u(o)~check\_\-exp((o) $\rightarrow$ gch.tt == LUA\_\-TUSERDATA, \&((o) $\rightarrow$ u))}}
\label{lstate_8h_afc07a99b564b1b307212c61cd9b904a}


\hypertarget{lstate_8h_d294d19c007815f4c238efbd221ea705}{
\index{lstate.h@{lstate.h}!registry@{registry}}
\index{registry@{registry}!lstate.h@{lstate.h}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}\#define registry({\bf L})~(\&G({\bf L}) $\rightarrow$ l\_\-registry)}}
\label{lstate_8h_d294d19c007815f4c238efbd221ea705}




\subsection{Function Documentation}
\hypertarget{lstate_8h_0882226c718293b23af460f7e2faeef0}{
\index{lstate.h@{lstate.h}!luaE\_\-freethread@{luaE\_\-freethread}}
\index{luaE\_\-freethread@{luaE\_\-freethread}!lstate.h@{lstate.h}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}LUAI\_\-FUNC void luaE\_\-freethread ({\bf lua\_\-State} $\ast$ {\em L}, \/  {\bf lua\_\-State} $\ast$ {\em L1})}}
\label{lstate_8h_0882226c718293b23af460f7e2faeef0}


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


