Sophie

Sophie

distrib > CentOS > 5 > x86_64 > by-pkgid > 67e32647b06c0323bf90c6b54a6438d1 > files > 393

rpm-apidocs-4.4.2.3-34.el5.x86_64.rpm

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html><head><meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1">
<title>rpm: lua/lstate.h Source File</title>
<link href="doxygen.css" rel="stylesheet" type="text/css">
<link href="tabs.css" rel="stylesheet" type="text/css">
</head><body>
<!-- Generated by Doxygen 1.4.7 -->
<div class="tabs">
  <ul>
    <li><a href="index.html"><span>Main&nbsp;Page</span></a></li>
    <li><a href="modules.html"><span>Modules</span></a></li>
    <li><a href="annotated.html"><span>Data&nbsp;Structures</span></a></li>
    <li id="current"><a href="files.html"><span>Files</span></a></li>
    <li><a href="pages.html"><span>Related&nbsp;Pages</span></a></li>
  </ul></div>
<div class="tabs">
  <ul>
    <li><a href="files.html"><span>File&nbsp;List</span></a></li>
    <li><a href="globals.html"><span>Globals</span></a></li>
  </ul></div>
<h1>lua/lstate.h</h1><a href="lstate_8h.html">Go to the documentation of this file.</a><div class="fragment"><pre class="fragment"><a name="l00001"></a>00001 <span class="comment">/*</span>
<a name="l00002"></a>00002 <span class="comment">** $Id: lstate.h,v 1.2 2004/03/23 05:09:14 jbj Exp $</span>
<a name="l00003"></a>00003 <span class="comment">** Global State</span>
<a name="l00004"></a>00004 <span class="comment">** See Copyright Notice in lua.h</span>
<a name="l00005"></a>00005 <span class="comment">*/</span>
<a name="l00006"></a>00006 
<a name="l00007"></a>00007 <span class="preprocessor">#ifndef lstate_h</span>
<a name="l00008"></a>00008 <span class="preprocessor"></span><span class="preprocessor">#define lstate_h</span>
<a name="l00009"></a>00009 <span class="preprocessor"></span>
<a name="l00010"></a>00010 <span class="preprocessor">#include "lua.h"</span>
<a name="l00011"></a>00011 
<a name="l00012"></a>00012 <span class="preprocessor">#include "<a class="code" href="lobject_8h.html">lobject.h</a>"</span>
<a name="l00013"></a>00013 <span class="preprocessor">#include "<a class="code" href="ltm_8h.html">ltm.h</a>"</span>
<a name="l00014"></a>00014 <span class="preprocessor">#include "<a class="code" href="lzio_8h.html">lzio.h</a>"</span>
<a name="l00015"></a>00015 
<a name="l00016"></a>00016 
<a name="l00017"></a>00017 <span class="comment">/*</span>
<a name="l00018"></a>00018 <span class="comment">** macros for thread synchronization inside Lua core machine:</span>
<a name="l00019"></a>00019 <span class="comment">** all accesses to the global state and to global objects are synchronized.</span>
<a name="l00020"></a>00020 <span class="comment">** Because threads can read the stack of other threads</span>
<a name="l00021"></a>00021 <span class="comment">** (when running garbage collection),</span>
<a name="l00022"></a>00022 <span class="comment">** a thread must also synchronize any write-access to its own stack.</span>
<a name="l00023"></a>00023 <span class="comment">** Unsynchronized accesses are allowed only when reading its own stack,</span>
<a name="l00024"></a>00024 <span class="comment">** or when reading immutable fields from global objects</span>
<a name="l00025"></a>00025 <span class="comment">** (such as string values and udata values). </span>
<a name="l00026"></a>00026 <span class="comment">*/</span>
<a name="l00027"></a>00027 <span class="preprocessor">#ifndef lua_lock</span>
<a name="l00028"></a><a class="code" href="lstate_8h.html#a68a48b9104aeadf4842c25c12a9b8c9">00028</a> <span class="preprocessor"></span><span class="preprocessor">#define lua_lock(L)     ((void) 0)</span>
<a name="l00029"></a>00029 <span class="preprocessor"></span><span class="preprocessor">#endif</span>
<a name="l00030"></a>00030 <span class="preprocessor"></span>
<a name="l00031"></a>00031 <span class="preprocessor">#ifndef lua_unlock</span>
<a name="l00032"></a><a class="code" href="lstate_8h.html#1781f2a7d9161848a246d475a9171875">00032</a> <span class="preprocessor"></span><span class="preprocessor">#define lua_unlock(L)   ((void) 0)</span>
<a name="l00033"></a>00033 <span class="preprocessor"></span><span class="preprocessor">#endif</span>
<a name="l00034"></a>00034 <span class="preprocessor"></span>
<a name="l00035"></a>00035 
<a name="l00036"></a>00036 <span class="preprocessor">#ifndef lua_userstateopen</span>
<a name="l00037"></a><a class="code" href="lstate_8h.html#bdbfc204d6c2509db9d616141b893018">00037</a> <span class="preprocessor"></span><span class="preprocessor">#define lua_userstateopen(l)</span>
<a name="l00038"></a>00038 <span class="preprocessor"></span><span class="preprocessor">#endif</span>
<a name="l00039"></a>00039 <span class="preprocessor"></span>
<a name="l00040"></a>00040 
<a name="l00041"></a>00041 
<a name="l00042"></a>00042 <span class="keyword">struct </span><a class="code" href="structlua__longjmp.html">lua_longjmp</a>;  <span class="comment">/* defined in ldo.c */</span>
<a name="l00043"></a>00043 
<a name="l00044"></a>00044 
<a name="l00045"></a>00045 <span class="comment">/* default meta table (both for tables and udata) */</span>
<a name="l00046"></a><a class="code" href="lstate_8h.html#9e5e09b7a0a8beffba454495b5124ac7">00046</a> <span class="preprocessor">#define defaultmeta(L)  (&amp;G(L)-&gt;_defaultmeta)</span>
<a name="l00047"></a>00047 <span class="preprocessor"></span>
<a name="l00048"></a>00048 <span class="comment">/* table of globals */</span>
<a name="l00049"></a><a class="code" href="lstate_8h.html#1108b4374aa20059cd53d90b638c0e4b">00049</a> <span class="preprocessor">#define gt(L)   (&amp;L-&gt;_gt)</span>
<a name="l00050"></a>00050 <span class="preprocessor"></span>
<a name="l00051"></a>00051 <span class="comment">/* registry */</span>
<a name="l00052"></a><a class="code" href="lstate_8h.html#d294d19c007815f4c238efbd221ea705">00052</a> <span class="preprocessor">#define registry(L)     (&amp;G(L)-&gt;_registry)</span>
<a name="l00053"></a>00053 <span class="preprocessor"></span>
<a name="l00054"></a>00054 
<a name="l00055"></a>00055 <span class="comment">/* extra stack space to handle TM calls and some other extras */</span>
<a name="l00056"></a><a class="code" href="lstate_8h.html#9e690b8e4047af306d2dd1f78a9094d7">00056</a> <span class="preprocessor">#define EXTRA_STACK   5</span>
<a name="l00057"></a>00057 <span class="preprocessor"></span>
<a name="l00058"></a>00058 
<a name="l00059"></a><a class="code" href="lstate_8h.html#aa041be60f1804880597936cd3d27687">00059</a> <span class="preprocessor">#define BASIC_CI_SIZE           8</span>
<a name="l00060"></a>00060 <span class="preprocessor"></span>
<a name="l00061"></a><a class="code" href="lstate_8h.html#8f869ebbbd09a2c657864e11e3d88453">00061</a> <span class="preprocessor">#define BASIC_STACK_SIZE        (2*LUA_MINSTACK)</span>
<a name="l00062"></a>00062 <span class="preprocessor"></span>
<a name="l00063"></a>00063 
<a name="l00064"></a>00064 
<a name="l00065"></a><a class="code" href="structstringtable.html">00065</a> <span class="keyword">typedef</span> <span class="keyword">struct </span><a class="code" href="structstringtable.html">stringtable</a> {
<a name="l00066"></a>00066 <span class="comment">/*@null@*/</span>
<a name="l00067"></a><a class="code" href="structstringtable.html#132ba77978bbf9852ad840e11975e347">00067</a>   <a class="code" href="unionGCObject.html">GCObject</a> **<a class="code" href="structstringtable.html#132ba77978bbf9852ad840e11975e347">hash</a>;
<a name="l00068"></a><a class="code" href="structstringtable.html#e5c0aebea09828e0e250a34ebea683a3">00068</a>   <a class="code" href="llimits_8h.html#aec649ed31f1a3983453f89bc24ff89f">ls_nstr</a> <a class="code" href="structstringtable.html#e5c0aebea09828e0e250a34ebea683a3">nuse</a>;  <span class="comment">/* number of elements */</span>
<a name="l00069"></a><a class="code" href="structstringtable.html#10674affaad79ff819b6aa3b4618b94e">00069</a>   <span class="keywordtype">int</span> <a class="code" href="structstringtable.html#10674affaad79ff819b6aa3b4618b94e">size</a>;
<a name="l00070"></a>00070 } <a class="code" href="structstringtable.html">stringtable</a>;
<a name="l00071"></a>00071 
<a name="l00072"></a>00072 
<a name="l00073"></a>00073 <span class="comment">/*</span>
<a name="l00074"></a>00074 <span class="comment">** informations about a call</span>
<a name="l00075"></a>00075 <span class="comment">*/</span>
<a name="l00076"></a><a class="code" href="structCallInfo.html">00076</a> <span class="keyword">typedef</span> <span class="keyword">struct </span><a class="code" href="structCallInfo.html">CallInfo</a> {
<a name="l00077"></a>00077 <span class="comment">/*@dependent@*/</span> <span class="comment">/*@relnull@*/</span>
<a name="l00078"></a><a class="code" href="structCallInfo.html#7b8303ad59b7ba200cd5e3a26b118fbf">00078</a>   <a class="code" href="structlua__TObject.html">StkId</a> <a class="code" href="structCallInfo.html#7b8303ad59b7ba200cd5e3a26b118fbf">base</a>;  <span class="comment">/* base for called function */</span>
<a name="l00079"></a>00079 <span class="comment">/*@dependent@*/</span> <span class="comment">/*@relnull@*/</span>
<a name="l00080"></a><a class="code" href="structCallInfo.html#e782b06ef00ccfe0720625ffa99b093a">00080</a>   <a class="code" href="structlua__TObject.html">StkId</a> <a class="code" href="structCallInfo.html#e782b06ef00ccfe0720625ffa99b093a">top</a>;  <span class="comment">/* top for this function */</span>
<a name="l00081"></a><a class="code" href="structCallInfo.html#f902a563b421abdc49cb18808460d0a6">00081</a>   <span class="keywordtype">int</span> <a class="code" href="structCallInfo.html#f902a563b421abdc49cb18808460d0a6">state</a>;  <span class="comment">/* bit fields; see below */</span>
<a name="l00082"></a>00082   <span class="keyword">union </span>{
<a name="l00083"></a>00083     <span class="keyword">struct </span>{  <span class="comment">/* for Lua functions */</span>
<a name="l00084"></a>00084 <span class="comment">/*@observer@*/</span>
<a name="l00085"></a><a class="code" href="structCallInfo.html#4f8b835724037f01569452eab143948f">00085</a>       <span class="keyword">const</span> <a class="code" href="llimits_8h.html#f6c47c68c1e6b0387c915031e0e681e3">Instruction</a> *<a class="code" href="structCallInfo.html#4f8b835724037f01569452eab143948f">savedpc</a>;
<a name="l00086"></a>00086 <span class="comment">/*@observer@*/</span>
<a name="l00087"></a><a class="code" href="structCallInfo.html#47e34c8059c9924bd226079fc5ab499c">00087</a>       <span class="keyword">const</span> <a class="code" href="llimits_8h.html#f6c47c68c1e6b0387c915031e0e681e3">Instruction</a> **<a class="code" href="structCallInfo.html#47e34c8059c9924bd226079fc5ab499c">pc</a>;  <span class="comment">/* points to `pc' variable in `luaV_execute' */</span>
<a name="l00088"></a><a class="code" href="structCallInfo.html#e00bf2bdc64fc9d3f6599b6446b323c6">00088</a>       <span class="keywordtype">int</span> <a class="code" href="structCallInfo.html#e00bf2bdc64fc9d3f6599b6446b323c6">tailcalls</a>;  <span class="comment">/* number of tail calls lost under this entry */</span>
<a name="l00089"></a>00089     } <a class="code" href="structCallInfo.html#2555e3438fb429d3a910f8a69242e14e">l</a>;
<a name="l00090"></a>00090     <span class="keyword">struct </span>{  <span class="comment">/* for C functions */</span>
<a name="l00091"></a><a class="code" href="structCallInfo.html#a61b9dcfd351f681be060fb6f7bf2a78">00091</a>       <span class="keywordtype">int</span> <a class="code" href="structCallInfo.html#a61b9dcfd351f681be060fb6f7bf2a78">dummy</a>;  <span class="comment">/* just to avoid an empty struct */</span>
<a name="l00092"></a>00092     } <a class="code" href="structCallInfo.html#a3c742d15c475b7030736dfc7da3f911">c</a>;
<a name="l00093"></a>00093   } <a class="code" href="structCallInfo.html#34c9d0388e8bb8ffd2e8a334fc6e715d">u</a>;
<a name="l00094"></a>00094 } <a class="code" href="structCallInfo.html">CallInfo</a>;
<a name="l00095"></a>00095 
<a name="l00096"></a>00096 
<a name="l00097"></a>00097 <span class="comment">/*</span>
<a name="l00098"></a>00098 <span class="comment">** bit fields for `CallInfo.state'</span>
<a name="l00099"></a>00099 <span class="comment">*/</span>
<a name="l00100"></a><a class="code" href="lstate_8h.html#7651f05866c96295a87e280f18e575e8">00100</a> <span class="preprocessor">#define CI_C            (1&lt;&lt;0)  </span><span class="comment">/* 1 if function is a C function */</span>
<a name="l00101"></a>00101 <span class="comment">/* 1 if (Lua) function has an active `luaV_execute' running it */</span>
<a name="l00102"></a><a class="code" href="lstate_8h.html#280d3c7f7c2a815b11e873ec1377fe1a">00102</a> <span class="preprocessor">#define CI_HASFRAME     (1&lt;&lt;1)</span>
<a name="l00103"></a>00103 <span class="preprocessor"></span><span class="comment">/* 1 if Lua function is calling another Lua function (and therefore its</span>
<a name="l00104"></a>00104 <span class="comment">   `pc' is being used by the other, and therefore CI_SAVEDPC is 1 too) */</span>
<a name="l00105"></a><a class="code" href="lstate_8h.html#082f8fef2f579ab9e8f04419641ba690">00105</a> <span class="preprocessor">#define CI_CALLING      (1&lt;&lt;2)</span>
<a name="l00106"></a><a class="code" href="lstate_8h.html#be8d117279fbb27de79a9ce30e9cbaac">00106</a> <span class="preprocessor"></span><span class="preprocessor">#define CI_SAVEDPC      (1&lt;&lt;3)  </span><span class="comment">/* 1 if `savedpc' is updated */</span>
<a name="l00107"></a><a class="code" href="lstate_8h.html#05421972b8ff7b51d0549c8dd3fda014">00107</a> <span class="preprocessor">#define CI_YIELD        (1&lt;&lt;4)  </span><span class="comment">/* 1 if thread is suspended */</span>
<a name="l00108"></a>00108 
<a name="l00109"></a>00109 
<a name="l00110"></a><a class="code" href="lstate_8h.html#12b504eee786ce8f2c703a22c03d477e">00110</a> <span class="preprocessor">#define ci_func(ci)     (clvalue((ci)-&gt;base - 1))</span>
<a name="l00111"></a>00111 <span class="preprocessor"></span>
<a name="l00112"></a>00112 
<a name="l00113"></a>00113 <span class="comment">/*</span>
<a name="l00114"></a>00114 <span class="comment">** `global state', shared by all threads of this state</span>
<a name="l00115"></a>00115 <span class="comment">*/</span>
<a name="l00116"></a><a class="code" href="structglobal__State.html">00116</a> <span class="keyword">typedef</span> <span class="keyword">struct </span><a class="code" href="structglobal__State.html">global_State</a> {
<a name="l00117"></a><a class="code" href="structglobal__State.html#8cdea736db8d268e488aa9e9fa5c992c">00117</a>   <a class="code" href="structstringtable.html">stringtable</a> <a class="code" href="structglobal__State.html#8cdea736db8d268e488aa9e9fa5c992c">strt</a>;  <span class="comment">/* hash table for strings */</span>
<a name="l00118"></a>00118 <span class="comment">/*@owned@*/</span>
<a name="l00119"></a><a class="code" href="structglobal__State.html#80eccc9fb1fdf5501c58eb11e5dc520e">00119</a>   <a class="code" href="unionGCObject.html">GCObject</a> *<a class="code" href="structglobal__State.html#80eccc9fb1fdf5501c58eb11e5dc520e">rootgc</a>;  <span class="comment">/* list of (almost) all collectable objects */</span>
<a name="l00120"></a>00120 <span class="comment">/*@dependent@*/</span> <span class="comment">/*@null@*/</span>
<a name="l00121"></a><a class="code" href="structglobal__State.html#600b9ee83208a18e7cd972fc9a1aa3a0">00121</a>   <a class="code" href="unionGCObject.html">GCObject</a> *<a class="code" href="structglobal__State.html#600b9ee83208a18e7cd972fc9a1aa3a0">rootudata</a>;   <span class="comment">/* (separated) list of all userdata */</span>
<a name="l00122"></a>00122 <span class="comment">/*@dependent@*/</span> <span class="comment">/*@null@*/</span>
<a name="l00123"></a><a class="code" href="structglobal__State.html#8f11ac1643d581a8340f8b894b1ce869">00123</a>   <a class="code" href="unionGCObject.html">GCObject</a> *<a class="code" href="structglobal__State.html#8f11ac1643d581a8340f8b894b1ce869">tmudata</a>;  <span class="comment">/* list of userdata to be GC */</span>
<a name="l00124"></a><a class="code" href="structglobal__State.html#7ba3bd769769241f717761a9bef3be23">00124</a>   <a class="code" href="structMbuffer.html">Mbuffer</a> <a class="code" href="structglobal__State.html#7ba3bd769769241f717761a9bef3be23">buff</a>;  <span class="comment">/* temporary buffer for string concatentation */</span>
<a name="l00125"></a><a class="code" href="structglobal__State.html#a9ac0098ecb410b77df6c05188442ac6">00125</a>   <a class="code" href="llimits_8h.html#ac8c50ca0aa51c80523376da77c2c4d8">lu_mem</a> <a class="code" href="structglobal__State.html#a9ac0098ecb410b77df6c05188442ac6">GCthreshold</a>;
<a name="l00126"></a><a class="code" href="structglobal__State.html#606d5824d476eb5cf4a0a409e882cd71">00126</a>   <a class="code" href="llimits_8h.html#ac8c50ca0aa51c80523376da77c2c4d8">lu_mem</a> <a class="code" href="structglobal__State.html#606d5824d476eb5cf4a0a409e882cd71">nblocks</a>;  <span class="comment">/* number of `bytes' currently allocated */</span>
<a name="l00127"></a><a class="code" href="structglobal__State.html#a925f5bcdedf55e5353e37cfe9e5d6d0">00127</a>   lua_CFunction <a class="code" href="structglobal__State.html#a925f5bcdedf55e5353e37cfe9e5d6d0">panic</a>;  <span class="comment">/* to be called in unprotected errors */</span>
<a name="l00128"></a><a class="code" href="structglobal__State.html#0c9a3fbbb51427b26c9c79a6f2e78bfa">00128</a>   <a class="code" href="structlua__TObject.html">TObject</a> <a class="code" href="structglobal__State.html#0c9a3fbbb51427b26c9c79a6f2e78bfa">_registry</a>;
<a name="l00129"></a><a class="code" href="structglobal__State.html#afafb31c4c77fefd1fca33bb8b5c855f">00129</a>   <a class="code" href="structlua__TObject.html">TObject</a> <a class="code" href="structglobal__State.html#afafb31c4c77fefd1fca33bb8b5c855f">_defaultmeta</a>;
<a name="l00130"></a><a class="code" href="structglobal__State.html#2c81856ac69a92580d4330cd1070c7c5">00130</a>   <span class="keyword">struct </span><a class="code" href="structlua__State.html">lua_State</a> *<a class="code" href="structglobal__State.html#2c81856ac69a92580d4330cd1070c7c5">mainthread</a>;
<a name="l00131"></a><a class="code" href="structglobal__State.html#18328605677531c9df48b331f5e8532f">00131</a>   <a class="code" href="structNode.html">Node</a> <a class="code" href="structglobal__State.html#18328605677531c9df48b331f5e8532f">dummynode</a>[1];  <span class="comment">/* common node array for all empty tables */</span>
<a name="l00132"></a><a class="code" href="structglobal__State.html#c1d80bd5bb3d4427b25054696eb1542c">00132</a>   <a class="code" href="unionTString.html">TString</a> *<a class="code" href="structglobal__State.html#c1d80bd5bb3d4427b25054696eb1542c">tmname</a>[<a class="code" href="ltm_8h.html#69e345ae253d250b61a03f1d6871c8d10d06a30ffbc1d1f7e21a96f52da3ef56">TM_N</a>];  <span class="comment">/* array with tag-method names */</span>
<a name="l00133"></a>00133 } <a class="code" href="structglobal__State.html">global_State</a>;
<a name="l00134"></a>00134 
<a name="l00135"></a>00135 
<a name="l00136"></a>00136 <span class="comment">/*</span>
<a name="l00137"></a>00137 <span class="comment">** `per thread' state</span>
<a name="l00138"></a>00138 <span class="comment">*/</span>
<a name="l00139"></a><a class="code" href="structlua__State.html">00139</a> <span class="keyword">struct </span><a class="code" href="structlua__State.html">lua_State</a> {
<a name="l00140"></a><a class="code" href="structlua__State.html#b9d9ecdafb192a9c0dd5909a08400dfc">00140</a>   <a class="code" href="lobject_8h.html#5ee24faa024428a3c176895fe9925031">CommonHeader</a>;
<a name="l00141"></a>00141 <span class="comment">/*@dependent@*/</span> <span class="comment">/*@relnull@*/</span>
<a name="l00142"></a><a class="code" href="structlua__State.html#195f448e76fd404953fa1962d28212a3">00142</a>   <a class="code" href="structlua__TObject.html">StkId</a> <a class="code" href="structlua__State.html#195f448e76fd404953fa1962d28212a3">top</a>;  <span class="comment">/* first free slot in the stack */</span>
<a name="l00143"></a>00143 <span class="comment">/*@dependent@*/</span> <span class="comment">/*@relnull@*/</span>
<a name="l00144"></a><a class="code" href="structlua__State.html#c11fa7aeb6254b8de57fb9d1dd06fdf2">00144</a>   <a class="code" href="structlua__TObject.html">StkId</a> <a class="code" href="structlua__State.html#c11fa7aeb6254b8de57fb9d1dd06fdf2">base</a>;  <span class="comment">/* base of current function */</span>
<a name="l00145"></a>00145 <span class="comment">/*@relnull@*/</span>
<a name="l00146"></a><a class="code" href="structlua__State.html#63c9e91949432bcef6251366fbac6c9e">00146</a>   <a class="code" href="structglobal__State.html">global_State</a> *<a class="code" href="structlua__State.html#63c9e91949432bcef6251366fbac6c9e">l_G</a>;
<a name="l00147"></a>00147 <span class="comment">/*@dependent@*/</span> <span class="comment">/*@relnull@*/</span>
<a name="l00148"></a><a class="code" href="structlua__State.html#7fbb5727050853f411ad64b4be9ab5c8">00148</a>   <a class="code" href="structCallInfo.html">CallInfo</a> *<a class="code" href="structlua__State.html#7fbb5727050853f411ad64b4be9ab5c8">ci</a>;  <span class="comment">/* call info for current function */</span>
<a name="l00149"></a>00149 <span class="comment">/*@dependent@*/</span>
<a name="l00150"></a><a class="code" href="structlua__State.html#797a585a2bdb638bd1ca78c15bbe46fb">00150</a>   <a class="code" href="structlua__TObject.html">StkId</a> <a class="code" href="structlua__State.html#797a585a2bdb638bd1ca78c15bbe46fb">stack_last</a>;  <span class="comment">/* last free slot in the stack */</span>
<a name="l00151"></a>00151 <span class="comment">/*@owned@*/</span> <span class="comment">/*@relnull@*/</span>
<a name="l00152"></a><a class="code" href="structlua__State.html#27e1d5122ef7fffae7542814c72fdd2f">00152</a>   <a class="code" href="structlua__TObject.html">StkId</a> <a class="code" href="structlua__State.html#27e1d5122ef7fffae7542814c72fdd2f">stack</a>;  <span class="comment">/* stack base */</span>
<a name="l00153"></a><a class="code" href="structlua__State.html#44530127453a374634f7ad22eee9ec6c">00153</a>   <span class="keywordtype">int</span> <a class="code" href="structlua__State.html#44530127453a374634f7ad22eee9ec6c">stacksize</a>;
<a name="l00154"></a>00154 <span class="comment">/*@dependent@*/</span> <span class="comment">/*@relnull@*/</span>
<a name="l00155"></a><a class="code" href="structlua__State.html#683688539b11d067259dba8da8e1469a">00155</a>   <a class="code" href="structCallInfo.html">CallInfo</a> *<a class="code" href="structlua__State.html#683688539b11d067259dba8da8e1469a">end_ci</a>;  <span class="comment">/* points after end of ci array*/</span>
<a name="l00156"></a>00156 <span class="comment">/*@owned@*/</span> <span class="comment">/*@relnull@*/</span>
<a name="l00157"></a><a class="code" href="structlua__State.html#5e99f3f914a793d73684a19eb96dda3b">00157</a>   <a class="code" href="structCallInfo.html">CallInfo</a> *<a class="code" href="structlua__State.html#5e99f3f914a793d73684a19eb96dda3b">base_ci</a>;  <span class="comment">/* array of CallInfo's */</span>
<a name="l00158"></a><a class="code" href="structlua__State.html#7eeb5161838f93d7aa57108a936e8982">00158</a>   <span class="keywordtype">unsigned</span> <span class="keywordtype">short</span> <a class="code" href="structlua__State.html#7eeb5161838f93d7aa57108a936e8982">size_ci</a>;  <span class="comment">/* size of array `base_ci' */</span>
<a name="l00159"></a><a class="code" href="structlua__State.html#c388127d044b54d2e9779beb44398845">00159</a>   <span class="keywordtype">unsigned</span> <span class="keywordtype">short</span> <a class="code" href="structlua__State.html#c388127d044b54d2e9779beb44398845">nCcalls</a>;  <span class="comment">/* number of nested C calls */</span>
<a name="l00160"></a><a class="code" href="structlua__State.html#1d4ee1613c41d6100db9e0c73217b41f">00160</a>   <a class="code" href="llimits_8h.html#e1fe9ac10d9803bd1d7bdf30b18bad68">lu_byte</a> <a class="code" href="structlua__State.html#1d4ee1613c41d6100db9e0c73217b41f">hookmask</a>;
<a name="l00161"></a><a class="code" href="structlua__State.html#c2903d4a712ca1c2d114f541636490f5">00161</a>   <a class="code" href="llimits_8h.html#e1fe9ac10d9803bd1d7bdf30b18bad68">lu_byte</a> <a class="code" href="structlua__State.html#c2903d4a712ca1c2d114f541636490f5">allowhook</a>;
<a name="l00162"></a><a class="code" href="structlua__State.html#d2da276b7b96880fc08d3740ae6d079a">00162</a>   <a class="code" href="llimits_8h.html#e1fe9ac10d9803bd1d7bdf30b18bad68">lu_byte</a> <a class="code" href="structlua__State.html#d2da276b7b96880fc08d3740ae6d079a">hookinit</a>;
<a name="l00163"></a><a class="code" href="structlua__State.html#5d760c922e94390cd270ebb4ca4bc848">00163</a>   <span class="keywordtype">int</span> <a class="code" href="structlua__State.html#5d760c922e94390cd270ebb4ca4bc848">basehookcount</a>;
<a name="l00164"></a><a class="code" href="structlua__State.html#8824aded162dcdb9d3a142a90819e372">00164</a>   <span class="keywordtype">int</span> <a class="code" href="structlua__State.html#8824aded162dcdb9d3a142a90819e372">hookcount</a>;
<a name="l00165"></a>00165 <span class="comment">/*@relnull@*/</span>
<a name="l00166"></a><a class="code" href="structlua__State.html#89d3fb3ecb6831d1c5c51b4a87ace8ed">00166</a>   lua_Hook <a class="code" href="structlua__State.html#89d3fb3ecb6831d1c5c51b4a87ace8ed">hook</a>;
<a name="l00167"></a><a class="code" href="structlua__State.html#01a01b5a261797d9d8ff9c552ce64b5f">00167</a>   <a class="code" href="structlua__TObject.html">TObject</a> <a class="code" href="structlua__State.html#01a01b5a261797d9d8ff9c552ce64b5f">_gt</a>;  <span class="comment">/* table of globals */</span>
<a name="l00168"></a>00168 <span class="comment">/*@dependent@*/</span> <span class="comment">/*@relnull@*/</span>
<a name="l00169"></a><a class="code" href="structlua__State.html#9055a00dd8a0fd55fd2df6554b8a2d58">00169</a>   <a class="code" href="unionGCObject.html">GCObject</a> *<a class="code" href="structlua__State.html#9055a00dd8a0fd55fd2df6554b8a2d58">openupval</a>;  <span class="comment">/* list of open upvalues in this stack */</span>
<a name="l00170"></a>00170 <span class="comment">/*@dependent@*/</span> <span class="comment">/*@relnull@*/</span>
<a name="l00171"></a><a class="code" href="structlua__State.html#0d446661e92287c8409076c970771217">00171</a>   <a class="code" href="unionGCObject.html">GCObject</a> *<a class="code" href="structlua__State.html#0d446661e92287c8409076c970771217">gclist</a>;
<a name="l00172"></a>00172 <span class="comment">/*@relnull@*/</span>
<a name="l00173"></a><a class="code" href="structlua__State.html#e4bbd2199ffd804fe64142c3d5ecb249">00173</a>   <span class="keyword">struct </span><a class="code" href="structlua__longjmp.html">lua_longjmp</a> *<a class="code" href="structlua__State.html#e4bbd2199ffd804fe64142c3d5ecb249">errorJmp</a>;  <span class="comment">/* current error recover point */</span>
<a name="l00174"></a><a class="code" href="structlua__State.html#09de3a7c6d3bcb6c2b0d26a81bb8d44b">00174</a>   ptrdiff_t <a class="code" href="structlua__State.html#09de3a7c6d3bcb6c2b0d26a81bb8d44b">errfunc</a>;  <span class="comment">/* current error handling function (stack index) */</span>
<a name="l00175"></a>00175 };
<a name="l00176"></a>00176 
<a name="l00177"></a>00177 
<a name="l00178"></a><a class="code" href="lstate_8h.html#103db2de6edf3420c6c6c9a282562406">00178</a> <span class="preprocessor">#define G(L)    (L-&gt;l_G)</span>
<a name="l00179"></a>00179 <span class="preprocessor"></span>
<a name="l00180"></a>00180 
<a name="l00181"></a>00181 <span class="comment">/*</span>
<a name="l00182"></a>00182 <span class="comment">** Union of all collectable objects</span>
<a name="l00183"></a>00183 <span class="comment">*/</span>
<a name="l00184"></a><a class="code" href="unionGCObject.html">00184</a> <span class="keyword">union </span><a class="code" href="unionGCObject.html">GCObject</a> {
<a name="l00185"></a><a class="code" href="unionGCObject.html#1abd8f26ec7f6d3c47da2b9411b87a95">00185</a>   <a class="code" href="structGCheader.html">GCheader</a> <a class="code" href="unionGCObject.html#1abd8f26ec7f6d3c47da2b9411b87a95">gch</a>;
<a name="l00186"></a><a class="code" href="unionGCObject.html#13c9e846aed214f15f08856eff708156">00186</a>   <span class="keyword">union </span><a class="code" href="unionTString.html">TString</a> <a class="code" href="unionGCObject.html#13c9e846aed214f15f08856eff708156">ts</a>;
<a name="l00187"></a><a class="code" href="unionGCObject.html#cb21de33631e8e6c232e25afa5719d70">00187</a>   <span class="keyword">union </span><a class="code" href="unionUdata.html">Udata</a> <a class="code" href="unionGCObject.html#cb21de33631e8e6c232e25afa5719d70">u</a>;
<a name="l00188"></a><a class="code" href="unionGCObject.html#6333069bf1033586bb75a9d099781cb9">00188</a>   <span class="keyword">union </span><a class="code" href="unionClosure.html">Closure</a> <a class="code" href="unionGCObject.html#6333069bf1033586bb75a9d099781cb9">cl</a>;
<a name="l00189"></a><a class="code" href="unionGCObject.html#1386073c8162a56cf73946847579fd5b">00189</a>   <span class="keyword">struct </span><a class="code" href="structTable.html">Table</a> <a class="code" href="unionGCObject.html#1386073c8162a56cf73946847579fd5b">h</a>;
<a name="l00190"></a><a class="code" href="unionGCObject.html#0f07556fc701098194d000a1bb4b0e6a">00190</a>   <span class="keyword">struct </span><a class="code" href="structProto.html">Proto</a> <a class="code" href="unionGCObject.html#0f07556fc701098194d000a1bb4b0e6a">p</a>;
<a name="l00191"></a><a class="code" href="unionGCObject.html#a6b546130da6430205f25864900a4202">00191</a>   <span class="keyword">struct </span><a class="code" href="structUpVal.html">UpVal</a> <a class="code" href="unionGCObject.html#a6b546130da6430205f25864900a4202">uv</a>;
<a name="l00192"></a><a class="code" href="unionGCObject.html#09dfef993a41cb62497249e7ccf6fb5f">00192</a>   <span class="keyword">struct </span><a class="code" href="structlua__State.html">lua_State</a> <a class="code" href="unionGCObject.html#09dfef993a41cb62497249e7ccf6fb5f">th</a>;  <span class="comment">/* thread */</span>
<a name="l00193"></a>00193 };
<a name="l00194"></a>00194 
<a name="l00195"></a>00195 
<a name="l00196"></a>00196 <span class="comment">/* macros to convert a GCObject into a specific value */</span>
<a name="l00197"></a><a class="code" href="lstate_8h.html#ccac69fd582898bfa9fe9067c17a1948">00197</a> <span class="preprocessor">#define gcotots(o)      check_exp((o)-&gt;gch.tt == LUA_TSTRING, &amp;((o)-&gt;ts))</span>
<a name="l00198"></a><a class="code" href="lstate_8h.html#8df56e9554d8ca940dc56c9add905b1b">00198</a> <span class="preprocessor"></span><span class="preprocessor">#define gcotou(o)       check_exp((o)-&gt;gch.tt == LUA_TUSERDATA, &amp;((o)-&gt;u))</span>
<a name="l00199"></a><a class="code" href="lstate_8h.html#fe7981c397b2d826b164faa08d52721f">00199</a> <span class="preprocessor"></span><span class="preprocessor">#define gcotocl(o)      check_exp((o)-&gt;gch.tt == LUA_TFUNCTION, &amp;((o)-&gt;cl))</span>
<a name="l00200"></a><a class="code" href="lstate_8h.html#6d127b7d00736bf1cafd674acac82075">00200</a> <span class="preprocessor"></span><span class="preprocessor">#define gcotoh(o)       check_exp((o)-&gt;gch.tt == LUA_TTABLE, &amp;((o)-&gt;h))</span>
<a name="l00201"></a><a class="code" href="lstate_8h.html#5f81d264bb74381ffa039fb207704425">00201</a> <span class="preprocessor"></span><span class="preprocessor">#define gcotop(o)       check_exp((o)-&gt;gch.tt == LUA_TPROTO, &amp;((o)-&gt;p))</span>
<a name="l00202"></a><a class="code" href="lstate_8h.html#2c305352d601274a0036608be61c6106">00202</a> <span class="preprocessor"></span><span class="preprocessor">#define gcotouv(o)      check_exp((o)-&gt;gch.tt == LUA_TUPVAL, &amp;((o)-&gt;uv))</span>
<a name="l00203"></a><a class="code" href="lstate_8h.html#290c99068a6004c9553cb9dab9026a68">00203</a> <span class="preprocessor"></span><span class="preprocessor">#define ngcotouv(o) \</span>
<a name="l00204"></a>00204 <span class="preprocessor">        check_exp((o) == NULL || (o)-&gt;gch.tt == LUA_TUPVAL, &amp;((o)-&gt;uv))</span>
<a name="l00205"></a><a class="code" href="lstate_8h.html#b548617c87a4d79e4bce4aff6d570394">00205</a> <span class="preprocessor"></span><span class="preprocessor">#define gcototh(o)      check_exp((o)-&gt;gch.tt == LUA_TTHREAD, &amp;((o)-&gt;th))</span>
<a name="l00206"></a>00206 <span class="preprocessor"></span>
<a name="l00207"></a>00207 <span class="comment">/* macro to convert any value into a GCObject */</span>
<a name="l00208"></a><a class="code" href="lstate_8h.html#b45b06e8618aa4a7bf53171933f30d57">00208</a> <span class="preprocessor">#define valtogco(v)     (cast(GCObject *, (v)))</span>
<a name="l00209"></a>00209 <span class="preprocessor"></span>
<a name="l00210"></a>00210 
<a name="l00211"></a>00211 <span class="comment">/*@null@*/</span>
<a name="l00212"></a>00212 <a class="code" href="structlua__State.html">lua_State</a> *<a class="code" href="lstate_8c.html#37e72603bb5f5f82e35938b696ce36a7">luaE_newthread</a> (<a class="code" href="structlua__State.html">lua_State</a> *L)
<a name="l00213"></a>00213         <span class="comment">/*@modifies L @*/</span>;
<a name="l00214"></a>00214 <span class="keywordtype">void</span> <a class="code" href="lstate_8c.html#8c121cf8444c9c54e934aeb509c4b73a">luaE_freethread</a> (<a class="code" href="structlua__State.html">lua_State</a> *L, <a class="code" href="structlua__State.html">lua_State</a> *L1)
<a name="l00215"></a>00215         <span class="comment">/*@modifies L, L1 @*/</span>;
<a name="l00216"></a>00216 
<a name="l00217"></a>00217 <span class="preprocessor">#endif</span>
<a name="l00218"></a>00218 <span class="preprocessor"></span>
</pre></div><hr size="1"><address style="align: right;"><small>Generated on 1 Oct 2013 for rpm by&nbsp;
<a href="http://www.doxygen.org/index.html">
<img src="doxygen.png" alt="doxygen" align="middle" border="0"></a> 1.4.7 </small></address>
</body>
</html>