Commit 5c9ac0ce
5c9ac0cedf10Merged
Yusuke Endoh <[email protected]> · 6 months ago · 1 file · ~1 modified
Description
fix(codegen): map poly_array to PolyArray in array_c_prefix
array_c_prefix defaulted to "IntArray" for any type it didn't
explicitly know, including poly_array. Callers that pass a poly_array
through this helper were silently emitting sp_IntArray_* against an
sp_PolyArray * value. The pattern shows up in every Array method
that uses the prefix to assemble a runtime call.
Follow-up to the introduction of poly_array: the helper was missed when the new type was added. Map poly_array to "PolyArray" so that callers that already check for an array receiver via the type list can use array_c_prefix directly without a per-call ternary.
Co-Authored-By: Claude Opus 4.7 (1M context) [email protected]
Details
- Commit
- 5c9ac0cedf10
- Parent
- ce1d8a13c09d
spinel_codegen.rbmodifiedView file
if t == "float_array" return "FloatArray" end if t == "poly_array" return "PolyArray" end "IntArray" end