Issue #26764: Fixed SystemError in bytes.__rmod__.

This commit is contained in:
Serhiy Storchaka 2016-04-15 14:11:10 +03:00
parent cda80940ed
commit c9a59e6e4f
2 changed files with 15 additions and 32 deletions

View file

@ -3282,15 +3282,13 @@ bytes_methods[] = {
};
static PyObject *
bytes_mod(PyObject *self, PyObject *args)
bytes_mod(PyObject *self, PyObject *arg)
{
if (self == NULL || !PyBytes_Check(self)) {
PyErr_BadInternalCall();
return NULL;
if (!PyBytes_Check(self)) {
Py_RETURN_NOTIMPLEMENTED;
}
return _PyBytes_FormatEx(PyBytes_AS_STRING(self), PyBytes_GET_SIZE(self),
args, 0);
arg, 0);
}
static PyNumberMethods bytes_as_number = {