[Python-modules-commits] r27033 - in packages/pycurl/trunk/debian (3 files)

morph at users.alioth.debian.org morph at users.alioth.debian.org
Sat Jan 4 16:06:39 UTC 2014


    Date: Saturday, January 4, 2014 @ 16:06:38
  Author: morph
Revision: 27033

* debian/patches/20_remove_string_options.patch
  - removed, merged upstream

Modified:
  packages/pycurl/trunk/debian/changelog
  packages/pycurl/trunk/debian/patches/series
Deleted:
  packages/pycurl/trunk/debian/patches/20_remove_string_options.patch

Modified: packages/pycurl/trunk/debian/changelog
===================================================================
--- packages/pycurl/trunk/debian/changelog	2014-01-04 16:04:49 UTC (rev 27032)
+++ packages/pycurl/trunk/debian/changelog	2014-01-04 16:06:38 UTC (rev 27033)
@@ -3,8 +3,10 @@
   * New upstream release
   * debian/patches/10_setup.py.patch
     - refreshed, due to new upstream code
+  * debian/patches/20_remove_string_options.patch
+    - removed, merged upstream
 
- -- Sandro Tosi <morph at debian.org>  Sat, 04 Jan 2014 17:04:34 +0100
+ -- Sandro Tosi <morph at debian.org>  Sat, 04 Jan 2014 17:06:29 +0100
 
 pycurl (7.19.0-7) unstable; urgency=low
 

