[Date Prev][Date Next][Thread Prev][Thread Next]
- Subject: Re: Identifiers of tables on Stack from C/C++
- From: Bogdan Harjoc <harjoc@...>
- Date: Mon, 30 May 2011 22:03:08 +0300
On Mon, May 30, 2011 at 3:53 PM, Joerg Walter <firstname.lastname@example.org>
Tables are objects in the LUA world. I'm looking for an identifier for the C world. If I wanted to write a table traverser in LUA I would put the table itself as a key into another table to remember that this table has been visited.
I'm looking for the c/c++ equivalent: Putting the table id into an std::set.
1. Using the registry mechanism. But I don't know how this behaves with references on tables.
How about creating a table on the stack, adding the elements into it as if it were a set, and popping it when you're done ?