fix PyUnicodeDecodeError_Create

This commit is contained in:
mejrs 2022-11-22 14:16:39 +01:00 committed by David Hewitt
parent af2ad45c73
commit faa578a7c5
1 changed files with 3 additions and 4 deletions

View File

@ -85,18 +85,17 @@ pub unsafe fn PyUnicodeDecodeError_Create(
length: Py_ssize_t,
start: Py_ssize_t,
end: Py_ssize_t,
_reason: *const c_char,
reason: *const c_char,
) -> *mut PyObject {
crate::PyObject_CallFunction(
PyExc_UnicodeDecodeError,
std::ffi::CStr::from_bytes_with_nul(b"sy#nns\0")
.unwrap()
.as_ptr(),
b"sy#nns\0".as_ptr().cast::<c_char>(),
encoding,
object,
length,
start,
end,
reason,
)
}