浏览代码

Add a typedef for Py_ssize_t, which is not available in python <2.5.

Based on a suggestion at:
http://mail.python.org/pipermail/python-dev/2006-March/062561.html

Change-Id: I170c17eab8eaf586da1db329c96c015edd59314b
Dave Borowitz 15 年之前
父节点
当前提交
f116295de4
共有 1 个文件被更改,包括 4 次插入0 次删除
  1. 4 0
      dulwich/_objects.c

+ 4 - 0
dulwich/_objects.c

@@ -21,6 +21,10 @@
 #include <stdlib.h>
 #include <sys/stat.h>
 
+#if (PY_VERSION_HEX < 0x02050000)
+typedef int Py_ssize_t;
+#endif
+
 #define bytehex(x) (((x)<0xa)?('0'+(x)):('a'-0xa+(x)))
 
 static PyObject *sha_to_pyhex(const unsigned char *sha)