lua-users home
lua-l archive

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


On 2013-11-25 7:15 PM, "Geoff Smith" <spammealot1@live.co.uk> wrote:
>
> Hi
>  
> Bit of a newbie type question I am afraid
>  
> For the purposes of a debugging aid, is it possible to iterate through and print out the contents of the Lua registry from a) pure Lua code, and b) from C using the C API ?
>  
>  I am guessing b) is possible but I cant find any example code or mention of this so I am wondering if that statement is actually true ?
>  
> Thanks for any guidance
>  
> Regards  Geoff

Just use debug.getregistry() and iterate it like any table.