From 57edf1057deee69d6659f1ccce7d9a1fdae63d3c Mon Sep 17 00:00:00 2001 From: Robert Bradshaw Date: Sat, 18 Aug 2007 17:40:39 -0700 Subject: PyObject -> Py_ssize_t now uses __index__ rather than __int__ (even in function signatures) --- Cython/Compiler/ModuleNode.py | 2 ++ 1 file changed, 2 insertions(+) (limited to 'Cython/Compiler/ModuleNode.py') diff --git a/Cython/Compiler/ModuleNode.py b/Cython/Compiler/ModuleNode.py index 4fd310fcc..390860cf8 100644 --- a/Cython/Compiler/ModuleNode.py +++ b/Cython/Compiler/ModuleNode.py @@ -173,6 +173,8 @@ class ModuleNode(Nodes.Node, Nodes.BlockNode): code.putln(" #define PY_SSIZE_T_MIN INT_MIN") code.putln(" #define PyInt_FromSsize_t(z) PyInt_FromLong(z)") code.putln(" #define PyInt_AsSsize_t(o) PyInt_AsLong(o)") + code.putln(" #define PyNumber_Index(o) PyNumber_Int(o)") + code.putln(" #define PyIndex_Check(o) PyNumber_Check(o)") code.putln("#endif") self.generate_extern_c_macro_definition(code) code.putln("%s double pow(double, double);" % Naming.extern_c_macro) -- cgit v1.2.1