kore

Kore is a web application platform for writing scalable, concurrent web based processes in C or Python.
Commits | Files | Refs | README | LICENSE | git clone https://git.kore.io/kore.git

commit 46af5aa11bbf858275c53243a8ee2065f9c6d323
parent 7f276779046f50df342b0ef8ef10be009c5ee1bb
Author: Joris Vink <joris@coders.se>
Date:   Wed, 28 Dec 2022 16:05:14 +0100

more workarounds for curl 7.87

Diffstat:
src/python.c | 10++++++----
1 file changed, 6 insertions(+), 4 deletions(-)

diff --git a/src/python.c b/src/python.c @@ -6421,6 +6421,7 @@ static PyObject * pycurl_handle_setopt_long(struct pycurl_data *data, int idx, PyObject *obj) { long val; + CURLoption option; if (!PyLong_CheckExact(obj)) { PyErr_Format(PyExc_RuntimeError, @@ -6434,8 +6435,8 @@ pycurl_handle_setopt_long(struct pycurl_data *data, int idx, PyObject *obj) if (val == -1 && PyErr_Occurred()) return (NULL); - curl_easy_setopt(data->curl.handle, - CURLOPTTYPE_LONG + py_curlopt[idx].value, val); + option = CURLOPTTYPE_LONG + py_curlopt[idx].value; + curl_easy_setopt(data->curl.handle, option, val); Py_RETURN_TRUE; } @@ -6447,6 +6448,7 @@ pycurl_handle_setopt_slist(struct pycurl_data *data, int idx, PyObject *obj) PyObject *item; const char *sval; struct curl_slist *slist; + CURLoption option; Py_ssize_t list_len, i; if (!PyList_CheckExact(obj)) { @@ -6477,8 +6479,8 @@ pycurl_handle_setopt_slist(struct pycurl_data *data, int idx, PyObject *obj) psl->slist = slist; LIST_INSERT_HEAD(&data->slists, psl, list); - curl_easy_setopt(data->curl.handle, - CURLOPTTYPE_OBJECTPOINT + py_curlopt[idx].value, slist); + option = CURLOPTTYPE_OBJECTPOINT + py_curlopt[idx].value; + curl_easy_setopt(data->curl.handle, option, slist); Py_RETURN_TRUE; }