diff options
author | Robert Bradshaw <robertwb@gmail.com> | 2020-05-25 09:57:08 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-05-25 09:57:08 -0700 |
commit | eb33d89b4604a0e87b9e4c9322cc84f7bd34014d (patch) | |
tree | 2d8ffb9713a74cf98224c3060889b0ebf48c71e2 /Cython/Compiler/ModuleNode.py | |
parent | 9edeabfdc537c1290bc00a2c1c6eb474b1dc18b4 (diff) | |
download | cython-gh2056_special_binop.tar.gz |
Apply suggestions from code review
gh2056_special_binop
Use special __Pyx methods.
Co-authored-by: scoder <stefan_ml@behnel.de>
Diffstat (limited to 'Cython/Compiler/ModuleNode.py')
-rw-r--r-- | Cython/Compiler/ModuleNode.py | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/Cython/Compiler/ModuleNode.py b/Cython/Compiler/ModuleNode.py index 568088ef7..c7829f85e 100644 --- a/Cython/Compiler/ModuleNode.py +++ b/Cython/Compiler/ModuleNode.py @@ -2049,6 +2049,7 @@ class ModuleNode(Nodes.Node, Nodes.BlockNode): extra_arg_decl = ', PyObject* extra_arg' else: error(entry.pos, "Unexpected type lost signature: %s" % slot) + def has_slot_method(method_name): entry = scope.lookup(method_name) return bool(entry and entry.is_special and entry.func_cname) @@ -2062,6 +2063,7 @@ class ModuleNode(Nodes.Node, Nodes.BlockNode): ' ? %s->tp_as_number->%s(left, right %s)' ' : (Py_INCREF(Py_NotImplemented), Py_NotImplemented)') % ( super, super, slot.slot_name, super, slot.slot_name, extra_arg) + code.putln( TempitaUtilityCode.load_cached( "BinopSlot", "ExtensionTypes.c", |