mirror of https://git.kore.io/kore.git
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)
|
pycurl_handle_setopt_string(struct pycurl_data *data, int idx, PyObject *obj)
|
||||||
{
|
{
|
||||||
const char *str;
|
const char *str;
|
||||||
|
CURLoption option;
|
||||||
|
|
||||||
if (!PyUnicode_Check(obj)) {
|
if (!PyUnicode_Check(obj)) {
|
||||||
PyErr_Format(PyExc_RuntimeError,
|
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)
|
if ((str = PyUnicode_AsUTF8(obj)) == NULL)
|
||||||
return (NULL);
|
return (NULL);
|
||||||
|
|
||||||
curl_easy_setopt(data->curl.handle,
|
option = CURLOPTTYPE_OBJECTPOINT + py_curlopt[idx].value;
|
||||||
CURLOPTTYPE_OBJECTPOINT + py_curlopt[idx].value, str);
|
curl_easy_setopt(data->curl.handle, option, str);
|
||||||
|
|
||||||
Py_RETURN_TRUE;
|
Py_RETURN_TRUE;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue