From 55d03696ae4fb688f2e66a502d69521b1495cfb6 Mon Sep 17 00:00:00 2001 From: vallode <18506096+vallode@users.noreply.github.com> Date: Tue, 14 Nov 2023 11:19:51 +0100 Subject: [PATCH] Fix _field method documentation --- docs/dev/Lua API.rst | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/docs/dev/Lua API.rst b/docs/dev/Lua API.rst index 8b2904101..730ad009f 100644 --- a/docs/dev/Lua API.rst +++ b/docs/dev/Lua API.rst @@ -197,11 +197,12 @@ They implement the following features: are automatically exposed in their exact type, and the reverse rule would make access to superclass fields unreliable. -* ``ref._field(field)`` +* ``ref:_field(field)`` Returns a reference to a valid field. That is, unlike regular subscript, it returns a reference to the field within the structure - even for primitive typed fields and pointers. + even for primitive typed fields and pointers. Fails with an error + if the field is not found. * ``ref:vmethod(args...)`` @@ -246,7 +247,7 @@ Implemented features: may return a default value, or auto-resize instead for convenience. Currently this relaxed mode is implemented by df-flagarray aka BitArray. -* ``ref._field(index)`` +* ``ref:_field(index)`` Like with structs, returns a pointer to the array element, if possible. Flag and bit arrays cannot return such pointer, so it fails with an error.