[NTG-context] Attributes

St├ęphane Goujet stephane.goujet at wanadoo.fr
Wed Apr 23 15:07:16 CEST 2014



On Wed, 23 Apr 2014, Hans Hagen wrote:

> On 4/22/2014 8:10 PM, Stéphane Goujet wrote:
>>     Please have a look at my example (it is a bit long because it shows
>>  various possibilities) and its result.
>>      When I have not yet done a \defineattribute[myattr],
>>  node.has_attribute
>>  returns 0 when I thought it should return nil.
>>     When I do \defineattribute[...], every attribute seems to get the
>>  same number (1024), but now node.has_attribute returns nil ...
>
> change this is syst-ini.mkiv:
>
> \normalprotected\def\newattribute{\syst_basics_allocate\c_syst_last_allocated_attribute\attribute\attributedef\c_syst_max_allocated_register}

   Thank you, it seems to work much better !

   There is still the problem that "node.has_attribute" does not return 
"nil" when I expect it should, but that is luatex problem (a check 
that a parameter is really an integer should be performed before calling 
lua_tointeger), so I will change mailing-list in order to report it.


Faithfully yours,
   Stéphane Goujet.


More information about the ntg-context mailing list