diff options
author | Stefan Behnel <stefan_ml@behnel.de> | 2020-04-06 21:34:27 +0200 |
---|---|---|
committer | Stefan Behnel <stefan_ml@behnel.de> | 2020-04-06 21:34:27 +0200 |
commit | 50d46e750241fa717458fa43f5c010033d9a831d (patch) | |
tree | 93d3c8e896bb1773a6da44e9fa7f8727e8119627 | |
parent | f364d6dd54eb879171fdb98dd744cb571edd4d6a (diff) | |
download | cython-50d46e750241fa717458fa43f5c010033d9a831d.tar.gz |
Remove "unused function" C compiler warning about "__defaults__" getter of fused dispatch function.
Closes GH-3481.
-rw-r--r-- | Cython/Compiler/FusedNode.py | 2 | ||||
-rw-r--r-- | Cython/Compiler/Nodes.py | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/Cython/Compiler/FusedNode.py b/Cython/Compiler/FusedNode.py index 42f15eea3..b45928e54 100644 --- a/Cython/Compiler/FusedNode.py +++ b/Cython/Compiler/FusedNode.py @@ -640,7 +640,7 @@ class FusedCFuncDefNode(StatListNode): pyx_code.put_chunk( u""" - def __pyx_fused_cpdef(signatures, args, kwargs, defaults, *, _fused_sigindex={}): + def __pyx_fused_cpdef(signatures, args, kwargs, defaults, _fused_sigindex={}): # FIXME: use a typed signature - currently fails badly because # default arguments inherit the types we specify here! diff --git a/Cython/Compiler/Nodes.py b/Cython/Compiler/Nodes.py index 2597f73c8..8fae04f07 100644 --- a/Cython/Compiler/Nodes.py +++ b/Cython/Compiler/Nodes.py @@ -3190,7 +3190,7 @@ class DefNode(FuncDefNode): return self.entry.signature.exception_check def generate_function_definitions(self, env, code): - if self.defaults_getter: + if self.defaults_getter and not self.specialized_cpdefs: # defaults getter must never live in class scopes, it's always a module function self.defaults_getter.generate_function_definitions(env.global_scope(), code) |