ffi: fix Py_DecodeLocale() signature

Closes #1766.
This commit is contained in:
Gregory Szorc 2021-08-08 10:38:00 -07:00
parent e9cccd74bf
commit 495ac98eb3
2 changed files with 2 additions and 1 deletions

View File

@ -26,6 +26,7 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.
- Fix incorrect calculation of `dictoffset` on 32-bit Windows. [#1475](https://github.com/PyO3/pyo3/pull/1475)
- Fix regression in 0.13.2 leading to linking to incorrect Python library on Windows "gnu" targets. [#1759](https://github.com/PyO3/pyo3/pull/1759)
- Fix compiler warning: deny trailing semicolons in expression macro. [#1762](https://github.com/PyO3/pyo3/pull/1762)
- Fix incorrect FFI definition of `Py_DecodeLocale`. The 2nd argument is now `*mut Py_ssize_t` instead of `Py_ssize_t`. [#1766](https://github.com/PyO3/pyo3/pull/1766)
## [0.14.1] - 2021-07-04

View File

@ -4,7 +4,7 @@ use libc::wchar_t;
use std::os::raw::{c_char, c_int};
extern "C" {
pub fn Py_DecodeLocale(arg1: *const c_char, arg2: Py_ssize_t) -> *mut wchar_t;
pub fn Py_DecodeLocale(arg1: *const c_char, arg2: *mut Py_ssize_t) -> *mut wchar_t;
#[cfg_attr(PyPy, link_name = "PyPySys_GetObject")]
pub fn PySys_GetObject(arg1: *const c_char) -> *mut PyObject;
#[cfg_attr(PyPy, link_name = "PyPySys_SetObject")]