Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ffi: add FFI definition PyDateTime_CAPSULE_NAME #4634

Merged
merged 1 commit into from
Oct 19, 2024

Conversation

davidhewitt
Copy link
Member

While reviewing #4623 I realised that PyDateTime_CAPSULE_NAME was a temporary allocation rather than a constant. It also wasn't exposed even though it is in the C header. So a tiny cleanup.

Comment on lines +622 to +625
#[inline]
pub unsafe fn PyDateTime_TimeZone_UTC() -> *mut PyObject {
(*PyDateTimeAPI()).TimeZone_UTC
}
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Moved this down to match the order in the C header.

@davidhewitt
Copy link
Member Author

I'm going to merge this immediately so that #4623 can rebase cc @ngoldbaum 🙈

@davidhewitt davidhewitt enabled auto-merge October 19, 2024 21:05
pyo3-ffi/src/datetime.rs Outdated Show resolved Hide resolved
@davidhewitt davidhewitt force-pushed the datetime-capsule-name branch from b056850 to 4af0940 Compare October 19, 2024 21:11
@davidhewitt davidhewitt added this pull request to the merge queue Oct 19, 2024
Merged via the queue into PyO3:main with commit 3029aa5 Oct 19, 2024
42 of 43 checks passed
@davidhewitt davidhewitt deleted the datetime-capsule-name branch October 19, 2024 22:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants