commit 7f276779046f50df342b0ef8ef10be009c5ee1bb
parent f59ee8e29ef601f2071c08094587a000fde31ff0
Author: Joris Vink <joris@coders.se>
Date: Wed, 28 Dec 2022 16:04:18 +0100
work around curl 7.87 curl_easy_setopt() being broken.
Diffstat:
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/src/python.c b/src/python.c
@@ -6399,6 +6399,7 @@ static PyObject *
pycurl_handle_setopt_string(struct pycurl_data *data, int idx, PyObject *obj)
{
const char *str;
+ CURLoption option;
if (!PyUnicode_Check(obj)) {
PyErr_Format(PyExc_RuntimeError,
@@ -6410,8 +6411,8 @@ pycurl_handle_setopt_string(struct pycurl_data *data, int idx, PyObject *obj)
if ((str = PyUnicode_AsUTF8(obj)) == NULL)
return (NULL);
- curl_easy_setopt(data->curl.handle,
- CURLOPTTYPE_OBJECTPOINT + py_curlopt[idx].value, str);
+ option = CURLOPTTYPE_OBJECTPOINT + py_curlopt[idx].value;
+ curl_easy_setopt(data->curl.handle, option, str);
Py_RETURN_TRUE;
}