cocos2d::ccCArray* stores raw void* slots with no retain or release.
Codegen binds it only for audited dispatcher handler queues where the element type and parent ownership are known.
Policy lives in tools/luau_codegen/model/cc_c_array.py.
Runtime lives in src/framework/view/ReadOnlyCCArrayView.hpp.
Proven fields expose a read-only sequence:
cocos2d::ccCArray*onCCKeyboardDispatcher.m_pHandlersToAddbecomes{ CCKeyboardHandler? }.
The same pattern applies to CCKeypadHandler, CCMouseHandler, and CCTouchHandler
on the matching dispatcher m_pHandlersToAdd and m_pHandlersToRemove fields in the allowlist.
CCTouchDispatcher only exposes m_pHandlersToRemove, not m_pHandlersToAdd.
| C++ API | Role |
|---|---|
pushReadOnlyCCArrayView<T> |
Field getter, borrows elements while dispatcher self is alive |
The view userdata indexes 1..num from ccCArray::arr, pushes borrowed usertypes, and errors on __newindex.
cocos2d::ccArray*internals (for exampleCCArray.data)- Unknown
ccCArray*fields without an allowlist entry - Writable setters until retain semantics are designed
tools/luau_codegen/model/cc_c_array.pytools/luau_codegen/convert/type_primitives.pytools/luau_codegen/convert/type_classification.pysrc/framework/view/ReadOnlyCCArrayView.hpp