File tree Expand file tree Collapse file tree 1 file changed +3
-2
lines changed Expand file tree Collapse file tree 1 file changed +3
-2
lines changed Original file line number Diff line number Diff line change @@ -144,10 +144,11 @@ def apply_function_specialization(
144144 """Invoke the Specializer callback for a function if one has been registered"""
145145 if (
146146 isinstance (callee , NameExpr )
147- and isinstance (callee .node , Var )
147+ # and isinstance(callee.node, Var)
148148 # NOTE: why is this not a weakref rprimitive?
149149 # TODO: fix to weakref rprimitive so _apply_specialization can use the custom_op
150- and str (callee .node .type ).startswith ("weakref.ReferenceType" )
150+ and is_weakref_rprimitive (builder .node_type (callee .node ))
151+ # and str(callee.node.type).startswith("weakref.ReferenceType")
151152 and len (expr .args ) == 0
152153 ):
153154 return builder .call_c (weakref_deref_op , [builder .accept (expr .callee )], expr .line )
You can’t perform that action at this time.
0 commit comments