@@ -79,8 +79,8 @@ class LoadAddressDescription(NamedTuple):
79
79
# Primitive ops for binary operations
80
80
binary_ops : dict [str , list [PrimitiveDescription ]] = {}
81
81
82
- # CallC op for unary ops
83
- unary_ops : dict [str , list [CFunctionDescription ]] = {}
82
+ # Primitive ops for unary ops
83
+ unary_ops : dict [str , list [PrimitiveDescription ]] = {}
84
84
85
85
builtin_names : dict [str , tuple [RType , str ]] = {}
86
86
@@ -327,8 +327,8 @@ def unary_op(
327
327
is_borrowed : bool = False ,
328
328
priority : int = 1 ,
329
329
is_pure : bool = False ,
330
- ) -> CFunctionDescription :
331
- """Define a c function call op for an unary operation.
330
+ ) -> PrimitiveDescription :
331
+ """Define a primitive op for an unary operation.
332
332
333
333
This will be automatically generated by matching against the AST.
334
334
@@ -338,19 +338,19 @@ def unary_op(
338
338
if extra_int_constants is None :
339
339
extra_int_constants = []
340
340
ops = unary_ops .setdefault (name , [])
341
- desc = CFunctionDescription (
341
+ desc = PrimitiveDescription (
342
342
name ,
343
343
[arg_type ],
344
344
return_type ,
345
- None ,
346
- truncated_type ,
347
- c_function_name ,
348
- error_kind ,
349
- steals ,
350
- is_borrowed ,
351
- ordering ,
352
- extra_int_constants ,
353
- priority ,
345
+ var_arg_type = None ,
346
+ truncated_type = truncated_type ,
347
+ c_function_name = c_function_name ,
348
+ error_kind = error_kind ,
349
+ steals = steals ,
350
+ is_borrowed = is_borrowed ,
351
+ ordering = ordering ,
352
+ extra_int_constants = extra_int_constants ,
353
+ priority = priority ,
354
354
is_pure = is_pure ,
355
355
)
356
356
ops .append (desc )
0 commit comments