lightning
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Lightning] Documentation bug


From: Ludovic Courtès
Subject: [Lightning] Documentation bug
Date: Thu, 06 Oct 2005 11:14:35 +0200
User-agent: Gnus/5.110004 (No Gnus v0.4) Emacs/21.4 (gnu/linux)

Hi,

In the `Reentrancy' node, the manual reads:

  In fact, it is possible to define your own copy of GNU
  lightning's instruction state by defining a variable of type
  `jit_state' and `#define'-ing `_jit' to it:

           struct jit_state lightning;
           #define _jit lightning

  [...]

     The idea is to pass the current `struct jit_state' to the function:

   static void
   _opt_muli_i(jit, dest, source, n)
        register struct jit_state *jit;
        register int            dest, source, n;
   {
   #define _jit          jit
   ...
   #undef _jit
   }

However, in Lightning 1.2 (the one in Debian), `jit_state' is not a
`struct' but a plain typedef.  Additionally, the `jit_' macros expect
`_jit' to be of type `jit_state', not `jit_state *'.  So the example
above should be written as follows:

     static void
     _opt_muli_i(jit, dest, source, n)
          register jit_state *jit;
          register int        dest, source, n;
     {
     #define _jit          (* jit)
     ...
     #undef _jit
     }

Thanks,
Ludovic.




reply via email to

[Prev in Thread] Current Thread [Next in Thread]