From 4dbdde330659485d2db41f47fb4a0e0bdf42a45b Mon Sep 17 00:00:00 2001 From: Stefan Behnel Date: Thu, 17 Jan 2008 23:54:04 +0100 Subject: [PATCH] write stararg utility functions only when they are used --- Cython/Compiler/Nodes.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/Cython/Compiler/Nodes.py b/Cython/Compiler/Nodes.py index c4d6d041..08cd0b90 100644 --- a/Cython/Compiler/Nodes.py +++ b/Cython/Compiler/Nodes.py @@ -962,9 +962,11 @@ class DefNode(FuncDefNode): self.declare_pyfunction(env) self.analyse_signature(env) self.return_type = self.entry.signature.return_type() - if self.star_arg or self.starstar_arg or self.num_kwonly_args > 0: + if self.star_arg: env.use_utility_code(get_stararg_utility_code) + if self.starstar_arg: env.use_utility_code(get_splitkeywords_utility_code) + if self.num_required_kw_args: env.use_utility_code(get_checkkeywords_utility_code) def analyse_signature(self, env): -- 2.26.2