HolyLib Wiki

luagc.GetFormattedGCObjectInfo

 table luagc.GetFormattedGCObjectInfo( any object )

Description

Returns a nicely formatted table showing which fields store which GC references for the given object.

Fields are not consistent and can be nil always check if a field exists!

Recently Added

This was recently added in version (0.8 - DEV).

Arguments

1any object

Object to return information on

Returns

1table informations

Example

function test() end debug.setfenv(test, {hai = ":3"}) local formatted = luagc.GetFormattedGCObjectInfo(test) PrintTable(formatted) PrintTable(formatted.proto) -- Let's also see the proto
["environment"]: ["hai"] = :3 ["object"] = function: 0xf09e29f2 ["proto"] = proto: 0xf0898ae2 ["type"] = function ["upvalues"]: ["constants"]: ["name"] = @lua_run ["object"] = proto: 0xefabbfb2 ["type"] = proto