PyExc_RuntimeError,
"Cannot enter into task %R while another " \
"task %R is being executed.",
- task, item, NULL);
+ task, item);
Py_DECREF(item);
return -1;
}
self->task_log_destroy_pending = 0;
PyErr_Format(PyExc_TypeError,
"a coroutine was expected, got %R",
- coro, NULL);
+ coro);
return -1;
}
static int
set_min_max_proto_version(PySSLContext *self, PyObject *arg, int what)
{
- long v;
+ int v;
int result;
- if (!PyArg_Parse(arg, "l", &v))
+ if (!PyArg_Parse(arg, "i", &v))
return -1;
- if (v > INT_MAX) {
- PyErr_SetString(PyExc_OverflowError, "Option is too long");
- return -1;
- }
switch(self->protocol) {
case PY_SSL_VERSION_TLS_CLIENT: /* fall through */
break;
default:
PyErr_Format(PyExc_ValueError,
- "Unsupported TLS/SSL version 0x%x", v);
+ "Unsupported TLS/SSL version 0x%x", (unsigned)v);
return -1;
}
}
if (result == 0) {
PyErr_Format(PyExc_ValueError,
- "Unsupported protocol version 0x%x", v);
+ "Unsupported protocol version 0x%x", (unsigned)v);
return -1;
}
return 0;
}
if (!PyTuple_CheckExact(data_tuple)) {
- PyErr_Format(PyExc_TypeError, "Invalid data result type: %r",
+ PyErr_Format(PyExc_TypeError, "Invalid data result type: %R",
data_tuple);
goto error;
}