Commit 7a35565c

7a35565ca0c1Merged

Yusuke Endoh <[email protected]> · 6 months ago · 1 file · ~1 modified

Description

fix(codegen): map *_ptr_array to PtrArray in array_c_prefix

array_c_prefix defaulted to "IntArray" for obj_<C>_ptr_array and the other *_ptr_array types. Callers that pass a ptr_array through the helper were silently emitting sp_IntArray_* against an sp_PtrArray * value. Same shape as the earlier poly_array fix: follow-up to the introduction of ptr_array, the helper was missed when the new type was added.

Map *_ptr_array → "PtrArray" so 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
7a35565ca0c1
Parent
2c82182b70bb

spinel_codegen.rbmodifiedView file

@@ -3536,6 +3536,9 @@
35363536 if t == "poly_array"
35373537 return "PolyArray"
35383538 end
3539+ if is_ptr_array_type(t) == 1
3540+ return "PtrArray"
3541+ end
35393542 "IntArray"
35403543 end
35413544