Skip to content

Commit

Permalink
ffi: fix names of _Base datetime structs
Browse files Browse the repository at this point in the history
  • Loading branch information
davidhewitt committed Jun 2, 2022
1 parent 1d50ffd commit 21b0ed2
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
- Fixed incorrectly disabled FFI definition `PyThreadState_DeleteCurrent`. [#2357](https://github.com/PyO3/pyo3/pull/2357)
- Correct FFI definition `PyEval_EvalCodeEx` to take `*const *mut PyObject` array arguments instead of `*mut *mut PyObject` (this was changed in CPython 3.6). [#2368](https://github.com/PyO3/pyo3/pull/2368)
- Fix "raw-ident" structs (e.g. `#[pyclass] struct r#RawName`) incorrectly having `r#` at the start of the class name created in Python. [#2395](https://github.com/PyO3/pyo3/pull/2395)
- Fix FFI definitions `_PyDateTime_BaseTime` lacking leading underscores in their names. [#2421](https://github.com/PyO3/pyo3/pull/2421)

## [0.16.5] - 2022-05-15

Expand Down
8 changes: 4 additions & 4 deletions pyo3-ffi/src/datetime.rs
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ pub struct PyDateTime_Delta {
#[repr(C)]
#[derive(Debug, Copy, Clone)]
/// Structure representing a `datetime.time` without a `tzinfo` member.
pub struct PyDateTime_BaseTime {
pub struct _PyDateTime_BaseTime {
pub ob_base: PyObject,
#[cfg(not(PyPy))]
pub hashcode: Py_hash_t,
Expand All @@ -60,7 +60,7 @@ pub struct PyDateTime_BaseTime {
/// # Safety
///
/// Care should be taken when reading the `tzinfo` field of this type. If the time does not have a
/// tzinfo then the Python interpreter is free to allocate it as a [PyDateTime_BaseTime].
/// tzinfo then the Python interpreter is free to allocate it as a [_PyDateTime_BaseTime].
pub struct PyDateTime_Time {
pub ob_base: PyObject,
#[cfg(not(PyPy))]
Expand All @@ -87,7 +87,7 @@ pub struct PyDateTime_Date {
#[repr(C)]
#[derive(Debug, Copy, Clone)]
/// Structure representing a `datetime.datetime` without a `tzinfo` member.
pub struct PyDateTime_BaseDateTime {
pub struct _PyDateTime_BaseDateTime {
pub ob_base: PyObject,
#[cfg(not(PyPy))]
pub hashcode: Py_hash_t,
Expand All @@ -105,7 +105,7 @@ pub struct PyDateTime_BaseDateTime {
/// # Safety
///
/// Care should be taken when reading the `tzinfo` field of this type. If the datetime does not have a
/// tzinfo then the Python interpreter is free to allocate it as a [PyDateTime_BaseDateTime].
/// tzinfo then the Python interpreter is free to allocate it as a [_PyDateTime_BaseDateTime].
pub struct PyDateTime_DateTime {
pub ob_base: PyObject,
#[cfg(not(PyPy))]
Expand Down

0 comments on commit 21b0ed2

Please sign in to comment.