1
Fix python bindings for swig 2.0.5.
2
Somehow swig 2.0.5 produces a long integer instead of an integer in this
3
situation - I'm not entirely clear on specifics. But tolerate both as
4
inputs to svn_stream_read().
7
--- a/subversion/bindings/swig/core.i
8
+++ b/subversion/bindings/swig/core.i
12
%typemap(in) (char *buffer, apr_size_t *len) ($*2_type temp) {
13
- if (!PyInt_Check($input)) {
14
+ if (PyLong_Check($input)) {
15
+ temp = PyLong_AsLong($input);
17
+ else if (PyInt_Check($input)) {
18
+ temp = PyInt_AsLong($input);
21
PyErr_SetString(PyExc_TypeError,
22
"expecting an integer for the buffer size");
25
- temp = PyInt_AsLong($input);
27
PyErr_SetString(PyExc_ValueError,
28
"buffer size must be a positive integer");