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

@@ -3530,6 +3530,9 @@
35303530 if t == "float_array"
35313531 return "FloatArray"
35323532 end
3533+ if t == "poly_array"
3534+ return "PolyArray"
3535+ end
35333536 "IntArray"
35343537 end
35353538