From: Stefan Behnel Date: Tue, 26 Aug 2008 15:31:32 +0000 (+0200) Subject: more cleanup X-Git-Tag: 0.9.9.2.beta~63^2~28 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=805cf0737f2dde5f34de30d26c47804563c40e4c;p=cython.git more cleanup --- diff --git a/Cython/Compiler/Nodes.py b/Cython/Compiler/Nodes.py index 47da9188..9ae0353c 100644 --- a/Cython/Compiler/Nodes.py +++ b/Cython/Compiler/Nodes.py @@ -4344,10 +4344,10 @@ static int __Pyx_ArgTypeTest(PyObject *obj, PyTypeObject *type, int none_allowed raise_argtuple_invalid_utility_code = [ """ -static void __Pyx_RaiseArgtupleInvalid(const char* func_name, int exact, +static INLINE void __Pyx_RaiseArgtupleInvalid(const char* func_name, int exact, Py_ssize_t num_min, Py_ssize_t num_max, Py_ssize_t num_found); /*proto*/ """,""" -static void __Pyx_RaiseArgtupleInvalid( +static INLINE void __Pyx_RaiseArgtupleInvalid( const char* func_name, int exact, Py_ssize_t num_min, @@ -4355,14 +4355,7 @@ static void __Pyx_RaiseArgtupleInvalid( Py_ssize_t num_found) { Py_ssize_t num_expected; - char *message, *number, *more_or_less; - - message = - #if PY_VERSION_HEX < 0x02050000 - "%s() takes %s %d positional argument%s (%d given)"; - #else - "%s() takes %s %zd positional argument%s (%zd given)"; - #endif + char *number, *more_or_less; if (num_found < num_min) { num_expected = num_min; @@ -4375,8 +4368,13 @@ static void __Pyx_RaiseArgtupleInvalid( more_or_less = "exactly"; } number = (num_expected == 1) ? "" : "s"; - PyErr_Format(PyExc_TypeError, message, func_name, more_or_less, - num_expected, number, num_found); + PyErr_Format(PyExc_TypeError, + #if PY_VERSION_HEX < 0x02050000 + "%s() takes %s %d positional argument%s (%d given)", + #else + "%s() takes %s %zd positional argument%s (%zd given)", + #endif + func_name, more_or_less, num_expected, number, num_found); } """]