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

restore derive(Debug) for ffi types where it was removed #4438

Merged
merged 1 commit into from
Aug 14, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions pyo3-ffi/src/cpython/object.rs
Original file line number Diff line number Diff line change
Expand Up @@ -205,6 +205,7 @@ pub type printfunc =
unsafe extern "C" fn(arg1: *mut PyObject, arg2: *mut ::libc::FILE, arg3: c_int) -> c_int;

#[repr(C)]
#[derive(Debug)]
pub struct PyTypeObject {
#[cfg(all(PyPy, not(Py_3_9)))]
pub ob_refcnt: Py_ssize_t,
Expand Down
6 changes: 6 additions & 0 deletions pyo3-ffi/src/datetime.rs
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ const _PyDateTime_TIME_DATASIZE: usize = 6;
const _PyDateTime_DATETIME_DATASIZE: usize = 10;

#[repr(C)]
#[derive(Debug)]
/// Structure representing a `datetime.timedelta`.
pub struct PyDateTime_Delta {
pub ob_base: PyObject,
Expand All @@ -45,6 +46,7 @@ pub struct PyDateTime_Delta {

#[cfg(not(any(PyPy, GraalPy)))]
#[repr(C)]
#[derive(Debug)]
/// Structure representing a `datetime.time` without a `tzinfo` member.
pub struct _PyDateTime_BaseTime {
pub ob_base: PyObject,
Expand All @@ -54,6 +56,7 @@ pub struct _PyDateTime_BaseTime {
}

#[repr(C)]
#[derive(Debug)]
/// Structure representing a `datetime.time`.
pub struct PyDateTime_Time {
pub ob_base: PyObject,
Expand All @@ -74,6 +77,7 @@ pub struct PyDateTime_Time {
}

#[repr(C)]
#[derive(Debug)]
/// Structure representing a `datetime.date`
pub struct PyDateTime_Date {
pub ob_base: PyObject,
Expand All @@ -87,6 +91,7 @@ pub struct PyDateTime_Date {

#[cfg(not(any(PyPy, GraalPy)))]
#[repr(C)]
#[derive(Debug)]
/// Structure representing a `datetime.datetime` without a `tzinfo` member.
pub struct _PyDateTime_BaseDateTime {
pub ob_base: PyObject,
Expand All @@ -96,6 +101,7 @@ pub struct _PyDateTime_BaseDateTime {
}

#[repr(C)]
#[derive(Debug)]
/// Structure representing a `datetime.datetime`.
pub struct PyDateTime_DateTime {
pub ob_base: PyObject,
Expand Down
Loading