Am 29.08.2010 um 13:15 schrieb Hans Hagen:

> On 29-8-2010 9:03, Taco Hoekwater wrote:
>> On 08/29/2010 08:48 AM, Patrick Gundlach wrote:
>>>> 
>>>> Is the following 172 something like I need? How would I access that
>>>> (besides string.gsub())?
>>>> 
>>>> <node nil< 172> nil : hlist 2>
>>> 
>>> 
>>> I am currently using this number in the middle via tostring() and
>>> gsub(). But I'd still like to know if this can be used as an id.
>> 
>> This number uniquely identifies a node for as long as it stays
>> allocated, yes. If it is freed, a new node may have the same
>> number.
> 
> but for storing the node's id one can as well use the nodes user object 
> itself as it's equally unique during the livespan of a node and one can 
> compare pointers so the 'id' snippet in the string is not giving more 
> uniqueness than the node user object itself


I need to generate some unique text for that node (I am creating a visual 
representation of a nodelist using graphviz), so I see two choices: a) get some 
id string or b) create a look table with the nodes as an index and some random 
string as the value for each node. But somehow b) didn't work. Is there a way 
to get the "value of a pointer" as a text string in Lua? Such as when you do 
tostring({}). 

Patrick

_______________________________________________
dev-luatex mailing list
dev-luatex@ntg.nl
http://www.ntg.nl/mailman/listinfo/dev-luatex

Reply via email to