From 149f1759096f1fa4117c0e7ac1e6172b669a801b Mon Sep 17 00:00:00 2001 From: Alexander Gavrilov Date: Wed, 13 Jun 2012 22:40:39 +0400 Subject: Make primitive refs (i.e. pointers to numbers, etc) behave as arrays. --- Lua API.html | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'Lua API.html') 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 _field() method.
They behave as structs with one field value of the right type.
+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 value field.