summaryrefslogtreecommitdiff
path: root/Cython/Compiler/ModuleNode.py
diff options
context:
space:
mode:
authorRobert Bradshaw <robertwb@math.washington.edu>2007-08-18 17:40:39 -0700
committerRobert Bradshaw <robertwb@math.washington.edu>2007-08-18 17:40:39 -0700
commit57edf1057deee69d6659f1ccce7d9a1fdae63d3c (patch)
tree1b076bac9034c43b5535ab39e78e104604b9e23e /Cython/Compiler/ModuleNode.py
parenta51cac493e3444d557daf76ea95a2407fa5afe20 (diff)
downloadcython-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.py2
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)