From 1cbf6ba08239d028f2fede3fdc04fac38d913d59 Mon Sep 17 00:00:00 2001 From: Robert Bradshaw Date: Mon, 26 Aug 2013 23:51:25 -0700 Subject: [PATCH] Python 2.4 fix. --- Cython/Compiler/ModuleNode.py | 1 + Cython/Utility/ModuleSetupCode.c | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/Cython/Compiler/ModuleNode.py b/Cython/Compiler/ModuleNode.py index a19124f..2d0d756 100644 --- a/Cython/Compiler/ModuleNode.py +++ b/Cython/Compiler/ModuleNode.py @@ -592,6 +592,7 @@ class ModuleNode(Nodes.Node, Nodes.BlockNode): # These utility functions are assumed to exist and used elsewhere. PyrexTypes.c_long_type.create_to_py_utility_code(env) PyrexTypes.c_long_type.create_from_py_utility_code(env) + PyrexTypes.c_int_type.create_from_py_utility_code(env) code.put(Nodes.branch_prediction_macros) code.putln('') diff --git a/Cython/Utility/ModuleSetupCode.c b/Cython/Utility/ModuleSetupCode.c index 8065ab9..f959680 100644 --- a/Cython/Utility/ModuleSetupCode.c +++ b/Cython/Utility/ModuleSetupCode.c @@ -47,7 +47,7 @@ #define PY_FORMAT_SIZE_T "" #define CYTHON_FORMAT_SSIZE_T "" #define PyInt_FromSsize_t(z) PyInt_FromLong(z) - #define PyInt_AsSsize_t(o) __Pyx_PyInt_AsInt(o) + #define PyInt_AsSsize_t(o) __Pyx_PyInt_As_int(o) #define PyNumber_Index(o) ((PyNumber_Check(o) && !PyFloat_Check(o)) ? PyNumber_Int(o) : \ (PyErr_Format(PyExc_TypeError, \ "expected index value, got %.200s", Py_TYPE(o)->tp_name), \ -- 2.7.4