Skip to content

Commit

Permalink
fix PyUnicodeDecodeError_Create
Browse files Browse the repository at this point in the history
  • Loading branch information
mejrs committed Nov 22, 2022
1 parent b485199 commit d02e44c
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions pyo3-ffi/src/pyerrors.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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,
)
}

Expand Down

0 comments on commit d02e44c

Please sign in to comment.