diff options
| author | Alexander Gavrilov | 2012-06-13 22:40:39 +0400 |
|---|---|---|
| committer | Alexander Gavrilov | 2012-06-13 22:40:39 +0400 |
| commit | 149f1759096f1fa4117c0e7ac1e6172b669a801b (patch) | |
| tree | 2a432d4ae55a7b62d5ae8a43b166a66632869ddc /Lua API.html | |
| parent | c50b605dfc2024bf5bca7d6dfb18fc266b358978 (diff) | |
| download | dfhack-149f1759096f1fa4117c0e7ac1e6172b669a801b.tar.gz dfhack-149f1759096f1fa4117c0e7ac1e6172b669a801b.tar.bz2 dfhack-149f1759096f1fa4117c0e7ac1e6172b669a801b.tar.xz | |
Make primitive refs (i.e. pointers to numbers, etc) behave as arrays.
Diffstat (limited to 'Lua API.html')
| -rw-r--r-- | Lua API.html | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/Lua API.html b/Lua API.html index 2df8a7f2..3edcfd27 100644 --- a/Lua API.html +++ b/Lua API.html @@ -453,6 +453,10 @@ that don't fit any of the other reference types. Such references can only appear as a value of a pointer field, or as a result of calling the <tt class="docutils literal">_field()</tt> method.</p> <p>They behave as structs with one field <tt class="docutils literal">value</tt> of the right type.</p> +<p>To make working with numeric buffers easier, they also allow +numeric indices. Note that other than excluding negative values +no bound checking is performed, since buffer length is not available. +Index 0 is equivalent to the <tt class="docutils literal">value</tt> field.</p> </div> <div class="section" id="struct-references"> <h3><a class="toc-backref" href="#id4">Struct references</a></h3> |
