diff options
author | Robert Bradshaw <robertwb@math.washington.edu> | 2007-08-18 17:40:39 -0700 |
---|---|---|
committer | Robert Bradshaw <robertwb@math.washington.edu> | 2007-08-18 17:40:39 -0700 |
commit | 57edf1057deee69d6659f1ccce7d9a1fdae63d3c (patch) | |
tree | 1b076bac9034c43b5535ab39e78e104604b9e23e /Cython/Compiler/ModuleNode.py | |
parent | a51cac493e3444d557daf76ea95a2407fa5afe20 (diff) | |
download | cython-57edf1057deee69d6659f1ccce7d9a1fdae63d3c.tar.gz |
PyObject -> Py_ssize_t now uses __index__ rather than __int__ (even in function signatures)
Diffstat (limited to 'Cython/Compiler/ModuleNode.py')
-rw-r--r-- | Cython/Compiler/ModuleNode.py | 2 |
1 files changed, 2 insertions, 0 deletions
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) |