~ubuntu-branches/ubuntu/utopic/pycurl/utopic

« back to all changes in this revision

Viewing changes to debian/patches/0003-upstream-issue-210.patch

  • Committer: Package Import Robot
  • Author(s): Barry Warsaw
  • Date: 2014-10-14 17:46:13 UTC
  • mfrom: (39.1.3 utopic-proposed)
  • Revision ID: package-import@ubuntu.com-20141014174613-0ma7225wgbnja3sf
Tags: 7.19.5-3ubuntu1
* Merge with Debian; remaining changes:
  - Remove build dependency on python-bottle (universe).
  - Drop libssh2-1-dev from Build-Depends, as it is not in main, and is
    not needed since in Ubuntu, curl-config --static-libs doesn't return
    -lssh2.

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
From 9456098cc34953157aceccb4b235cf8201a900fe Mon Sep 17 00:00:00 2001
 
2
From: Barry Warsaw <barry@python.org>
 
3
Date: Tue, 14 Oct 2014 16:25:57 -0400
 
4
Subject: upstream issue 210
 
5
Bug: https://github.com/pycurl/pycurl/issues/210
 
6
 
 
7
---
 
8
 src/easy.c | 4 ++++
 
9
 1 file changed, 4 insertions(+)
 
10
 
 
11
diff --git a/src/easy.c b/src/easy.c
 
12
index 6f1ba1d..fe52b18 100644
 
13
--- a/src/easy.c
 
14
+++ b/src/easy.c
 
15
@@ -926,7 +926,11 @@ debug_callback(CURL *curlobj, curl_infotype type,
 
16
     }
 
17
 
 
18
     /* run callback */
 
19
+#if PY_MAJOR_VERSION >= 3
 
20
+    arglist = Py_BuildValue("(iy#)", (int)type, buffer, (int)total_size);
 
21
+#else
 
22
     arglist = Py_BuildValue("(is#)", (int)type, buffer, (int)total_size);
 
23
+#endif
 
24
     if (arglist == NULL)
 
25
         goto verbose_error;
 
26
     result = PyEval_CallObject(self->debug_cb, arglist);