git.samba.org
/
jelmer
/
dulwich-libgit2.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(from parent 1:
eacdaab
)
Add a typedef for Py_ssize_t, which is not available in python <2.5.
author
Dave Borowitz
<dborowitz@google.com>
Tue, 6 Apr 2010 23:29:49 +0000
(16:29 -0700)
committer
Dave Borowitz
<dborowitz@google.com>
Fri, 30 Apr 2010 16:42:54 +0000
(09:42 -0700)
Based on a suggestion at:
http://mail.python.org/pipermail/python-dev/2006-March/062561.html
Change-Id: I170c17eab8eaf586da1db329c96c015edd59314b
dulwich/_objects.c
patch
|
blob
|
history
diff --git
a/dulwich/_objects.c
b/dulwich/_objects.c
index d9699ec6cb4a72e52873929f679048e32d176819..986098bdb0b26d29193b7952b010e08048071135 100644
(file)
--- a/
dulwich/_objects.c
+++ b/
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)