@@ -79,8 +79,8 @@ class LoadAddressDescription(NamedTuple):
7979# Primitive ops for binary operations
8080binary_ops : dict [str , list [PrimitiveDescription ]] = {}
8181
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 ]] = {}
8484
8585builtin_names : dict [str , tuple [RType , str ]] = {}
8686
@@ -327,8 +327,8 @@ def unary_op(
327327 is_borrowed : bool = False ,
328328 priority : int = 1 ,
329329 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.
332332
333333 This will be automatically generated by matching against the AST.
334334
@@ -338,19 +338,19 @@ def unary_op(
338338 if extra_int_constants is None :
339339 extra_int_constants = []
340340 ops = unary_ops .setdefault (name , [])
341- desc = CFunctionDescription (
341+ desc = PrimitiveDescription (
342342 name ,
343343 [arg_type ],
344344 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 ,
354354 is_pure = is_pure ,
355355 )
356356 ops .append (desc )
0 commit comments