From 9a9a7b35fe696f7dfe041935bf41e89558930aee Mon Sep 17 00:00:00 2001 Message-Id: <9a9a7b35fe696f7dfe041935bf41e89558930aee.1714030752.git.mdw@distorted.org.uk> From: Mark Wooding Date: Sat, 9 Jun 2018 03:52:37 +0100 Subject: [PATCH] doc/structures.tex, lib/sod-structs.3: Fix description of class pointers. Organization: Straylight/Edgeware From: Mark Wooding There's really only one in the vtable for each metaclass chain, and the types of the pointers vary as we descend the superclass graph. --- doc/structures.tex | 8 ++++---- lib/sod-structs.3 | 13 ++++++++++--- 2 files changed, 14 insertions(+), 7 deletions(-) diff --git a/doc/structures.tex b/doc/structures.tex index b2835fe..7121692 100644 --- a/doc/structures.tex +++ b/doc/structures.tex @@ -530,14 +530,14 @@ traversal. \item Let $N$ be the metaclass of $A$. Examine the superclass chains of $N$ in order of decreasing specificity of their most-specific classes. Let $J$ - be the chain head of such a chain, and let $Q$ be the most specific - superclass of $M$ in the same chain as $J$. Then, if there is currently no - class pointer of type $Q$, then add a member + be the chain head of such a chain. If there is currently no class pointer + for the chain headed by $J$, then add a member \begin{prog} const $Q$ *_cls_$j$; \end{prog} to the vtable pointing to the appropriate @|islots| structure within $M$'s - class object. + class object, where $Q$ is the most specific superclass of $M$ in the same + chain as $J$. \item Examine the superclass chains of $A$ in order of decreasing specificity of their most-specific classes. Let $I$ be the chain head of such a chain. diff --git a/lib/sod-structs.3 b/lib/sod-structs.3 index a515c8e..48364cc 100644 --- a/lib/sod-structs.3 +++ b/lib/sod-structs.3 @@ -869,8 +869,9 @@ be the most specific superclass of .I M in the same chain as .IR J . -Then, if there is currently no class pointer of type -.IR Q , +If there is currently no class pointer +for the chain headed by +.IR J , then add a member .RS .IP @@ -883,7 +884,13 @@ pointing to the appropriate .B islots structure within .IR M 's -class object. +class object, +where +.I Q +is the most specific superclass of +.I M +in the same chain as +.IR J . .RE .hP \*o Examine the superclass chains of -- [mdw]