Commit ac8d90e 1 parent d55b261 commit ac8d90e Copy full SHA for ac8d90e
File tree 1 file changed +18
-1
lines changed
1 file changed +18
-1
lines changed Original file line number Diff line number Diff line change @@ -152,10 +152,22 @@ pub unsafe extern "C" fn orjson_init_exec(mptr: *mut PyObject) -> c_int {
152
152
0
153
153
}
154
154
155
+ #[ cfg( Py_3_13 ) ]
156
+ #[ allow( non_upper_case_globals) ]
157
+ const Py_mod_gil : c_int = 4 ;
158
+ #[ cfg( Py_3_13 ) ]
159
+ #[ allow( non_upper_case_globals, dead_code, fuzzy_provenance_casts) ]
160
+ const Py_MOD_GIL_USED : * mut c_void = 0 as * mut c_void ;
161
+ #[ cfg( Py_3_13 ) ]
162
+ #[ allow( non_upper_case_globals, dead_code, fuzzy_provenance_casts) ]
163
+ const Py_MOD_GIL_NOT_USED : * mut c_void = 1 as * mut c_void ;
164
+
155
165
#[ cfg( not( Py_3_12 ) ) ]
156
166
const PYMODULEDEF_LEN : usize = 2 ;
157
- #[ cfg( Py_3_12 ) ]
167
+ #[ cfg( all ( Py_3_12 , not ( Py_3_13 ) ) ) ]
158
168
const PYMODULEDEF_LEN : usize = 3 ;
169
+ #[ cfg( Py_3_13 ) ]
170
+ const PYMODULEDEF_LEN : usize = 4 ;
159
171
160
172
#[ allow( non_snake_case) ]
161
173
#[ no_mangle]
@@ -172,6 +184,11 @@ pub unsafe extern "C" fn PyInit_orjson() -> *mut PyModuleDef {
172
184
slot : Py_mod_multiple_interpreters ,
173
185
value : Py_MOD_MULTIPLE_INTERPRETERS_NOT_SUPPORTED ,
174
186
} ,
187
+ #[ cfg( Py_3_13 ) ]
188
+ PyModuleDef_Slot {
189
+ slot : Py_mod_gil ,
190
+ value : Py_MOD_GIL_USED ,
191
+ } ,
175
192
PyModuleDef_Slot {
176
193
slot : 0 ,
177
194
value : null_mut ( ) ,
You can’t perform that action at this time.
0 commit comments