From: Stefan Behnel Date: Thu, 17 Jan 2008 22:54:04 +0000 (+0100) Subject: write stararg utility functions only when they are used X-Git-Tag: 0.9.6.14~29^2~62^2 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=4dbdde330659485d2db41f47fb4a0e0bdf42a45b;p=cython.git write stararg utility functions only when they are used --- 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):