|
Quite possibly, but I’m not clear on what exactly the OP wants to DO with the various pointers/references/IDs into the "big chunk of stuff". I’m not clear on what the lifetime of this big chunk of data is .. it appears from his later posts to exceed that of any given Lua VM, in which case what was the need for GC management and full userdata at all? I get a hint from this thread that the OP wishes to have a very generic reflective access model into the dataset (think DOM), but again the use cases are not clear to me from this thread. To get any further I’d like to see several basic questions answered: 1. What is the lifetime of the external data compared to the lifetime of any of the accessing Lua VM? 2. What entity interprets the external data (Lua or C code) to impute it’s structure and any deducible descriptive metadata? 3. How does the data need to be presented to Lua for processing (numbers, strings, opaque data etc)? 4. What are the operations that Lua needs to perform on this data, and what tradeoffs are there between size and speed for these operations? Regardless, I stand by my original post, introducing any *generic* mechanism into Lua to access the internals of userdata would be a bad thing. —Tim |