Deleted: packages/pycurl/trunk/debian/patches/20_remove_string_options.patch
===================================================================
--- packages/pycurl/trunk/debian/patches/20_remove_string_options.patch	2014-01-04 16:04:49 UTC (rev 27032)
+++ packages/pycurl/trunk/debian/patches/20_remove_string_options.patch	2014-01-04 16:06:38 UTC (rev 27033)
@@ -1,165 +0,0 @@
-Description: No longer keep copies of string options since this is managed by libcurl
-Origin: http://pycurl.cvs.sourceforge.net/viewvc/pycurl/pycurl/src/pycurl.c?r1=1.147&r2=1.148
-
---- pycurl-7.19.0.orig/src/pycurl.c	2008/09/09 17:40:34	1.147
-+++ pycurl-7.19.0/src/pycurl.c	2008/09/29 10:56:57	1.148
-@@ -1,4 +1,4 @@
--/* $Id: pycurl.c,v 1.147 2008/09/09 17:40:34 kjetilja Exp $ */
-+/* $Id: pycurl.c,v 1.148 2008/09/29 10:56:57 kjetilja Exp $ */
- 
- /* PycURL -- cURL Python module
-  *
-@@ -97,12 +97,6 @@
- /* Calculate the number of OBJECTPOINT options we need to store */
- #define OPTIONS_SIZE    ((int)CURLOPT_LASTENTRY % 10000)
- #define MOPTIONS_SIZE   ((int)CURLMOPT_LASTENTRY % 10000)
--static int OPT_INDEX(int o)
--{
--    assert(o >= CURLOPTTYPE_OBJECTPOINT);
--    assert(o < CURLOPTTYPE_OBJECTPOINT + OPTIONS_SIZE);
--    return o - CURLOPTTYPE_OBJECTPOINT;
--}
- 
- /* Type objects */
- static PyObject *ErrorObject = NULL;
-@@ -161,7 +155,6 @@
-     PyObject *writedata_fp;
-     PyObject *writeheader_fp;
-     /* misc */
--    void *options[OPTIONS_SIZE];    /* for OBJECTPOINT options */
-     char error[CURL_ERROR_SIZE+1];
- } CurlObject;
- 
-@@ -741,7 +734,6 @@
-     self->writeheader_fp = NULL;
- 
-     /* Zero string pointer memory buffer used by setopt */
--    memset(self->options, 0, sizeof(self->options));
-     memset(self->error, 0, sizeof(self->error));
- 
-     return self;
-@@ -804,7 +796,6 @@
-         free(s);
-         goto error;
-     }
--    self->options[ OPT_INDEX(CURLOPT_USERAGENT) ] = s; s = NULL;
- 
-     /* Success - return new object */
-     return self;
-@@ -872,7 +863,6 @@
- util_curl_close(CurlObject *self)
- {
-     CURL *handle;
--    int i;
- 
-     /* Zero handle and thread-state to disallow any operations to be run
-      * from now on */
-@@ -916,16 +906,6 @@
-     SFREE(self->postquote);
-     SFREE(self->prequote);
- #undef SFREE
--
--    /* Last, free the options.  This must be done after the curl handle
--     * is closed since libcurl assumes that some options are valid when
--     * invoking curl_easy_cleanup(). */
--    for (i = 0; i < OPTIONS_SIZE; i++) {
--        if (self->options[i] != NULL) {
--            free(self->options[i]);
--            self->options[i] = NULL;
--        }
--    }
- }
- 
- 
-@@ -1424,8 +1404,6 @@
- static PyObject*
- do_curl_reset(CurlObject *self)
- {
--    unsigned int i;
--
-     curl_easy_reset(self->handle);
- 
-     /* Decref callbacks and file handles */
-@@ -1443,15 +1421,6 @@
-     SFREE(self->postquote);
-     SFREE(self->prequote);
- #undef SFREE
--
--    /* Last, free the options */
--    for (i = 0; i < OPTIONS_SIZE; i++) {
--        if (self->options[i] != NULL) {
--            free(self->options[i]);
--            self->options[i] = NULL;
--        }
--    }
--
-     return Py_None;
- }
- 
-@@ -1461,7 +1430,6 @@
- util_curl_unsetopt(CurlObject *self, int option)
- {
-     int res;
--    int opt_index = -1;
- 
- #define SETOPT2(o,x) \
-     if ((res = curl_easy_setopt(self->handle, (o), (x))) != CURLE_OK) goto error
-@@ -1502,7 +1470,6 @@
-     case CURLOPT_SSL_CIPHER_LIST:
-     case CURLOPT_USERPWD:
-         SETOPT((char *) 0);
--        opt_index = OPT_INDEX(option);
-         break;
- 
-     /* info: we explicitly list unsupported options here */
-@@ -1512,11 +1479,6 @@
-         return NULL;
-     }
- 
--    if (opt_index >= 0 && self->options[opt_index] != NULL) {
--        free(self->options[opt_index]);
--        self->options[opt_index] = NULL;
--    }
--
-     Py_INCREF(Py_None);
-     return Py_None;
- 
-@@ -1587,8 +1549,6 @@
-     if (PyString_Check(obj)) {
-         char *str = NULL;
-         Py_ssize_t len = -1;
--        char *buf;
--        int opt_index;
- 
-         /* Check that the option specified a string as well as the input */
-         switch (option) {
-@@ -1651,28 +1611,12 @@
-         }
-         /* Allocate memory to hold the string */
-         assert(str != NULL);
--        if (len <= 0)
--            buf = strdup(str);
--        else {
--            buf = (char *) malloc(len);
--            if (buf) memcpy(buf, str, len);
--        }
--        if (buf == NULL)
--            return PyErr_NoMemory();
-         /* Call setopt */
--        res = curl_easy_setopt(self->handle, (CURLoption)option, buf);
-+        res = curl_easy_setopt(self->handle, (CURLoption)option, str);
-         /* Check for errors */
-         if (res != CURLE_OK) {
--            free(buf);
-             CURLERROR_RETVAL();
-         }
--        /* Save allocated option buffer */
--        opt_index = OPT_INDEX(option);
--        if (self->options[opt_index] != NULL) {
--            free(self->options[opt_index]);
--            self->options[opt_index] = NULL;
--        }
--        self->options[opt_index] = buf;
-         Py_INCREF(Py_None);
-         return Py_None;
-     }

Modified: packages/pycurl/trunk/debian/patches/series
===================================================================
--- packages/pycurl/trunk/debian/patches/series	2014-01-04 16:04:49 UTC (rev 27032)
+++ packages/pycurl/trunk/debian/patches/series	2014-01-04 16:06:38 UTC (rev 27033)
@@ -1,5 +1,4 @@
 10_setup.py.patch
-20_remove_string_options.patch
 30_fix_refcounts_calling_reset_twice.patch
 40_add_CURLOPT_SEEKFUNCTION_and_CURLOPT_SEEKDATA.patch
 50_dont_leak_user_agent.patch




More information about the Python-modules-commits mailing list