mirror of
https://github.com/jorisvink/kore
synced 2025-03-09 04:29:02 -04:00
work around curl 7.87 curl_easy_setopt() being broken.
This commit is contained in:
parent
f59ee8e29e
commit
7f27677904
@ -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;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user