From 24e2c151136fc7d565f9f9babcf24b199eb6c6f3 Mon Sep 17 00:00:00 2001
From: Alexander Gavrilov
Date: Wed, 13 Jun 2012 11:00:54 +0400
Subject: Enhance docs on bitfield refs to cover a question raised on chat
recently.
---
Lua API.html | 11 +++++++++--
1 file changed, 9 insertions(+), 2 deletions(-)
(limited to 'Lua API.html')
diff --git a/Lua API.html b/Lua API.html
index 1576652d..568090a7 100644
--- a/Lua API.html
+++ b/Lua API.html
@@ -534,10 +534,17 @@ use #ref, or just
Bitfield references
Bitfields behave like special fixed-size containers. -The _enum property points to the bitfield type.
-Numerical indices correspond to the shift value, +Consider them to be something in between structs and +fixed-size vectors.
+The _enum property points to the bitfield type. +Numerical indices correspond to the shift value, and if a subfield occupies multiple bits, the ipairs order would have a gap.
+Since currently there is no API to allocate a bitfield +object fully in GC-managed lua heap, consider using the +lua table assignment feature outlined below in order to +pass bitfield values to dfhack API functions that need +them, e.g. matinfo:matches{metal=true}.