You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
fix: implement parameter counting in zrtl_symbol_sig macro
The zrtl_symbol_sig! macro was hardcoded to set param_count=0 for
functions with signature `($($param)*) -> opaque`. This prevented
proper type checking of extern function parameters.
**Changes:**
- Add __count_params! macro to count parameters in signature
- Add __build_param_array! macro to build TypeTag array from params
- Add __fill_param_array! helper to populate parameter types
- Support f32, f64, i32, i64, u32, u64, bool parameter types
- Update zrtl_symbol_sig! to use counted parameters
**Result:**
Plugin signatures now correctly report parameter counts:
- Before: $Tensor$arange_f32 param_count=0
- After: $Tensor$arange_f32 param_count=3
This enables the type checker to create properly typed extern
function declarations with correct parameter lists.
**Example:**
```rust
("$Tensor$arange_f32", tensor_arange_f32, (f32, f32, f32) -> opaque)
```
Now generates a signature with param_count=3 and params=[F32, F32, F32].
0 commit comments