X-Git-Url: https://git.distorted.org.uk/~mdw/sod/blobdiff_plain/fd040f066b906ce63396b9703bc16d32bcc5204e..287e744e9aa96b8eebeb530b68e2854e8ffe5580:/doc/structures.tex?ds=sidebyside

diff --git a/doc/structures.tex b/doc/structures.tex
index c5c2219..7121692 100644
--- a/doc/structures.tex
+++ b/doc/structures.tex
@@ -363,7 +363,7 @@ type @|struct $C$__ilayout|.
           @<type>_n @<slot>_n;                                \-\\
         \} $c$;                                               \-\\
       \} $c$;                                                   \\
-      struct $H$__ichain_$h$ $h$;                               \\
+      struct $A$__ichain_$h$ $a$;                               \\
       \quad$\vdots$                                           \-\\
     \} $h$;                                                     \\
     union $B$__ichainu_$i$ $i$;                                 \\
@@ -444,7 +444,7 @@ vtable pointer
 In general, the vtables for the different chains will have \emph{different}
 structures.
 
-The instance layout split neatly into disjoint chains.  This is necessary
+The instance layout splits neatly into disjoint chains.  This is necessary
 because each @|ichain| must have as a prefix the @|ichain| for each
 superclass in the same chain, and each slot must be stored in exactly one
 place.  The layout of vtables doesn't have this second requirement: it
@@ -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.
@@ -589,7 +589,7 @@ or a standard message which takes keyword arguments, defined as
                     @<type>_n @<arg>_n?                       \+\\
                   @<type>_{n+1} @<kw>_{n+1} @[= @<dflt>_{n+1}@],
                     $\ldots$,
-                    @<type>_m @<kw>_m @[= @<dflt>_m@]);
+                    @<type>_{n'} @<kw>_{n'} @[= @<dflt>_{n'}@]);
 \end{prog}
 two entry points are defined: the usual `main' entry point which accepts a
 variable number of arguments, and a `valist' entry point which accepts an
