Skip to main content

Module boost

Module boost 

Source
Expand description

UnityPyBoost’s reader (UnityPyBoost/TypeTreeHelper.cpp:67-1056), for objects with byte_size > 0. The rules, each pinned by a test (plan section 3.10, R1-R16): bounds checks pos + n > end, a length’s before the bytes it counts; align4 from the object’s start with no bounds check; strings always aligned; TypelessData aligned only by its flag; the switch on the node’s own kind first, and only a kind it does not handle (Unknown, PPtr, Array, ReferencedObjectData, ManagedReferencesRegistry) is an array when its first child is Array (R9); primitive and pair elements read as one run and align once, a pair run checking its arity before the first element, so even when empty; other elements read and align one by one; the ManagedReferencesRegistry scope; ReferencedObject data resolved through the file’s ref types in UnityPyBoost’s order (R14: no file, ref_types absent or not a list, no type read yet, a missing class/ns/asm, all ref_type; then an empty class or a matched ref type with no tree skips data; no match is ref_type; a class that is not a Str skips data when its Python object’s size field is 0, else is ref_type, plan R14); PyDict_SetItem for repeated names; float32 widened (a signalling NaN quieted under super::FloatMode::UnityPy).

Owner: package B.

Functions§

read
Reads one value from exactly data (the object’s bytes). TypelessData and vector<UInt8> values are zero-copy slices of data. Its work is the open’s, counted on ctx.meter whatever the outcome (the module docs of super, “Work”).
read_object_fields
Read ordered class fields for a binding that must construct completed classes before surfacing a later reader error. Limits and allocation refusals remain immediate; the returned progress retains ordinary reader failures.
read_resolved
Read with a lazy reference resolver, retaining ordinary object-field progress.