Skip to content

Commit

Permalink
Merge pull request #1791 from indygreg/fix-pystatus
Browse files Browse the repository at this point in the history
ffi: fix PyStatus._type
  • Loading branch information
davidhewitt authored Aug 14, 2021
2 parents 254ea53 + 150f4ad commit 739a885
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 0 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.
### Fixed

- Restrict FFI definitions `PyGILState_Check` and `Py_tracefunc` to the unlimited API. [#1787](https://github.com/PyO3/pyo3/pull/1787)
- Add missing `_type` field to `PyStatus` struct definition. [#1791](https://github.com/PyO3/pyo3/pull/1791)

## [0.14.2] - 2021-08-09

Expand Down
2 changes: 2 additions & 0 deletions src/ffi/cpython/initconfig.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ use crate::ffi::Py_ssize_t;
use libc::wchar_t;
use std::os::raw::{c_char, c_int, c_ulong};

#[repr(C)]
#[derive(Copy, Clone, Debug, PartialEq, Eq)]
pub enum _PyStatus_TYPE {
_PyStatus_TYPE_OK = 0,
Expand All @@ -14,6 +15,7 @@ pub enum _PyStatus_TYPE {
#[repr(C)]
#[derive(Copy, Clone)]
pub struct PyStatus {
pub _type: _PyStatus_TYPE,
pub func: *const c_char,
pub err_msg: *const c_char,
pub exitcode: c_int,
Expand Down

0 comments on commit 739a885

Please sign in to comment.