@@ -9,13 +9,12 @@ use crate::PyCapsule_Import;
9
9
#[ cfg( GraalPy ) ]
10
10
use crate :: { PyLong_AsLong , PyLong_Check , PyObject_GetAttrString , Py_DecRef } ;
11
11
use crate :: { PyObject , PyObject_TypeCheck , PyTypeObject , Py_TYPE } ;
12
- #[ cfg( not( GraalPy ) ) ]
13
12
use std:: os:: raw:: c_char;
14
13
use std:: os:: raw:: c_int;
15
14
use std:: ptr;
16
15
use std:: sync:: Once ;
17
16
use std:: { cell:: UnsafeCell , ffi:: CStr } ;
18
- #[ cfg( not( any ( PyPy , GraalPy ) ) ) ]
17
+ #[ cfg( not( PyPy ) ) ]
19
18
use { crate :: Py_hash_t , std:: os:: raw:: c_uchar} ;
20
19
// Type struct wrappers
21
20
const _PyDateTime_DATE_DATASIZE: usize = 4 ;
@@ -27,13 +26,10 @@ const _PyDateTime_DATETIME_DATASIZE: usize = 10;
27
26
/// Structure representing a `datetime.timedelta`.
28
27
pub struct PyDateTime_Delta {
29
28
pub ob_base : PyObject ,
30
- #[ cfg( not( any ( PyPy , GraalPy ) ) ) ]
29
+ #[ cfg( not( PyPy ) ) ]
31
30
pub hashcode : Py_hash_t ,
32
- #[ cfg( not( GraalPy ) ) ]
33
31
pub days : c_int ,
34
- #[ cfg( not( GraalPy ) ) ]
35
32
pub seconds : c_int ,
36
- #[ cfg( not( GraalPy ) ) ]
37
33
pub microseconds : c_int ,
38
34
}
39
35
@@ -56,19 +52,17 @@ pub struct _PyDateTime_BaseTime {
56
52
/// Structure representing a `datetime.time`.
57
53
pub struct PyDateTime_Time {
58
54
pub ob_base : PyObject ,
59
- #[ cfg( not( any ( PyPy , GraalPy ) ) ) ]
55
+ #[ cfg( not( PyPy ) ) ]
60
56
pub hashcode : Py_hash_t ,
61
- #[ cfg( not( GraalPy ) ) ]
62
57
pub hastzinfo : c_char ,
63
- #[ cfg( not( any ( PyPy , GraalPy ) ) ) ]
58
+ #[ cfg( not( PyPy ) ) ]
64
59
pub data : [ c_uchar ; _PyDateTime_TIME_DATASIZE] ,
65
- #[ cfg( not( any ( PyPy , GraalPy ) ) ) ]
60
+ #[ cfg( not( PyPy ) ) ]
66
61
pub fold : c_uchar ,
67
62
/// # Safety
68
63
///
69
64
/// Care should be taken when reading this field. If the time does not have a
70
65
/// tzinfo then CPython may allocate as a `_PyDateTime_BaseTime` without this field.
71
- #[ cfg( not( GraalPy ) ) ]
72
66
pub tzinfo : * mut PyObject ,
73
67
}
74
68
@@ -77,11 +71,11 @@ pub struct PyDateTime_Time {
77
71
/// Structure representing a `datetime.date`
78
72
pub struct PyDateTime_Date {
79
73
pub ob_base : PyObject ,
80
- #[ cfg( not( any ( PyPy , GraalPy ) ) ) ]
74
+ #[ cfg( not( PyPy ) ) ]
81
75
pub hashcode : Py_hash_t ,
82
- #[ cfg( not( any ( PyPy , GraalPy ) ) ) ]
76
+ #[ cfg( not( PyPy ) ) ]
83
77
pub hastzinfo : c_char ,
84
- #[ cfg( not( any ( PyPy , GraalPy ) ) ) ]
78
+ #[ cfg( not( PyPy ) ) ]
85
79
pub data : [ c_uchar ; _PyDateTime_DATE_DATASIZE] ,
86
80
}
87
81
@@ -101,19 +95,17 @@ pub struct _PyDateTime_BaseDateTime {
101
95
/// Structure representing a `datetime.datetime`.
102
96
pub struct PyDateTime_DateTime {
103
97
pub ob_base : PyObject ,
104
- #[ cfg( not( any ( PyPy , GraalPy ) ) ) ]
98
+ #[ cfg( not( PyPy ) ) ]
105
99
pub hashcode : Py_hash_t ,
106
- #[ cfg( not( GraalPy ) ) ]
107
100
pub hastzinfo : c_char ,
108
- #[ cfg( not( any ( PyPy , GraalPy ) ) ) ]
101
+ #[ cfg( not( PyPy ) ) ]
109
102
pub data : [ c_uchar ; _PyDateTime_DATETIME_DATASIZE] ,
110
- #[ cfg( not( any ( PyPy , GraalPy ) ) ) ]
103
+ #[ cfg( not( PyPy ) ) ]
111
104
pub fold : c_uchar ,
112
105
/// # Safety
113
106
///
114
107
/// Care should be taken when reading this field. If the time does not have a
115
108
/// tzinfo then CPython may allocate as a `_PyDateTime_BaseDateTime` without this field.
116
- #[ cfg( not( GraalPy ) ) ]
117
109
pub tzinfo : * mut PyObject ,
118
110
}
119
111
0 commit comments