You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@subversion.apache.org by sv...@apache.org on 2012/10/03 06:02:20 UTC
svn commit: r1393280 - in /subversion/branches/1.7.x: ./ STATUS
subversion/bindings/swig/core.i
Author: svn-role
Date: Wed Oct 3 04:02:20 2012
New Revision: 1393280
URL: http://svn.apache.org/viewvc?rev=1393280&view=rev
Log:
Merge r1351117 from trunk:
* r1351117
Fix svn_stream_read() in swig-py to work with SWIG-2.0.5
Justification:
Inconsistent behavior with different versions of SWIG.
Votes:
+1: breser, danielsh (via IRC)
Modified:
subversion/branches/1.7.x/ (props changed)
subversion/branches/1.7.x/STATUS
subversion/branches/1.7.x/subversion/bindings/swig/core.i
Propchange: subversion/branches/1.7.x/
------------------------------------------------------------------------------
Merged /subversion/trunk:r1351117
Modified: subversion/branches/1.7.x/STATUS
URL: http://svn.apache.org/viewvc/subversion/branches/1.7.x/STATUS?rev=1393280&r1=1393279&r2=1393280&view=diff
==============================================================================
--- subversion/branches/1.7.x/STATUS (original)
+++ subversion/branches/1.7.x/STATUS Wed Oct 3 04:02:20 2012
@@ -65,10 +65,3 @@ Veto-blocked changes:
Approved changes:
=================
-
- * r1351117
- Fix svn_stream_read() in swig-py to work with SWIG-2.0.5
- Justification:
- Inconsistent behavior with different versions of SWIG.
- Votes:
- +1: breser, danielsh (via IRC)
Modified: subversion/branches/1.7.x/subversion/bindings/swig/core.i
URL: http://svn.apache.org/viewvc/subversion/branches/1.7.x/subversion/bindings/swig/core.i?rev=1393280&r1=1393279&r2=1393280&view=diff
==============================================================================
--- subversion/branches/1.7.x/subversion/bindings/swig/core.i (original)
+++ subversion/branches/1.7.x/subversion/bindings/swig/core.i Wed Oct 3 04:02:20 2012
@@ -350,12 +350,17 @@
*/
#ifdef SWIGPYTHON
%typemap(in) (char *buffer, apr_size_t *len) ($*2_type temp) {
- if (!PyInt_Check($input)) {
+ if (PyLong_Check($input)) {
+ temp = PyLong_AsLong($input);
+ }
+ else if (PyInt_Check($input)) {
+ temp = PyInt_AsLong($input);
+ }
+ else {
PyErr_SetString(PyExc_TypeError,
"expecting an integer for the buffer size");
SWIG_fail;
}
- temp = PyInt_AsLong($input);
if (temp < 0) {
PyErr_SetString(PyExc_ValueError,
"buffer size must be a positive integer");