From fa46b7ad96a0796dd3decef572fe897cc5420d01 Mon Sep 17 00:00:00 2001 From: Zanie Adkins Date: Tue, 16 May 2023 00:37:34 -0500 Subject: [PATCH] Regenerate Python bindings (#6) * Remove unused import * Update `all` versions in `generate_bindings.py` * Update `whitelist` to `allowlist` for `bindgen` * Add "v" prefix to python versions * Generating bindings for latest Python minor versions * Regenerate bindings for latest patch of each Python version * Fix linux builds * Remove unused import --- generate_bindings.py | 44 +- src/coredump.rs | 12 +- src/python_bindings/mod.rs | 6 + src/python_bindings/v2_7_18.rs | 777 ++++++++++ src/python_bindings/v3_10_9.rs | 2068 ++++++++++++++++++++++++ src/python_bindings/v3_11_0.rs | 2674 +++++++++++++++++++++++++------- src/python_bindings/v3_6_15.rs | 1020 ++++++++++++ src/python_bindings/v3_7_15.rs | 1185 ++++++++++++++ src/python_bindings/v3_8_15.rs | 1203 ++++++++++++++ src/python_bindings/v3_9_15.rs | 1503 ++++++++++++++++++ src/python_data_access.rs | 16 +- src/python_interpreters.rs | 38 +- src/python_process_info.rs | 21 +- src/python_spy.rs | 17 +- src/python_threading.rs | 12 +- src/stack_trace.rs | 2 +- 16 files changed, 9947 insertions(+), 651 deletions(-) create mode 100644 src/python_bindings/v2_7_18.rs create mode 100644 src/python_bindings/v3_10_9.rs create mode 100644 src/python_bindings/v3_6_15.rs create mode 100644 src/python_bindings/v3_7_15.rs create mode 100644 src/python_bindings/v3_8_15.rs create mode 100644 src/python_bindings/v3_9_15.rs diff --git a/generate_bindings.py b/generate_bindings.py index 48617318..48032c9e 100644 --- a/generate_bindings.py +++ b/generate_bindings.py @@ -110,33 +110,35 @@ def extract_bindings(cpython_path, version, configure=False): cat Include/Python.h > bindgen_input.h cat Include/frameobject.h >> bindgen_input.h echo '#define Py_BUILD_CORE 1\n' >> bindgen_input.h + # cat Include/internal/pystate.h >> bindgen_input.h cat Include/internal/pycore_pystate.h >> bindgen_input.h cat Include/internal/pycore_interp.h >> bindgen_input.h cat Include/internal/pycore_frame.h >> bindgen_input.h + cat Objects/dict-common.h >> bindgen_input.h bindgen bindgen_input.h -o bindgen_output.rs \ --with-derive-default \ --no-layout-tests --no-doc-comments \ - --whitelist-type PyInterpreterState \ - --whitelist-type PyFrameObject \ - --whitelist-type PyThreadState \ - --whitelist-type PyCodeObject \ - --whitelist-type PyVarObject \ - --whitelist-type PyBytesObject \ - --whitelist-type PyASCIIObject \ - --whitelist-type PyUnicodeObject \ - --whitelist-type PyCompactUnicodeObject \ - --whitelist-type PyTupleObject \ - --whitelist-type PyListObject \ - --whitelist-type PyLongObject \ - --whitelist-type PyFloatObject \ - --whitelist-type PyDictObject \ - --whitelist-type PyDictKeysObject \ - --whitelist-type PyDictKeyEntry \ - --whitelist-type PyDictUnicodeEntry \ - --whitelist-type PyObject \ - --whitelist-type PyTypeObject \ - --whitelist-type PyHeapTypeObject \ + --allowlist-type PyInterpreterState \ + --allowlist-type PyFrameObject \ + --allowlist-type PyThreadState \ + --allowlist-type PyCodeObject \ + --allowlist-type PyVarObject \ + --allowlist-type PyBytesObject \ + --allowlist-type PyASCIIObject \ + --allowlist-type PyUnicodeObject \ + --allowlist-type PyCompactUnicodeObject \ + --allowlist-type PyTupleObject \ + --allowlist-type PyListObject \ + --allowlist-type PyLongObject \ + --allowlist-type PyFloatObject \ + --allowlist-type PyDictObject \ + --allowlist-type PyDictKeysObject \ + --allowlist-type PyDictKeyEntry \ + --allowlist-type PyDictUnicodeEntry \ + --allowlist-type PyObject \ + --allowlist-type PyTypeObject \ + --allowlist-type PyHeapTypeObject \ -- -I . -I ./Include -I ./Include/internal """) if ret: @@ -190,7 +192,7 @@ def extract_bindings(cpython_path, version, configure=False): sys.exit(1) if args.all: - versions = ['v3.8.0b4', 'v3.7.0', 'v3.6.6', 'v3.5.5', 'v3.4.8', 'v3.3.7', 'v3.2.6', 'v2.7.15'] + versions = ["v2.7.18", "v3.5.10", "v3.6.15", "v3.7.15", "v3.8.15", "v3.9.15", "v3.10.9", "v3.11.0"] else: versions = args.versions if not versions: diff --git a/src/coredump.rs b/src/coredump.rs index 273ad5b6..52291eca 100644 --- a/src/coredump.rs +++ b/src/coredump.rs @@ -18,7 +18,7 @@ use crate::binary_parser::{parse_binary, BinaryInfo}; use crate::config::Config; use crate::dump::print_trace; use crate::python_bindings::{ - v2_7_15, v3_10_0, v3_11_0, v3_3_7, v3_5_5, v3_6_6, v3_7_0, v3_8_0, v3_9_5, + v2_7_15, v3_10_9, v3_11_0, v3_3_7, v3_5_5, v3_6_15, v3_7_15, v3_8_15, v3_9_15, }; use crate::python_data_access::format_variable; use crate::python_interpreters::InterpreterState; @@ -288,21 +288,21 @@ impl PythonCoreDump { } => self._get_stack::(config), Version { major: 3, minor: 6, .. - } => self._get_stack::(config), + } => self._get_stack::(config), Version { major: 3, minor: 7, .. - } => self._get_stack::(config), + } => self._get_stack::(config), Version { major: 3, minor: 8, .. - } => self._get_stack::(config), + } => self._get_stack::(config), Version { major: 3, minor: 9, .. - } => self._get_stack::(config), + } => self._get_stack::(config), Version { major: 3, minor: 10, .. - } => self._get_stack::(config), + } => self._get_stack::(config), Version { major: 3, minor: 11, diff --git a/src/python_bindings/mod.rs b/src/python_bindings/mod.rs index 74a6ce89..99bdebe3 100644 --- a/src/python_bindings/mod.rs +++ b/src/python_bindings/mod.rs @@ -1,11 +1,17 @@ pub mod v2_7_15; +pub mod v2_7_18; pub mod v3_10_0; +pub mod v3_10_9; pub mod v3_11_0; pub mod v3_3_7; pub mod v3_5_5; +pub mod v3_6_15; pub mod v3_6_6; pub mod v3_7_0; +pub mod v3_7_15; pub mod v3_8_0; +pub mod v3_8_15; +pub mod v3_9_15; pub mod v3_9_5; // currently the PyRuntime struct used from Python 3.7 on really can't be diff --git a/src/python_bindings/v2_7_18.rs b/src/python_bindings/v2_7_18.rs new file mode 100644 index 00000000..9a9dfe5b --- /dev/null +++ b/src/python_bindings/v2_7_18.rs @@ -0,0 +1,777 @@ +// Generated bindings for python v2.7.18 +#![allow(dead_code)] +#![allow(non_upper_case_globals)] +#![allow(non_camel_case_types)] +#![allow(non_snake_case)] +#![allow(clippy::useless_transmute)] +#![allow(clippy::default_trait_access)] +#![allow(clippy::cast_lossless)] +#![allow(clippy::trivially_copy_pass_by_ref)] + +/* automatically generated by rust-bindgen 0.65.1 */ + +pub type __int64_t = ::std::os::raw::c_longlong; +pub type __darwin_off_t = __int64_t; +pub type fpos_t = __darwin_off_t; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct __sbuf { + pub _base: *mut ::std::os::raw::c_uchar, + pub _size: ::std::os::raw::c_int, +} +impl Default for __sbuf { + fn default() -> Self { + let mut s = ::std::mem::MaybeUninit::::uninit(); + unsafe { + ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1); + s.assume_init() + } + } +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct __sFILEX { + _unused: [u8; 0], +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct __sFILE { + pub _p: *mut ::std::os::raw::c_uchar, + pub _r: ::std::os::raw::c_int, + pub _w: ::std::os::raw::c_int, + pub _flags: ::std::os::raw::c_short, + pub _file: ::std::os::raw::c_short, + pub _bf: __sbuf, + pub _lbfsize: ::std::os::raw::c_int, + pub _cookie: *mut ::std::os::raw::c_void, + pub _close: ::std::option::Option< + unsafe extern "C" fn(arg1: *mut ::std::os::raw::c_void) -> ::std::os::raw::c_int, + >, + pub _read: ::std::option::Option< + unsafe extern "C" fn( + arg1: *mut ::std::os::raw::c_void, + arg2: *mut ::std::os::raw::c_char, + arg3: ::std::os::raw::c_int, + ) -> ::std::os::raw::c_int, + >, + pub _seek: ::std::option::Option< + unsafe extern "C" fn( + arg1: *mut ::std::os::raw::c_void, + arg2: fpos_t, + arg3: ::std::os::raw::c_int, + ) -> fpos_t, + >, + pub _write: ::std::option::Option< + unsafe extern "C" fn( + arg1: *mut ::std::os::raw::c_void, + arg2: *const ::std::os::raw::c_char, + arg3: ::std::os::raw::c_int, + ) -> ::std::os::raw::c_int, + >, + pub _ub: __sbuf, + pub _extra: *mut __sFILEX, + pub _ur: ::std::os::raw::c_int, + pub _ubuf: [::std::os::raw::c_uchar; 3usize], + pub _nbuf: [::std::os::raw::c_uchar; 1usize], + pub _lb: __sbuf, + pub _blksize: ::std::os::raw::c_int, + pub _offset: fpos_t, +} +impl Default for __sFILE { + fn default() -> Self { + let mut s = ::std::mem::MaybeUninit::::uninit(); + unsafe { + ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1); + s.assume_init() + } + } +} +pub type FILE = __sFILE; +pub type Py_ssize_t = isize; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct _object { + pub ob_refcnt: Py_ssize_t, + pub ob_type: *mut _typeobject, +} +impl Default for _object { + fn default() -> Self { + let mut s = ::std::mem::MaybeUninit::::uninit(); + unsafe { + ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1); + s.assume_init() + } + } +} +pub type PyObject = _object; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct PyVarObject { + pub ob_refcnt: Py_ssize_t, + pub ob_type: *mut _typeobject, + pub ob_size: Py_ssize_t, +} +impl Default for PyVarObject { + fn default() -> Self { + let mut s = ::std::mem::MaybeUninit::::uninit(); + unsafe { + ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1); + s.assume_init() + } + } +} +pub type unaryfunc = + ::std::option::Option *mut PyObject>; +pub type binaryfunc = ::std::option::Option< + unsafe extern "C" fn(arg1: *mut PyObject, arg2: *mut PyObject) -> *mut PyObject, +>; +pub type ternaryfunc = ::std::option::Option< + unsafe extern "C" fn( + arg1: *mut PyObject, + arg2: *mut PyObject, + arg3: *mut PyObject, + ) -> *mut PyObject, +>; +pub type inquiry = + ::std::option::Option ::std::os::raw::c_int>; +pub type lenfunc = ::std::option::Option Py_ssize_t>; +pub type coercion = ::std::option::Option< + unsafe extern "C" fn( + arg1: *mut *mut PyObject, + arg2: *mut *mut PyObject, + ) -> ::std::os::raw::c_int, +>; +pub type ssizeargfunc = ::std::option::Option< + unsafe extern "C" fn(arg1: *mut PyObject, arg2: Py_ssize_t) -> *mut PyObject, +>; +pub type ssizessizeargfunc = ::std::option::Option< + unsafe extern "C" fn(arg1: *mut PyObject, arg2: Py_ssize_t, arg3: Py_ssize_t) -> *mut PyObject, +>; +pub type ssizeobjargproc = ::std::option::Option< + unsafe extern "C" fn( + arg1: *mut PyObject, + arg2: Py_ssize_t, + arg3: *mut PyObject, + ) -> ::std::os::raw::c_int, +>; +pub type ssizessizeobjargproc = ::std::option::Option< + unsafe extern "C" fn( + arg1: *mut PyObject, + arg2: Py_ssize_t, + arg3: Py_ssize_t, + arg4: *mut PyObject, + ) -> ::std::os::raw::c_int, +>; +pub type objobjargproc = ::std::option::Option< + unsafe extern "C" fn( + arg1: *mut PyObject, + arg2: *mut PyObject, + arg3: *mut PyObject, + ) -> ::std::os::raw::c_int, +>; +pub type readbufferproc = ::std::option::Option< + unsafe extern "C" fn( + arg1: *mut PyObject, + arg2: Py_ssize_t, + arg3: *mut *mut ::std::os::raw::c_void, + ) -> Py_ssize_t, +>; +pub type writebufferproc = ::std::option::Option< + unsafe extern "C" fn( + arg1: *mut PyObject, + arg2: Py_ssize_t, + arg3: *mut *mut ::std::os::raw::c_void, + ) -> Py_ssize_t, +>; +pub type segcountproc = ::std::option::Option< + unsafe extern "C" fn(arg1: *mut PyObject, arg2: *mut Py_ssize_t) -> Py_ssize_t, +>; +pub type charbufferproc = ::std::option::Option< + unsafe extern "C" fn( + arg1: *mut PyObject, + arg2: Py_ssize_t, + arg3: *mut *mut ::std::os::raw::c_char, + ) -> Py_ssize_t, +>; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct bufferinfo { + pub buf: *mut ::std::os::raw::c_void, + pub obj: *mut PyObject, + pub len: Py_ssize_t, + pub itemsize: Py_ssize_t, + pub readonly: ::std::os::raw::c_int, + pub ndim: ::std::os::raw::c_int, + pub format: *mut ::std::os::raw::c_char, + pub shape: *mut Py_ssize_t, + pub strides: *mut Py_ssize_t, + pub suboffsets: *mut Py_ssize_t, + pub smalltable: [Py_ssize_t; 2usize], + pub internal: *mut ::std::os::raw::c_void, +} +impl Default for bufferinfo { + fn default() -> Self { + let mut s = ::std::mem::MaybeUninit::::uninit(); + unsafe { + ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1); + s.assume_init() + } + } +} +pub type Py_buffer = bufferinfo; +pub type getbufferproc = ::std::option::Option< + unsafe extern "C" fn( + arg1: *mut PyObject, + arg2: *mut Py_buffer, + arg3: ::std::os::raw::c_int, + ) -> ::std::os::raw::c_int, +>; +pub type releasebufferproc = + ::std::option::Option; +pub type objobjproc = ::std::option::Option< + unsafe extern "C" fn(arg1: *mut PyObject, arg2: *mut PyObject) -> ::std::os::raw::c_int, +>; +pub type visitproc = ::std::option::Option< + unsafe extern "C" fn( + arg1: *mut PyObject, + arg2: *mut ::std::os::raw::c_void, + ) -> ::std::os::raw::c_int, +>; +pub type traverseproc = ::std::option::Option< + unsafe extern "C" fn( + arg1: *mut PyObject, + arg2: visitproc, + arg3: *mut ::std::os::raw::c_void, + ) -> ::std::os::raw::c_int, +>; +#[repr(C)] +#[derive(Debug, Default, Copy, Clone)] +pub struct PyNumberMethods { + pub nb_add: binaryfunc, + pub nb_subtract: binaryfunc, + pub nb_multiply: binaryfunc, + pub nb_divide: binaryfunc, + pub nb_remainder: binaryfunc, + pub nb_divmod: binaryfunc, + pub nb_power: ternaryfunc, + pub nb_negative: unaryfunc, + pub nb_positive: unaryfunc, + pub nb_absolute: unaryfunc, + pub nb_nonzero: inquiry, + pub nb_invert: unaryfunc, + pub nb_lshift: binaryfunc, + pub nb_rshift: binaryfunc, + pub nb_and: binaryfunc, + pub nb_xor: binaryfunc, + pub nb_or: binaryfunc, + pub nb_coerce: coercion, + pub nb_int: unaryfunc, + pub nb_long: unaryfunc, + pub nb_float: unaryfunc, + pub nb_oct: unaryfunc, + pub nb_hex: unaryfunc, + pub nb_inplace_add: binaryfunc, + pub nb_inplace_subtract: binaryfunc, + pub nb_inplace_multiply: binaryfunc, + pub nb_inplace_divide: binaryfunc, + pub nb_inplace_remainder: binaryfunc, + pub nb_inplace_power: ternaryfunc, + pub nb_inplace_lshift: binaryfunc, + pub nb_inplace_rshift: binaryfunc, + pub nb_inplace_and: binaryfunc, + pub nb_inplace_xor: binaryfunc, + pub nb_inplace_or: binaryfunc, + pub nb_floor_divide: binaryfunc, + pub nb_true_divide: binaryfunc, + pub nb_inplace_floor_divide: binaryfunc, + pub nb_inplace_true_divide: binaryfunc, + pub nb_index: unaryfunc, +} +#[repr(C)] +#[derive(Debug, Default, Copy, Clone)] +pub struct PySequenceMethods { + pub sq_length: lenfunc, + pub sq_concat: binaryfunc, + pub sq_repeat: ssizeargfunc, + pub sq_item: ssizeargfunc, + pub sq_slice: ssizessizeargfunc, + pub sq_ass_item: ssizeobjargproc, + pub sq_ass_slice: ssizessizeobjargproc, + pub sq_contains: objobjproc, + pub sq_inplace_concat: binaryfunc, + pub sq_inplace_repeat: ssizeargfunc, +} +#[repr(C)] +#[derive(Debug, Default, Copy, Clone)] +pub struct PyMappingMethods { + pub mp_length: lenfunc, + pub mp_subscript: binaryfunc, + pub mp_ass_subscript: objobjargproc, +} +#[repr(C)] +#[derive(Debug, Default, Copy, Clone)] +pub struct PyBufferProcs { + pub bf_getreadbuffer: readbufferproc, + pub bf_getwritebuffer: writebufferproc, + pub bf_getsegcount: segcountproc, + pub bf_getcharbuffer: charbufferproc, + pub bf_getbuffer: getbufferproc, + pub bf_releasebuffer: releasebufferproc, +} +pub type freefunc = ::std::option::Option; +pub type destructor = ::std::option::Option; +pub type printfunc = ::std::option::Option< + unsafe extern "C" fn( + arg1: *mut PyObject, + arg2: *mut FILE, + arg3: ::std::os::raw::c_int, + ) -> ::std::os::raw::c_int, +>; +pub type getattrfunc = ::std::option::Option< + unsafe extern "C" fn(arg1: *mut PyObject, arg2: *mut ::std::os::raw::c_char) -> *mut PyObject, +>; +pub type getattrofunc = ::std::option::Option< + unsafe extern "C" fn(arg1: *mut PyObject, arg2: *mut PyObject) -> *mut PyObject, +>; +pub type setattrfunc = ::std::option::Option< + unsafe extern "C" fn( + arg1: *mut PyObject, + arg2: *mut ::std::os::raw::c_char, + arg3: *mut PyObject, + ) -> ::std::os::raw::c_int, +>; +pub type setattrofunc = ::std::option::Option< + unsafe extern "C" fn( + arg1: *mut PyObject, + arg2: *mut PyObject, + arg3: *mut PyObject, + ) -> ::std::os::raw::c_int, +>; +pub type cmpfunc = ::std::option::Option< + unsafe extern "C" fn(arg1: *mut PyObject, arg2: *mut PyObject) -> ::std::os::raw::c_int, +>; +pub type reprfunc = + ::std::option::Option *mut PyObject>; +pub type hashfunc = + ::std::option::Option ::std::os::raw::c_long>; +pub type richcmpfunc = ::std::option::Option< + unsafe extern "C" fn( + arg1: *mut PyObject, + arg2: *mut PyObject, + arg3: ::std::os::raw::c_int, + ) -> *mut PyObject, +>; +pub type getiterfunc = + ::std::option::Option *mut PyObject>; +pub type iternextfunc = + ::std::option::Option *mut PyObject>; +pub type descrgetfunc = ::std::option::Option< + unsafe extern "C" fn( + arg1: *mut PyObject, + arg2: *mut PyObject, + arg3: *mut PyObject, + ) -> *mut PyObject, +>; +pub type descrsetfunc = ::std::option::Option< + unsafe extern "C" fn( + arg1: *mut PyObject, + arg2: *mut PyObject, + arg3: *mut PyObject, + ) -> ::std::os::raw::c_int, +>; +pub type initproc = ::std::option::Option< + unsafe extern "C" fn( + arg1: *mut PyObject, + arg2: *mut PyObject, + arg3: *mut PyObject, + ) -> ::std::os::raw::c_int, +>; +pub type newfunc = ::std::option::Option< + unsafe extern "C" fn( + arg1: *mut _typeobject, + arg2: *mut PyObject, + arg3: *mut PyObject, + ) -> *mut PyObject, +>; +pub type allocfunc = ::std::option::Option< + unsafe extern "C" fn(arg1: *mut _typeobject, arg2: Py_ssize_t) -> *mut PyObject, +>; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct _typeobject { + pub ob_refcnt: Py_ssize_t, + pub ob_type: *mut _typeobject, + pub ob_size: Py_ssize_t, + pub tp_name: *const ::std::os::raw::c_char, + pub tp_basicsize: Py_ssize_t, + pub tp_itemsize: Py_ssize_t, + pub tp_dealloc: destructor, + pub tp_print: printfunc, + pub tp_getattr: getattrfunc, + pub tp_setattr: setattrfunc, + pub tp_compare: cmpfunc, + pub tp_repr: reprfunc, + pub tp_as_number: *mut PyNumberMethods, + pub tp_as_sequence: *mut PySequenceMethods, + pub tp_as_mapping: *mut PyMappingMethods, + pub tp_hash: hashfunc, + pub tp_call: ternaryfunc, + pub tp_str: reprfunc, + pub tp_getattro: getattrofunc, + pub tp_setattro: setattrofunc, + pub tp_as_buffer: *mut PyBufferProcs, + pub tp_flags: ::std::os::raw::c_long, + pub tp_doc: *const ::std::os::raw::c_char, + pub tp_traverse: traverseproc, + pub tp_clear: inquiry, + pub tp_richcompare: richcmpfunc, + pub tp_weaklistoffset: Py_ssize_t, + pub tp_iter: getiterfunc, + pub tp_iternext: iternextfunc, + pub tp_methods: *mut PyMethodDef, + pub tp_members: *mut PyMemberDef, + pub tp_getset: *mut PyGetSetDef, + pub tp_base: *mut _typeobject, + pub tp_dict: *mut PyObject, + pub tp_descr_get: descrgetfunc, + pub tp_descr_set: descrsetfunc, + pub tp_dictoffset: Py_ssize_t, + pub tp_init: initproc, + pub tp_alloc: allocfunc, + pub tp_new: newfunc, + pub tp_free: freefunc, + pub tp_is_gc: inquiry, + pub tp_bases: *mut PyObject, + pub tp_mro: *mut PyObject, + pub tp_cache: *mut PyObject, + pub tp_subclasses: *mut PyObject, + pub tp_weaklist: *mut PyObject, + pub tp_del: destructor, + pub tp_version_tag: ::std::os::raw::c_uint, +} +impl Default for _typeobject { + fn default() -> Self { + let mut s = ::std::mem::MaybeUninit::::uninit(); + unsafe { + ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1); + s.assume_init() + } + } +} +pub type PyTypeObject = _typeobject; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct _heaptypeobject { + pub ht_type: PyTypeObject, + pub as_number: PyNumberMethods, + pub as_mapping: PyMappingMethods, + pub as_sequence: PySequenceMethods, + pub as_buffer: PyBufferProcs, + pub ht_name: *mut PyObject, + pub ht_slots: *mut PyObject, +} +impl Default for _heaptypeobject { + fn default() -> Self { + let mut s = ::std::mem::MaybeUninit::::uninit(); + unsafe { + ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1); + s.assume_init() + } + } +} +pub type PyHeapTypeObject = _heaptypeobject; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct _longobject { + _unused: [u8; 0], +} +pub type PyLongObject = _longobject; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct PyFloatObject { + pub ob_refcnt: Py_ssize_t, + pub ob_type: *mut _typeobject, + pub ob_fval: f64, +} +impl Default for PyFloatObject { + fn default() -> Self { + let mut s = ::std::mem::MaybeUninit::::uninit(); + unsafe { + ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1); + s.assume_init() + } + } +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct PyTupleObject { + pub ob_refcnt: Py_ssize_t, + pub ob_type: *mut _typeobject, + pub ob_size: Py_ssize_t, + pub ob_item: [*mut PyObject; 1usize], +} +impl Default for PyTupleObject { + fn default() -> Self { + let mut s = ::std::mem::MaybeUninit::::uninit(); + unsafe { + ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1); + s.assume_init() + } + } +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct PyListObject { + pub ob_refcnt: Py_ssize_t, + pub ob_type: *mut _typeobject, + pub ob_size: Py_ssize_t, + pub ob_item: *mut *mut PyObject, + pub allocated: Py_ssize_t, +} +impl Default for PyListObject { + fn default() -> Self { + let mut s = ::std::mem::MaybeUninit::::uninit(); + unsafe { + ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1); + s.assume_init() + } + } +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct PyDictEntry { + pub me_hash: Py_ssize_t, + pub me_key: *mut PyObject, + pub me_value: *mut PyObject, +} +impl Default for PyDictEntry { + fn default() -> Self { + let mut s = ::std::mem::MaybeUninit::::uninit(); + unsafe { + ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1); + s.assume_init() + } + } +} +pub type PyDictObject = _dictobject; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct _dictobject { + pub ob_refcnt: Py_ssize_t, + pub ob_type: *mut _typeobject, + pub ma_fill: Py_ssize_t, + pub ma_used: Py_ssize_t, + pub ma_mask: Py_ssize_t, + pub ma_table: *mut PyDictEntry, + pub ma_lookup: ::std::option::Option< + unsafe extern "C" fn( + mp: *mut PyDictObject, + key: *mut PyObject, + hash: ::std::os::raw::c_long, + ) -> *mut PyDictEntry, + >, + pub ma_smalltable: [PyDictEntry; 8usize], +} +impl Default for _dictobject { + fn default() -> Self { + let mut s = ::std::mem::MaybeUninit::::uninit(); + unsafe { + ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1); + s.assume_init() + } + } +} +pub type PyCFunction = ::std::option::Option< + unsafe extern "C" fn(arg1: *mut PyObject, arg2: *mut PyObject) -> *mut PyObject, +>; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct PyMethodDef { + pub ml_name: *const ::std::os::raw::c_char, + pub ml_meth: PyCFunction, + pub ml_flags: ::std::os::raw::c_int, + pub ml_doc: *const ::std::os::raw::c_char, +} +impl Default for PyMethodDef { + fn default() -> Self { + let mut s = ::std::mem::MaybeUninit::::uninit(); + unsafe { + ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1); + s.assume_init() + } + } +} +pub type getter = ::std::option::Option< + unsafe extern "C" fn(arg1: *mut PyObject, arg2: *mut ::std::os::raw::c_void) -> *mut PyObject, +>; +pub type setter = ::std::option::Option< + unsafe extern "C" fn( + arg1: *mut PyObject, + arg2: *mut PyObject, + arg3: *mut ::std::os::raw::c_void, + ) -> ::std::os::raw::c_int, +>; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct PyGetSetDef { + pub name: *mut ::std::os::raw::c_char, + pub get: getter, + pub set: setter, + pub doc: *mut ::std::os::raw::c_char, + pub closure: *mut ::std::os::raw::c_void, +} +impl Default for PyGetSetDef { + fn default() -> Self { + let mut s = ::std::mem::MaybeUninit::::uninit(); + unsafe { + ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1); + s.assume_init() + } + } +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct _is { + pub next: *mut _is, + pub tstate_head: *mut _ts, + pub modules: *mut PyObject, + pub sysdict: *mut PyObject, + pub builtins: *mut PyObject, + pub modules_reloading: *mut PyObject, + pub codec_search_path: *mut PyObject, + pub codec_search_cache: *mut PyObject, + pub codec_error_registry: *mut PyObject, + pub dlopenflags: ::std::os::raw::c_int, +} +impl Default for _is { + fn default() -> Self { + let mut s = ::std::mem::MaybeUninit::::uninit(); + unsafe { + ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1); + s.assume_init() + } + } +} +pub type PyInterpreterState = _is; +pub type Py_tracefunc = ::std::option::Option< + unsafe extern "C" fn( + arg1: *mut PyObject, + arg2: *mut _frame, + arg3: ::std::os::raw::c_int, + arg4: *mut PyObject, + ) -> ::std::os::raw::c_int, +>; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct _ts { + pub next: *mut _ts, + pub interp: *mut PyInterpreterState, + pub frame: *mut _frame, + pub recursion_depth: ::std::os::raw::c_int, + pub tracing: ::std::os::raw::c_int, + pub use_tracing: ::std::os::raw::c_int, + pub c_profilefunc: Py_tracefunc, + pub c_tracefunc: Py_tracefunc, + pub c_profileobj: *mut PyObject, + pub c_traceobj: *mut PyObject, + pub curexc_type: *mut PyObject, + pub curexc_value: *mut PyObject, + pub curexc_traceback: *mut PyObject, + pub exc_type: *mut PyObject, + pub exc_value: *mut PyObject, + pub exc_traceback: *mut PyObject, + pub dict: *mut PyObject, + pub tick_counter: ::std::os::raw::c_int, + pub gilstate_counter: ::std::os::raw::c_int, + pub async_exc: *mut PyObject, + pub thread_id: ::std::os::raw::c_long, + pub trash_delete_nesting: ::std::os::raw::c_int, + pub trash_delete_later: *mut PyObject, +} +impl Default for _ts { + fn default() -> Self { + let mut s = ::std::mem::MaybeUninit::::uninit(); + unsafe { + ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1); + s.assume_init() + } + } +} +pub type PyThreadState = _ts; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct PyCodeObject { + pub ob_refcnt: Py_ssize_t, + pub ob_type: *mut _typeobject, + pub co_argcount: ::std::os::raw::c_int, + pub co_nlocals: ::std::os::raw::c_int, + pub co_stacksize: ::std::os::raw::c_int, + pub co_flags: ::std::os::raw::c_int, + pub co_code: *mut PyObject, + pub co_consts: *mut PyObject, + pub co_names: *mut PyObject, + pub co_varnames: *mut PyObject, + pub co_freevars: *mut PyObject, + pub co_cellvars: *mut PyObject, + pub co_filename: *mut PyObject, + pub co_name: *mut PyObject, + pub co_firstlineno: ::std::os::raw::c_int, + pub co_lnotab: *mut PyObject, + pub co_zombieframe: *mut ::std::os::raw::c_void, + pub co_weakreflist: *mut PyObject, +} +impl Default for PyCodeObject { + fn default() -> Self { + let mut s = ::std::mem::MaybeUninit::::uninit(); + unsafe { + ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1); + s.assume_init() + } + } +} +#[repr(C)] +#[derive(Debug, Default, Copy, Clone)] +pub struct PyTryBlock { + pub b_type: ::std::os::raw::c_int, + pub b_handler: ::std::os::raw::c_int, + pub b_level: ::std::os::raw::c_int, +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct _frame { + pub ob_refcnt: Py_ssize_t, + pub ob_type: *mut _typeobject, + pub ob_size: Py_ssize_t, + pub f_back: *mut _frame, + pub f_code: *mut PyCodeObject, + pub f_builtins: *mut PyObject, + pub f_globals: *mut PyObject, + pub f_locals: *mut PyObject, + pub f_valuestack: *mut *mut PyObject, + pub f_stacktop: *mut *mut PyObject, + pub f_trace: *mut PyObject, + pub f_exc_type: *mut PyObject, + pub f_exc_value: *mut PyObject, + pub f_exc_traceback: *mut PyObject, + pub f_tstate: *mut PyThreadState, + pub f_lasti: ::std::os::raw::c_int, + pub f_lineno: ::std::os::raw::c_int, + pub f_iblock: ::std::os::raw::c_int, + pub f_blockstack: [PyTryBlock; 20usize], + pub f_localsplus: [*mut PyObject; 1usize], +} +impl Default for _frame { + fn default() -> Self { + let mut s = ::std::mem::MaybeUninit::::uninit(); + unsafe { + ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1); + s.assume_init() + } + } +} +pub type PyFrameObject = _frame; +#[repr(C)] +#[derive(Debug, Default, Copy, Clone)] +pub struct PyMemberDef { + pub _address: u8, +} diff --git a/src/python_bindings/v3_10_9.rs b/src/python_bindings/v3_10_9.rs new file mode 100644 index 00000000..7692e5c9 --- /dev/null +++ b/src/python_bindings/v3_10_9.rs @@ -0,0 +1,2068 @@ +// Generated bindings for python v3.10.9 +#![allow(dead_code)] +#![allow(non_upper_case_globals)] +#![allow(non_camel_case_types)] +#![allow(non_snake_case)] +#![allow(clippy::useless_transmute)] +#![allow(clippy::default_trait_access)] +#![allow(clippy::cast_lossless)] +#![allow(clippy::trivially_copy_pass_by_ref)] + +/* automatically generated by rust-bindgen 0.65.1 */ + +#[repr(C)] +#[derive(Copy, Clone, Debug, Default, Eq, Hash, Ord, PartialEq, PartialOrd)] +pub struct __BindgenBitfieldUnit { + storage: Storage, +} +impl __BindgenBitfieldUnit { + #[inline] + pub const fn new(storage: Storage) -> Self { + Self { storage } + } +} +impl __BindgenBitfieldUnit +where + Storage: AsRef<[u8]> + AsMut<[u8]>, +{ + #[inline] + pub fn get_bit(&self, index: usize) -> bool { + debug_assert!(index / 8 < self.storage.as_ref().len()); + let byte_index = index / 8; + let byte = self.storage.as_ref()[byte_index]; + let bit_index = if cfg!(target_endian = "big") { + 7 - (index % 8) + } else { + index % 8 + }; + let mask = 1 << bit_index; + byte & mask == mask + } + #[inline] + pub fn set_bit(&mut self, index: usize, val: bool) { + debug_assert!(index / 8 < self.storage.as_ref().len()); + let byte_index = index / 8; + let byte = &mut self.storage.as_mut()[byte_index]; + let bit_index = if cfg!(target_endian = "big") { + 7 - (index % 8) + } else { + index % 8 + }; + let mask = 1 << bit_index; + if val { + *byte |= mask; + } else { + *byte &= !mask; + } + } + #[inline] + pub fn get(&self, bit_offset: usize, bit_width: u8) -> u64 { + debug_assert!(bit_width <= 64); + debug_assert!(bit_offset / 8 < self.storage.as_ref().len()); + debug_assert!((bit_offset + (bit_width as usize)) / 8 <= self.storage.as_ref().len()); + let mut val = 0; + for i in 0..(bit_width as usize) { + if self.get_bit(i + bit_offset) { + let index = if cfg!(target_endian = "big") { + bit_width as usize - 1 - i + } else { + i + }; + val |= 1 << index; + } + } + val + } + #[inline] + pub fn set(&mut self, bit_offset: usize, bit_width: u8, val: u64) { + debug_assert!(bit_width <= 64); + debug_assert!(bit_offset / 8 < self.storage.as_ref().len()); + debug_assert!((bit_offset + (bit_width as usize)) / 8 <= self.storage.as_ref().len()); + for i in 0..(bit_width as usize) { + let mask = 1 << i; + let val_bit_is_set = val & mask == mask; + let index = if cfg!(target_endian = "big") { + bit_width as usize - 1 - i + } else { + i + }; + self.set_bit(index + bit_offset, val_bit_is_set); + } + } +} +pub type __darwin_wchar_t = ::std::os::raw::c_int; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct _opaque_pthread_cond_t { + pub __sig: ::std::os::raw::c_long, + pub __opaque: [::std::os::raw::c_char; 40usize], +} +impl Default for _opaque_pthread_cond_t { + fn default() -> Self { + let mut s = ::std::mem::MaybeUninit::::uninit(); + unsafe { + ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1); + s.assume_init() + } + } +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct _opaque_pthread_mutex_t { + pub __sig: ::std::os::raw::c_long, + pub __opaque: [::std::os::raw::c_char; 56usize], +} +impl Default for _opaque_pthread_mutex_t { + fn default() -> Self { + let mut s = ::std::mem::MaybeUninit::::uninit(); + unsafe { + ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1); + s.assume_init() + } + } +} +pub type __darwin_pthread_cond_t = _opaque_pthread_cond_t; +pub type __darwin_pthread_key_t = ::std::os::raw::c_ulong; +pub type __darwin_pthread_mutex_t = _opaque_pthread_mutex_t; +pub type wchar_t = __darwin_wchar_t; +pub type Py_ssize_t = isize; +pub type Py_hash_t = Py_ssize_t; +pub type PyTypeObject = _typeobject; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct _object { + pub ob_refcnt: Py_ssize_t, + pub ob_type: *mut PyTypeObject, +} +impl Default for _object { + fn default() -> Self { + let mut s = ::std::mem::MaybeUninit::::uninit(); + unsafe { + ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1); + s.assume_init() + } + } +} +pub type PyObject = _object; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct PyVarObject { + pub ob_base: PyObject, + pub ob_size: Py_ssize_t, +} +impl Default for PyVarObject { + fn default() -> Self { + let mut s = ::std::mem::MaybeUninit::::uninit(); + unsafe { + ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1); + s.assume_init() + } + } +} +pub type unaryfunc = + ::std::option::Option *mut PyObject>; +pub type binaryfunc = ::std::option::Option< + unsafe extern "C" fn(arg1: *mut PyObject, arg2: *mut PyObject) -> *mut PyObject, +>; +pub type ternaryfunc = ::std::option::Option< + unsafe extern "C" fn( + arg1: *mut PyObject, + arg2: *mut PyObject, + arg3: *mut PyObject, + ) -> *mut PyObject, +>; +pub type inquiry = + ::std::option::Option ::std::os::raw::c_int>; +pub type lenfunc = ::std::option::Option Py_ssize_t>; +pub type ssizeargfunc = ::std::option::Option< + unsafe extern "C" fn(arg1: *mut PyObject, arg2: Py_ssize_t) -> *mut PyObject, +>; +pub type ssizeobjargproc = ::std::option::Option< + unsafe extern "C" fn( + arg1: *mut PyObject, + arg2: Py_ssize_t, + arg3: *mut PyObject, + ) -> ::std::os::raw::c_int, +>; +pub type objobjargproc = ::std::option::Option< + unsafe extern "C" fn( + arg1: *mut PyObject, + arg2: *mut PyObject, + arg3: *mut PyObject, + ) -> ::std::os::raw::c_int, +>; +pub type objobjproc = ::std::option::Option< + unsafe extern "C" fn(arg1: *mut PyObject, arg2: *mut PyObject) -> ::std::os::raw::c_int, +>; +pub type visitproc = ::std::option::Option< + unsafe extern "C" fn( + arg1: *mut PyObject, + arg2: *mut ::std::os::raw::c_void, + ) -> ::std::os::raw::c_int, +>; +pub type traverseproc = ::std::option::Option< + unsafe extern "C" fn( + arg1: *mut PyObject, + arg2: visitproc, + arg3: *mut ::std::os::raw::c_void, + ) -> ::std::os::raw::c_int, +>; +pub type freefunc = ::std::option::Option; +pub type destructor = ::std::option::Option; +pub type getattrfunc = ::std::option::Option< + unsafe extern "C" fn(arg1: *mut PyObject, arg2: *mut ::std::os::raw::c_char) -> *mut PyObject, +>; +pub type getattrofunc = ::std::option::Option< + unsafe extern "C" fn(arg1: *mut PyObject, arg2: *mut PyObject) -> *mut PyObject, +>; +pub type setattrfunc = ::std::option::Option< + unsafe extern "C" fn( + arg1: *mut PyObject, + arg2: *mut ::std::os::raw::c_char, + arg3: *mut PyObject, + ) -> ::std::os::raw::c_int, +>; +pub type setattrofunc = ::std::option::Option< + unsafe extern "C" fn( + arg1: *mut PyObject, + arg2: *mut PyObject, + arg3: *mut PyObject, + ) -> ::std::os::raw::c_int, +>; +pub type reprfunc = + ::std::option::Option *mut PyObject>; +pub type hashfunc = ::std::option::Option Py_hash_t>; +pub type richcmpfunc = ::std::option::Option< + unsafe extern "C" fn( + arg1: *mut PyObject, + arg2: *mut PyObject, + arg3: ::std::os::raw::c_int, + ) -> *mut PyObject, +>; +pub type getiterfunc = + ::std::option::Option *mut PyObject>; +pub type iternextfunc = + ::std::option::Option *mut PyObject>; +pub type descrgetfunc = ::std::option::Option< + unsafe extern "C" fn( + arg1: *mut PyObject, + arg2: *mut PyObject, + arg3: *mut PyObject, + ) -> *mut PyObject, +>; +pub type descrsetfunc = ::std::option::Option< + unsafe extern "C" fn( + arg1: *mut PyObject, + arg2: *mut PyObject, + arg3: *mut PyObject, + ) -> ::std::os::raw::c_int, +>; +pub type initproc = ::std::option::Option< + unsafe extern "C" fn( + arg1: *mut PyObject, + arg2: *mut PyObject, + arg3: *mut PyObject, + ) -> ::std::os::raw::c_int, +>; +pub type newfunc = ::std::option::Option< + unsafe extern "C" fn( + arg1: *mut PyTypeObject, + arg2: *mut PyObject, + arg3: *mut PyObject, + ) -> *mut PyObject, +>; +pub type allocfunc = ::std::option::Option< + unsafe extern "C" fn(arg1: *mut PyTypeObject, arg2: Py_ssize_t) -> *mut PyObject, +>; +pub const PySendResult_PYGEN_RETURN: PySendResult = 0; +pub const PySendResult_PYGEN_ERROR: PySendResult = -1; +pub const PySendResult_PYGEN_NEXT: PySendResult = 1; +pub type PySendResult = ::std::os::raw::c_int; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct bufferinfo { + pub buf: *mut ::std::os::raw::c_void, + pub obj: *mut PyObject, + pub len: Py_ssize_t, + pub itemsize: Py_ssize_t, + pub readonly: ::std::os::raw::c_int, + pub ndim: ::std::os::raw::c_int, + pub format: *mut ::std::os::raw::c_char, + pub shape: *mut Py_ssize_t, + pub strides: *mut Py_ssize_t, + pub suboffsets: *mut Py_ssize_t, + pub internal: *mut ::std::os::raw::c_void, +} +impl Default for bufferinfo { + fn default() -> Self { + let mut s = ::std::mem::MaybeUninit::::uninit(); + unsafe { + ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1); + s.assume_init() + } + } +} +pub type Py_buffer = bufferinfo; +pub type getbufferproc = ::std::option::Option< + unsafe extern "C" fn( + arg1: *mut PyObject, + arg2: *mut Py_buffer, + arg3: ::std::os::raw::c_int, + ) -> ::std::os::raw::c_int, +>; +pub type releasebufferproc = + ::std::option::Option; +pub type vectorcallfunc = ::std::option::Option< + unsafe extern "C" fn( + callable: *mut PyObject, + args: *const *mut PyObject, + nargsf: usize, + kwnames: *mut PyObject, + ) -> *mut PyObject, +>; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct PyNumberMethods { + pub nb_add: binaryfunc, + pub nb_subtract: binaryfunc, + pub nb_multiply: binaryfunc, + pub nb_remainder: binaryfunc, + pub nb_divmod: binaryfunc, + pub nb_power: ternaryfunc, + pub nb_negative: unaryfunc, + pub nb_positive: unaryfunc, + pub nb_absolute: unaryfunc, + pub nb_bool: inquiry, + pub nb_invert: unaryfunc, + pub nb_lshift: binaryfunc, + pub nb_rshift: binaryfunc, + pub nb_and: binaryfunc, + pub nb_xor: binaryfunc, + pub nb_or: binaryfunc, + pub nb_int: unaryfunc, + pub nb_reserved: *mut ::std::os::raw::c_void, + pub nb_float: unaryfunc, + pub nb_inplace_add: binaryfunc, + pub nb_inplace_subtract: binaryfunc, + pub nb_inplace_multiply: binaryfunc, + pub nb_inplace_remainder: binaryfunc, + pub nb_inplace_power: ternaryfunc, + pub nb_inplace_lshift: binaryfunc, + pub nb_inplace_rshift: binaryfunc, + pub nb_inplace_and: binaryfunc, + pub nb_inplace_xor: binaryfunc, + pub nb_inplace_or: binaryfunc, + pub nb_floor_divide: binaryfunc, + pub nb_true_divide: binaryfunc, + pub nb_inplace_floor_divide: binaryfunc, + pub nb_inplace_true_divide: binaryfunc, + pub nb_index: unaryfunc, + pub nb_matrix_multiply: binaryfunc, + pub nb_inplace_matrix_multiply: binaryfunc, +} +impl Default for PyNumberMethods { + fn default() -> Self { + let mut s = ::std::mem::MaybeUninit::::uninit(); + unsafe { + ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1); + s.assume_init() + } + } +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct PySequenceMethods { + pub sq_length: lenfunc, + pub sq_concat: binaryfunc, + pub sq_repeat: ssizeargfunc, + pub sq_item: ssizeargfunc, + pub was_sq_slice: *mut ::std::os::raw::c_void, + pub sq_ass_item: ssizeobjargproc, + pub was_sq_ass_slice: *mut ::std::os::raw::c_void, + pub sq_contains: objobjproc, + pub sq_inplace_concat: binaryfunc, + pub sq_inplace_repeat: ssizeargfunc, +} +impl Default for PySequenceMethods { + fn default() -> Self { + let mut s = ::std::mem::MaybeUninit::::uninit(); + unsafe { + ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1); + s.assume_init() + } + } +} +#[repr(C)] +#[derive(Debug, Default, Copy, Clone)] +pub struct PyMappingMethods { + pub mp_length: lenfunc, + pub mp_subscript: binaryfunc, + pub mp_ass_subscript: objobjargproc, +} +pub type sendfunc = ::std::option::Option< + unsafe extern "C" fn( + iter: *mut PyObject, + value: *mut PyObject, + result: *mut *mut PyObject, + ) -> PySendResult, +>; +#[repr(C)] +#[derive(Debug, Default, Copy, Clone)] +pub struct PyAsyncMethods { + pub am_await: unaryfunc, + pub am_aiter: unaryfunc, + pub am_anext: unaryfunc, + pub am_send: sendfunc, +} +#[repr(C)] +#[derive(Debug, Default, Copy, Clone)] +pub struct PyBufferProcs { + pub bf_getbuffer: getbufferproc, + pub bf_releasebuffer: releasebufferproc, +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct _typeobject { + pub ob_base: PyVarObject, + pub tp_name: *const ::std::os::raw::c_char, + pub tp_basicsize: Py_ssize_t, + pub tp_itemsize: Py_ssize_t, + pub tp_dealloc: destructor, + pub tp_vectorcall_offset: Py_ssize_t, + pub tp_getattr: getattrfunc, + pub tp_setattr: setattrfunc, + pub tp_as_async: *mut PyAsyncMethods, + pub tp_repr: reprfunc, + pub tp_as_number: *mut PyNumberMethods, + pub tp_as_sequence: *mut PySequenceMethods, + pub tp_as_mapping: *mut PyMappingMethods, + pub tp_hash: hashfunc, + pub tp_call: ternaryfunc, + pub tp_str: reprfunc, + pub tp_getattro: getattrofunc, + pub tp_setattro: setattrofunc, + pub tp_as_buffer: *mut PyBufferProcs, + pub tp_flags: ::std::os::raw::c_ulong, + pub tp_doc: *const ::std::os::raw::c_char, + pub tp_traverse: traverseproc, + pub tp_clear: inquiry, + pub tp_richcompare: richcmpfunc, + pub tp_weaklistoffset: Py_ssize_t, + pub tp_iter: getiterfunc, + pub tp_iternext: iternextfunc, + pub tp_methods: *mut PyMethodDef, + pub tp_members: *mut PyMemberDef, + pub tp_getset: *mut PyGetSetDef, + pub tp_base: *mut _typeobject, + pub tp_dict: *mut PyObject, + pub tp_descr_get: descrgetfunc, + pub tp_descr_set: descrsetfunc, + pub tp_dictoffset: Py_ssize_t, + pub tp_init: initproc, + pub tp_alloc: allocfunc, + pub tp_new: newfunc, + pub tp_free: freefunc, + pub tp_is_gc: inquiry, + pub tp_bases: *mut PyObject, + pub tp_mro: *mut PyObject, + pub tp_cache: *mut PyObject, + pub tp_subclasses: *mut PyObject, + pub tp_weaklist: *mut PyObject, + pub tp_del: destructor, + pub tp_version_tag: ::std::os::raw::c_uint, + pub tp_finalize: destructor, + pub tp_vectorcall: vectorcallfunc, +} +impl Default for _typeobject { + fn default() -> Self { + let mut s = ::std::mem::MaybeUninit::::uninit(); + unsafe { + ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1); + s.assume_init() + } + } +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct _heaptypeobject { + pub ht_type: PyTypeObject, + pub as_async: PyAsyncMethods, + pub as_number: PyNumberMethods, + pub as_mapping: PyMappingMethods, + pub as_sequence: PySequenceMethods, + pub as_buffer: PyBufferProcs, + pub ht_name: *mut PyObject, + pub ht_slots: *mut PyObject, + pub ht_qualname: *mut PyObject, + pub ht_cached_keys: *mut _dictkeysobject, + pub ht_module: *mut PyObject, +} +impl Default for _heaptypeobject { + fn default() -> Self { + let mut s = ::std::mem::MaybeUninit::::uninit(); + unsafe { + ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1); + s.assume_init() + } + } +} +pub type PyHeapTypeObject = _heaptypeobject; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct PyBytesObject { + pub ob_base: PyVarObject, + pub ob_shash: Py_hash_t, + pub ob_sval: [::std::os::raw::c_char; 1usize], +} +impl Default for PyBytesObject { + fn default() -> Self { + let mut s = ::std::mem::MaybeUninit::::uninit(); + unsafe { + ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1); + s.assume_init() + } + } +} +pub type Py_UCS4 = u32; +pub type Py_UCS2 = u16; +pub type Py_UCS1 = u8; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct PyASCIIObject { + pub ob_base: PyObject, + pub length: Py_ssize_t, + pub hash: Py_hash_t, + pub state: PyASCIIObject__bindgen_ty_1, + pub wstr: *mut wchar_t, +} +#[repr(C)] +#[repr(align(4))] +#[derive(Debug, Default, Copy, Clone)] +pub struct PyASCIIObject__bindgen_ty_1 { + pub _bitfield_align_1: [u8; 0], + pub _bitfield_1: __BindgenBitfieldUnit<[u8; 4usize]>, +} +impl PyASCIIObject__bindgen_ty_1 { + #[inline] + pub fn interned(&self) -> ::std::os::raw::c_uint { + unsafe { ::std::mem::transmute(self._bitfield_1.get(0usize, 2u8) as u32) } + } + #[inline] + pub fn set_interned(&mut self, val: ::std::os::raw::c_uint) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + self._bitfield_1.set(0usize, 2u8, val as u64) + } + } + #[inline] + pub fn kind(&self) -> ::std::os::raw::c_uint { + unsafe { ::std::mem::transmute(self._bitfield_1.get(2usize, 3u8) as u32) } + } + #[inline] + pub fn set_kind(&mut self, val: ::std::os::raw::c_uint) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + self._bitfield_1.set(2usize, 3u8, val as u64) + } + } + #[inline] + pub fn compact(&self) -> ::std::os::raw::c_uint { + unsafe { ::std::mem::transmute(self._bitfield_1.get(5usize, 1u8) as u32) } + } + #[inline] + pub fn set_compact(&mut self, val: ::std::os::raw::c_uint) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + self._bitfield_1.set(5usize, 1u8, val as u64) + } + } + #[inline] + pub fn ascii(&self) -> ::std::os::raw::c_uint { + unsafe { ::std::mem::transmute(self._bitfield_1.get(6usize, 1u8) as u32) } + } + #[inline] + pub fn set_ascii(&mut self, val: ::std::os::raw::c_uint) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + self._bitfield_1.set(6usize, 1u8, val as u64) + } + } + #[inline] + pub fn ready(&self) -> ::std::os::raw::c_uint { + unsafe { ::std::mem::transmute(self._bitfield_1.get(7usize, 1u8) as u32) } + } + #[inline] + pub fn set_ready(&mut self, val: ::std::os::raw::c_uint) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + self._bitfield_1.set(7usize, 1u8, val as u64) + } + } + #[inline] + pub fn new_bitfield_1( + interned: ::std::os::raw::c_uint, + kind: ::std::os::raw::c_uint, + compact: ::std::os::raw::c_uint, + ascii: ::std::os::raw::c_uint, + ready: ::std::os::raw::c_uint, + ) -> __BindgenBitfieldUnit<[u8; 4usize]> { + let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 4usize]> = Default::default(); + __bindgen_bitfield_unit.set(0usize, 2u8, { + let interned: u32 = unsafe { ::std::mem::transmute(interned) }; + interned as u64 + }); + __bindgen_bitfield_unit.set(2usize, 3u8, { + let kind: u32 = unsafe { ::std::mem::transmute(kind) }; + kind as u64 + }); + __bindgen_bitfield_unit.set(5usize, 1u8, { + let compact: u32 = unsafe { ::std::mem::transmute(compact) }; + compact as u64 + }); + __bindgen_bitfield_unit.set(6usize, 1u8, { + let ascii: u32 = unsafe { ::std::mem::transmute(ascii) }; + ascii as u64 + }); + __bindgen_bitfield_unit.set(7usize, 1u8, { + let ready: u32 = unsafe { ::std::mem::transmute(ready) }; + ready as u64 + }); + __bindgen_bitfield_unit + } +} +impl Default for PyASCIIObject { + fn default() -> Self { + let mut s = ::std::mem::MaybeUninit::::uninit(); + unsafe { + ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1); + s.assume_init() + } + } +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct PyCompactUnicodeObject { + pub _base: PyASCIIObject, + pub utf8_length: Py_ssize_t, + pub utf8: *mut ::std::os::raw::c_char, + pub wstr_length: Py_ssize_t, +} +impl Default for PyCompactUnicodeObject { + fn default() -> Self { + let mut s = ::std::mem::MaybeUninit::::uninit(); + unsafe { + ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1); + s.assume_init() + } + } +} +#[repr(C)] +#[derive(Copy, Clone)] +pub struct PyUnicodeObject { + pub _base: PyCompactUnicodeObject, + pub data: PyUnicodeObject__bindgen_ty_1, +} +#[repr(C)] +#[derive(Copy, Clone)] +pub union PyUnicodeObject__bindgen_ty_1 { + pub any: *mut ::std::os::raw::c_void, + pub latin1: *mut Py_UCS1, + pub ucs2: *mut Py_UCS2, + pub ucs4: *mut Py_UCS4, +} +impl Default for PyUnicodeObject__bindgen_ty_1 { + fn default() -> Self { + let mut s = ::std::mem::MaybeUninit::::uninit(); + unsafe { + ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1); + s.assume_init() + } + } +} +impl Default for PyUnicodeObject { + fn default() -> Self { + let mut s = ::std::mem::MaybeUninit::::uninit(); + unsafe { + ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1); + s.assume_init() + } + } +} +pub type PyLongObject = _longobject; +pub type digit = u32; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct _longobject { + pub ob_base: PyVarObject, + pub ob_digit: [digit; 1usize], +} +impl Default for _longobject { + fn default() -> Self { + let mut s = ::std::mem::MaybeUninit::::uninit(); + unsafe { + ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1); + s.assume_init() + } + } +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct PyFloatObject { + pub ob_base: PyObject, + pub ob_fval: f64, +} +impl Default for PyFloatObject { + fn default() -> Self { + let mut s = ::std::mem::MaybeUninit::::uninit(); + unsafe { + ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1); + s.assume_init() + } + } +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct PyTupleObject { + pub ob_base: PyVarObject, + pub ob_item: [*mut PyObject; 1usize], +} +impl Default for PyTupleObject { + fn default() -> Self { + let mut s = ::std::mem::MaybeUninit::::uninit(); + unsafe { + ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1); + s.assume_init() + } + } +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct PyListObject { + pub ob_base: PyVarObject, + pub ob_item: *mut *mut PyObject, + pub allocated: Py_ssize_t, +} +impl Default for PyListObject { + fn default() -> Self { + let mut s = ::std::mem::MaybeUninit::::uninit(); + unsafe { + ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1); + s.assume_init() + } + } +} +pub type PyDictKeysObject = _dictkeysobject; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct PyDictObject { + pub ob_base: PyObject, + pub ma_used: Py_ssize_t, + pub ma_version_tag: u64, + pub ma_keys: *mut PyDictKeysObject, + pub ma_values: *mut *mut PyObject, +} +impl Default for PyDictObject { + fn default() -> Self { + let mut s = ::std::mem::MaybeUninit::::uninit(); + unsafe { + ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1); + s.assume_init() + } + } +} +pub type PyCFunction = ::std::option::Option< + unsafe extern "C" fn(arg1: *mut PyObject, arg2: *mut PyObject) -> *mut PyObject, +>; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct PyMethodDef { + pub ml_name: *const ::std::os::raw::c_char, + pub ml_meth: PyCFunction, + pub ml_flags: ::std::os::raw::c_int, + pub ml_doc: *const ::std::os::raw::c_char, +} +impl Default for PyMethodDef { + fn default() -> Self { + let mut s = ::std::mem::MaybeUninit::::uninit(); + unsafe { + ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1); + s.assume_init() + } + } +} +pub type Py_OpenCodeHookFunction = ::std::option::Option< + unsafe extern "C" fn(arg1: *mut PyObject, arg2: *mut ::std::os::raw::c_void) -> *mut PyObject, +>; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct _PyOpcache { + _unused: [u8; 0], +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct PyCodeObject { + pub ob_base: PyObject, + pub co_argcount: ::std::os::raw::c_int, + pub co_posonlyargcount: ::std::os::raw::c_int, + pub co_kwonlyargcount: ::std::os::raw::c_int, + pub co_nlocals: ::std::os::raw::c_int, + pub co_stacksize: ::std::os::raw::c_int, + pub co_flags: ::std::os::raw::c_int, + pub co_firstlineno: ::std::os::raw::c_int, + pub co_code: *mut PyObject, + pub co_consts: *mut PyObject, + pub co_names: *mut PyObject, + pub co_varnames: *mut PyObject, + pub co_freevars: *mut PyObject, + pub co_cellvars: *mut PyObject, + pub co_cell2arg: *mut Py_ssize_t, + pub co_filename: *mut PyObject, + pub co_name: *mut PyObject, + pub co_linetable: *mut PyObject, + pub co_zombieframe: *mut ::std::os::raw::c_void, + pub co_weakreflist: *mut PyObject, + pub co_extra: *mut ::std::os::raw::c_void, + pub co_opcache_map: *mut ::std::os::raw::c_uchar, + pub co_opcache: *mut _PyOpcache, + pub co_opcache_flag: ::std::os::raw::c_int, + pub co_opcache_size: ::std::os::raw::c_uchar, +} +impl Default for PyCodeObject { + fn default() -> Self { + let mut s = ::std::mem::MaybeUninit::::uninit(); + unsafe { + ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1); + s.assume_init() + } + } +} +pub type PyFrameObject = _frame; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct PySliceObject { + pub ob_base: PyObject, + pub start: *mut PyObject, + pub stop: *mut PyObject, + pub step: *mut PyObject, +} +impl Default for PySliceObject { + fn default() -> Self { + let mut s = ::std::mem::MaybeUninit::::uninit(); + unsafe { + ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1); + s.assume_init() + } + } +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct PyWideStringList { + pub length: Py_ssize_t, + pub items: *mut *mut wchar_t, +} +impl Default for PyWideStringList { + fn default() -> Self { + let mut s = ::std::mem::MaybeUninit::::uninit(); + unsafe { + ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1); + s.assume_init() + } + } +} +#[repr(C)] +#[derive(Debug, Default, Copy, Clone)] +pub struct PyPreConfig { + pub _config_init: ::std::os::raw::c_int, + pub parse_argv: ::std::os::raw::c_int, + pub isolated: ::std::os::raw::c_int, + pub use_environment: ::std::os::raw::c_int, + pub configure_locale: ::std::os::raw::c_int, + pub coerce_c_locale: ::std::os::raw::c_int, + pub coerce_c_locale_warn: ::std::os::raw::c_int, + pub utf8_mode: ::std::os::raw::c_int, + pub dev_mode: ::std::os::raw::c_int, + pub allocator: ::std::os::raw::c_int, +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct PyConfig { + pub _config_init: ::std::os::raw::c_int, + pub isolated: ::std::os::raw::c_int, + pub use_environment: ::std::os::raw::c_int, + pub dev_mode: ::std::os::raw::c_int, + pub install_signal_handlers: ::std::os::raw::c_int, + pub use_hash_seed: ::std::os::raw::c_int, + pub hash_seed: ::std::os::raw::c_ulong, + pub faulthandler: ::std::os::raw::c_int, + pub tracemalloc: ::std::os::raw::c_int, + pub import_time: ::std::os::raw::c_int, + pub show_ref_count: ::std::os::raw::c_int, + pub dump_refs: ::std::os::raw::c_int, + pub malloc_stats: ::std::os::raw::c_int, + pub filesystem_encoding: *mut wchar_t, + pub filesystem_errors: *mut wchar_t, + pub pycache_prefix: *mut wchar_t, + pub parse_argv: ::std::os::raw::c_int, + pub orig_argv: PyWideStringList, + pub argv: PyWideStringList, + pub xoptions: PyWideStringList, + pub warnoptions: PyWideStringList, + pub site_import: ::std::os::raw::c_int, + pub bytes_warning: ::std::os::raw::c_int, + pub warn_default_encoding: ::std::os::raw::c_int, + pub inspect: ::std::os::raw::c_int, + pub interactive: ::std::os::raw::c_int, + pub optimization_level: ::std::os::raw::c_int, + pub parser_debug: ::std::os::raw::c_int, + pub write_bytecode: ::std::os::raw::c_int, + pub verbose: ::std::os::raw::c_int, + pub quiet: ::std::os::raw::c_int, + pub user_site_directory: ::std::os::raw::c_int, + pub configure_c_stdio: ::std::os::raw::c_int, + pub buffered_stdio: ::std::os::raw::c_int, + pub stdio_encoding: *mut wchar_t, + pub stdio_errors: *mut wchar_t, + pub check_hash_pycs_mode: *mut wchar_t, + pub pathconfig_warnings: ::std::os::raw::c_int, + pub program_name: *mut wchar_t, + pub pythonpath_env: *mut wchar_t, + pub home: *mut wchar_t, + pub platlibdir: *mut wchar_t, + pub module_search_paths_set: ::std::os::raw::c_int, + pub module_search_paths: PyWideStringList, + pub executable: *mut wchar_t, + pub base_executable: *mut wchar_t, + pub prefix: *mut wchar_t, + pub base_prefix: *mut wchar_t, + pub exec_prefix: *mut wchar_t, + pub base_exec_prefix: *mut wchar_t, + pub skip_source_first_line: ::std::os::raw::c_int, + pub run_command: *mut wchar_t, + pub run_module: *mut wchar_t, + pub run_filename: *mut wchar_t, + pub _install_importlib: ::std::os::raw::c_int, + pub _init_main: ::std::os::raw::c_int, + pub _isolated_interpreter: ::std::os::raw::c_int, +} +impl Default for PyConfig { + fn default() -> Self { + let mut s = ::std::mem::MaybeUninit::::uninit(); + unsafe { + ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1); + s.assume_init() + } + } +} +pub type PyThreadState = _ts; +pub type PyInterpreterState = _is; +pub type Py_tracefunc = ::std::option::Option< + unsafe extern "C" fn( + arg1: *mut PyObject, + arg2: *mut PyFrameObject, + arg3: ::std::os::raw::c_int, + arg4: *mut PyObject, + ) -> ::std::os::raw::c_int, +>; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct _cframe { + pub use_tracing: ::std::os::raw::c_int, + pub previous: *mut _cframe, +} +impl Default for _cframe { + fn default() -> Self { + let mut s = ::std::mem::MaybeUninit::::uninit(); + unsafe { + ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1); + s.assume_init() + } + } +} +pub type CFrame = _cframe; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct _err_stackitem { + pub exc_type: *mut PyObject, + pub exc_value: *mut PyObject, + pub exc_traceback: *mut PyObject, + pub previous_item: *mut _err_stackitem, +} +impl Default for _err_stackitem { + fn default() -> Self { + let mut s = ::std::mem::MaybeUninit::::uninit(); + unsafe { + ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1); + s.assume_init() + } + } +} +pub type _PyErr_StackItem = _err_stackitem; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct _ts { + pub prev: *mut _ts, + pub next: *mut _ts, + pub interp: *mut PyInterpreterState, + pub frame: *mut PyFrameObject, + pub recursion_depth: ::std::os::raw::c_int, + pub recursion_headroom: ::std::os::raw::c_int, + pub stackcheck_counter: ::std::os::raw::c_int, + pub tracing: ::std::os::raw::c_int, + pub cframe: *mut CFrame, + pub c_profilefunc: Py_tracefunc, + pub c_tracefunc: Py_tracefunc, + pub c_profileobj: *mut PyObject, + pub c_traceobj: *mut PyObject, + pub curexc_type: *mut PyObject, + pub curexc_value: *mut PyObject, + pub curexc_traceback: *mut PyObject, + pub exc_state: _PyErr_StackItem, + pub exc_info: *mut _PyErr_StackItem, + pub dict: *mut PyObject, + pub gilstate_counter: ::std::os::raw::c_int, + pub async_exc: *mut PyObject, + pub thread_id: ::std::os::raw::c_ulong, + pub trash_delete_nesting: ::std::os::raw::c_int, + pub trash_delete_later: *mut PyObject, + pub on_delete: ::std::option::Option, + pub on_delete_data: *mut ::std::os::raw::c_void, + pub coroutine_origin_tracking_depth: ::std::os::raw::c_int, + pub async_gen_firstiter: *mut PyObject, + pub async_gen_finalizer: *mut PyObject, + pub context: *mut PyObject, + pub context_ver: u64, + pub id: u64, + pub root_cframe: CFrame, +} +impl Default for _ts { + fn default() -> Self { + let mut s = ::std::mem::MaybeUninit::::uninit(); + unsafe { + ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1); + s.assume_init() + } + } +} +pub type _PyFrameEvalFunction = ::std::option::Option< + unsafe extern "C" fn( + tstate: *mut PyThreadState, + arg1: *mut PyFrameObject, + arg2: ::std::os::raw::c_int, + ) -> *mut PyObject, +>; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct _xid { + pub data: *mut ::std::os::raw::c_void, + pub obj: *mut PyObject, + pub interp: i64, + pub new_object: ::std::option::Option *mut PyObject>, + pub free: ::std::option::Option, +} +impl Default for _xid { + fn default() -> Self { + let mut s = ::std::mem::MaybeUninit::::uninit(); + unsafe { + ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1); + s.assume_init() + } + } +} +pub type crossinterpdatafunc = ::std::option::Option< + unsafe extern "C" fn(arg1: *mut PyObject, arg2: *mut _xid) -> ::std::os::raw::c_int, +>; +pub type getter = ::std::option::Option< + unsafe extern "C" fn(arg1: *mut PyObject, arg2: *mut ::std::os::raw::c_void) -> *mut PyObject, +>; +pub type setter = ::std::option::Option< + unsafe extern "C" fn( + arg1: *mut PyObject, + arg2: *mut PyObject, + arg3: *mut ::std::os::raw::c_void, + ) -> ::std::os::raw::c_int, +>; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct PyGetSetDef { + pub name: *const ::std::os::raw::c_char, + pub get: getter, + pub set: setter, + pub doc: *const ::std::os::raw::c_char, + pub closure: *mut ::std::os::raw::c_void, +} +impl Default for PyGetSetDef { + fn default() -> Self { + let mut s = ::std::mem::MaybeUninit::::uninit(); + unsafe { + ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1); + s.assume_init() + } + } +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct PyMemberDef { + _unused: [u8; 0], +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct PyBaseExceptionObject { + pub ob_base: PyObject, + pub dict: *mut PyObject, + pub args: *mut PyObject, + pub traceback: *mut PyObject, + pub context: *mut PyObject, + pub cause: *mut PyObject, + pub suppress_context: ::std::os::raw::c_char, +} +impl Default for PyBaseExceptionObject { + fn default() -> Self { + let mut s = ::std::mem::MaybeUninit::::uninit(); + unsafe { + ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1); + s.assume_init() + } + } +} +pub type PyThread_type_lock = *mut ::std::os::raw::c_void; +pub type Py_tss_t = _Py_tss_t; +pub type pthread_cond_t = __darwin_pthread_cond_t; +pub type pthread_key_t = __darwin_pthread_key_t; +pub type pthread_mutex_t = __darwin_pthread_mutex_t; +#[repr(C)] +#[derive(Debug, Default, Copy, Clone)] +pub struct _Py_tss_t { + pub _is_initialized: ::std::os::raw::c_int, + pub _key: pthread_key_t, +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct _pycontextobject { + _unused: [u8; 0], +} +pub type PyContext = _pycontextobject; +pub type Py_AuditHookFunction = ::std::option::Option< + unsafe extern "C" fn( + arg1: *const ::std::os::raw::c_char, + arg2: *mut PyObject, + arg3: *mut ::std::os::raw::c_void, + ) -> ::std::os::raw::c_int, +>; +pub const _Py_error_handler__Py_ERROR_UNKNOWN: _Py_error_handler = 0; +pub const _Py_error_handler__Py_ERROR_STRICT: _Py_error_handler = 1; +pub const _Py_error_handler__Py_ERROR_SURROGATEESCAPE: _Py_error_handler = 2; +pub const _Py_error_handler__Py_ERROR_REPLACE: _Py_error_handler = 3; +pub const _Py_error_handler__Py_ERROR_IGNORE: _Py_error_handler = 4; +pub const _Py_error_handler__Py_ERROR_BACKSLASHREPLACE: _Py_error_handler = 5; +pub const _Py_error_handler__Py_ERROR_SURROGATEPASS: _Py_error_handler = 6; +pub const _Py_error_handler__Py_ERROR_XMLCHARREFREPLACE: _Py_error_handler = 7; +pub const _Py_error_handler__Py_ERROR_OTHER: _Py_error_handler = 8; +pub type _Py_error_handler = ::std::os::raw::c_uint; +pub type PyFrameState = ::std::os::raw::c_schar; +#[repr(C)] +#[derive(Debug, Default, Copy, Clone)] +pub struct PyTryBlock { + pub b_type: ::std::os::raw::c_int, + pub b_handler: ::std::os::raw::c_int, + pub b_level: ::std::os::raw::c_int, +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct _frame { + pub ob_base: PyVarObject, + pub f_back: *mut _frame, + pub f_code: *mut PyCodeObject, + pub f_builtins: *mut PyObject, + pub f_globals: *mut PyObject, + pub f_locals: *mut PyObject, + pub f_valuestack: *mut *mut PyObject, + pub f_trace: *mut PyObject, + pub f_stackdepth: ::std::os::raw::c_int, + pub f_trace_lines: ::std::os::raw::c_char, + pub f_trace_opcodes: ::std::os::raw::c_char, + pub f_gen: *mut PyObject, + pub f_lasti: ::std::os::raw::c_int, + pub f_lineno: ::std::os::raw::c_int, + pub f_iblock: ::std::os::raw::c_int, + pub f_state: PyFrameState, + pub f_blockstack: [PyTryBlock; 20usize], + pub f_localsplus: [*mut PyObject; 1usize], +} +impl Default for _frame { + fn default() -> Self { + let mut s = ::std::mem::MaybeUninit::::uninit(); + unsafe { + ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1); + s.assume_init() + } + } +} +pub type atomic_int = u32; +pub type atomic_uintptr_t = u64; +#[repr(C)] +#[derive(Debug, Default, Copy, Clone)] +pub struct _Py_atomic_address { + pub _value: atomic_uintptr_t, +} +#[repr(C)] +#[derive(Debug, Default, Copy, Clone)] +pub struct _Py_atomic_int { + pub _value: atomic_int, +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct _gil_runtime_state { + pub interval: ::std::os::raw::c_ulong, + pub last_holder: _Py_atomic_address, + pub locked: _Py_atomic_int, + pub switch_number: ::std::os::raw::c_ulong, + pub cond: pthread_cond_t, + pub mutex: pthread_mutex_t, + pub switch_cond: pthread_cond_t, + pub switch_mutex: pthread_mutex_t, +} +impl Default for _gil_runtime_state { + fn default() -> Self { + let mut s = ::std::mem::MaybeUninit::::uninit(); + unsafe { + ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1); + s.assume_init() + } + } +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct _ceval_runtime_state { + pub signals_pending: _Py_atomic_int, + pub gil: _gil_runtime_state, +} +impl Default for _ceval_runtime_state { + fn default() -> Self { + let mut s = ::std::mem::MaybeUninit::::uninit(); + unsafe { + ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1); + s.assume_init() + } + } +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct _gilstate_runtime_state { + pub check_enabled: ::std::os::raw::c_int, + pub tstate_current: _Py_atomic_address, + pub autoInterpreterState: *mut PyInterpreterState, + pub autoTSSkey: Py_tss_t, +} +impl Default for _gilstate_runtime_state { + fn default() -> Self { + let mut s = ::std::mem::MaybeUninit::::uninit(); + unsafe { + ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1); + s.assume_init() + } + } +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct _Py_AuditHookEntry { + pub next: *mut _Py_AuditHookEntry, + pub hookCFunction: Py_AuditHookFunction, + pub userData: *mut ::std::os::raw::c_void, +} +impl Default for _Py_AuditHookEntry { + fn default() -> Self { + let mut s = ::std::mem::MaybeUninit::::uninit(); + unsafe { + ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1); + s.assume_init() + } + } +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct _Py_unicode_runtime_ids { + pub lock: PyThread_type_lock, + pub next_index: Py_ssize_t, +} +impl Default for _Py_unicode_runtime_ids { + fn default() -> Self { + let mut s = ::std::mem::MaybeUninit::::uninit(); + unsafe { + ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1); + s.assume_init() + } + } +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct pyruntimestate { + pub preinitializing: ::std::os::raw::c_int, + pub preinitialized: ::std::os::raw::c_int, + pub core_initialized: ::std::os::raw::c_int, + pub initialized: ::std::os::raw::c_int, + pub _finalizing: _Py_atomic_address, + pub interpreters: pyruntimestate_pyinterpreters, + pub xidregistry: pyruntimestate__xidregistry, + pub main_thread: ::std::os::raw::c_ulong, + pub exitfuncs: [::std::option::Option; 32usize], + pub nexitfuncs: ::std::os::raw::c_int, + pub ceval: _ceval_runtime_state, + pub gilstate: _gilstate_runtime_state, + pub preconfig: PyPreConfig, + pub open_code_hook: Py_OpenCodeHookFunction, + pub open_code_userdata: *mut ::std::os::raw::c_void, + pub audit_hook_head: *mut _Py_AuditHookEntry, + pub unicode_ids: _Py_unicode_runtime_ids, +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct pyruntimestate_pyinterpreters { + pub mutex: PyThread_type_lock, + pub head: *mut PyInterpreterState, + pub main: *mut PyInterpreterState, + pub next_id: i64, +} +impl Default for pyruntimestate_pyinterpreters { + fn default() -> Self { + let mut s = ::std::mem::MaybeUninit::::uninit(); + unsafe { + ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1); + s.assume_init() + } + } +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct pyruntimestate__xidregistry { + pub mutex: PyThread_type_lock, + pub head: *mut _xidregitem, +} +impl Default for pyruntimestate__xidregistry { + fn default() -> Self { + let mut s = ::std::mem::MaybeUninit::::uninit(); + unsafe { + ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1); + s.assume_init() + } + } +} +impl Default for pyruntimestate { + fn default() -> Self { + let mut s = ::std::mem::MaybeUninit::::uninit(); + unsafe { + ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1); + s.assume_init() + } + } +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct ast_state { + pub initialized: ::std::os::raw::c_int, + pub AST_type: *mut PyObject, + pub Add_singleton: *mut PyObject, + pub Add_type: *mut PyObject, + pub And_singleton: *mut PyObject, + pub And_type: *mut PyObject, + pub AnnAssign_type: *mut PyObject, + pub Assert_type: *mut PyObject, + pub Assign_type: *mut PyObject, + pub AsyncFor_type: *mut PyObject, + pub AsyncFunctionDef_type: *mut PyObject, + pub AsyncWith_type: *mut PyObject, + pub Attribute_type: *mut PyObject, + pub AugAssign_type: *mut PyObject, + pub Await_type: *mut PyObject, + pub BinOp_type: *mut PyObject, + pub BitAnd_singleton: *mut PyObject, + pub BitAnd_type: *mut PyObject, + pub BitOr_singleton: *mut PyObject, + pub BitOr_type: *mut PyObject, + pub BitXor_singleton: *mut PyObject, + pub BitXor_type: *mut PyObject, + pub BoolOp_type: *mut PyObject, + pub Break_type: *mut PyObject, + pub Call_type: *mut PyObject, + pub ClassDef_type: *mut PyObject, + pub Compare_type: *mut PyObject, + pub Constant_type: *mut PyObject, + pub Continue_type: *mut PyObject, + pub Del_singleton: *mut PyObject, + pub Del_type: *mut PyObject, + pub Delete_type: *mut PyObject, + pub DictComp_type: *mut PyObject, + pub Dict_type: *mut PyObject, + pub Div_singleton: *mut PyObject, + pub Div_type: *mut PyObject, + pub Eq_singleton: *mut PyObject, + pub Eq_type: *mut PyObject, + pub ExceptHandler_type: *mut PyObject, + pub Expr_type: *mut PyObject, + pub Expression_type: *mut PyObject, + pub FloorDiv_singleton: *mut PyObject, + pub FloorDiv_type: *mut PyObject, + pub For_type: *mut PyObject, + pub FormattedValue_type: *mut PyObject, + pub FunctionDef_type: *mut PyObject, + pub FunctionType_type: *mut PyObject, + pub GeneratorExp_type: *mut PyObject, + pub Global_type: *mut PyObject, + pub GtE_singleton: *mut PyObject, + pub GtE_type: *mut PyObject, + pub Gt_singleton: *mut PyObject, + pub Gt_type: *mut PyObject, + pub IfExp_type: *mut PyObject, + pub If_type: *mut PyObject, + pub ImportFrom_type: *mut PyObject, + pub Import_type: *mut PyObject, + pub In_singleton: *mut PyObject, + pub In_type: *mut PyObject, + pub Interactive_type: *mut PyObject, + pub Invert_singleton: *mut PyObject, + pub Invert_type: *mut PyObject, + pub IsNot_singleton: *mut PyObject, + pub IsNot_type: *mut PyObject, + pub Is_singleton: *mut PyObject, + pub Is_type: *mut PyObject, + pub JoinedStr_type: *mut PyObject, + pub LShift_singleton: *mut PyObject, + pub LShift_type: *mut PyObject, + pub Lambda_type: *mut PyObject, + pub ListComp_type: *mut PyObject, + pub List_type: *mut PyObject, + pub Load_singleton: *mut PyObject, + pub Load_type: *mut PyObject, + pub LtE_singleton: *mut PyObject, + pub LtE_type: *mut PyObject, + pub Lt_singleton: *mut PyObject, + pub Lt_type: *mut PyObject, + pub MatMult_singleton: *mut PyObject, + pub MatMult_type: *mut PyObject, + pub MatchAs_type: *mut PyObject, + pub MatchClass_type: *mut PyObject, + pub MatchMapping_type: *mut PyObject, + pub MatchOr_type: *mut PyObject, + pub MatchSequence_type: *mut PyObject, + pub MatchSingleton_type: *mut PyObject, + pub MatchStar_type: *mut PyObject, + pub MatchValue_type: *mut PyObject, + pub Match_type: *mut PyObject, + pub Mod_singleton: *mut PyObject, + pub Mod_type: *mut PyObject, + pub Module_type: *mut PyObject, + pub Mult_singleton: *mut PyObject, + pub Mult_type: *mut PyObject, + pub Name_type: *mut PyObject, + pub NamedExpr_type: *mut PyObject, + pub Nonlocal_type: *mut PyObject, + pub NotEq_singleton: *mut PyObject, + pub NotEq_type: *mut PyObject, + pub NotIn_singleton: *mut PyObject, + pub NotIn_type: *mut PyObject, + pub Not_singleton: *mut PyObject, + pub Not_type: *mut PyObject, + pub Or_singleton: *mut PyObject, + pub Or_type: *mut PyObject, + pub Pass_type: *mut PyObject, + pub Pow_singleton: *mut PyObject, + pub Pow_type: *mut PyObject, + pub RShift_singleton: *mut PyObject, + pub RShift_type: *mut PyObject, + pub Raise_type: *mut PyObject, + pub Return_type: *mut PyObject, + pub SetComp_type: *mut PyObject, + pub Set_type: *mut PyObject, + pub Slice_type: *mut PyObject, + pub Starred_type: *mut PyObject, + pub Store_singleton: *mut PyObject, + pub Store_type: *mut PyObject, + pub Sub_singleton: *mut PyObject, + pub Sub_type: *mut PyObject, + pub Subscript_type: *mut PyObject, + pub Try_type: *mut PyObject, + pub Tuple_type: *mut PyObject, + pub TypeIgnore_type: *mut PyObject, + pub UAdd_singleton: *mut PyObject, + pub UAdd_type: *mut PyObject, + pub USub_singleton: *mut PyObject, + pub USub_type: *mut PyObject, + pub UnaryOp_type: *mut PyObject, + pub While_type: *mut PyObject, + pub With_type: *mut PyObject, + pub YieldFrom_type: *mut PyObject, + pub Yield_type: *mut PyObject, + pub __dict__: *mut PyObject, + pub __doc__: *mut PyObject, + pub __match_args__: *mut PyObject, + pub __module__: *mut PyObject, + pub _attributes: *mut PyObject, + pub _fields: *mut PyObject, + pub alias_type: *mut PyObject, + pub annotation: *mut PyObject, + pub arg: *mut PyObject, + pub arg_type: *mut PyObject, + pub args: *mut PyObject, + pub argtypes: *mut PyObject, + pub arguments_type: *mut PyObject, + pub asname: *mut PyObject, + pub ast: *mut PyObject, + pub attr: *mut PyObject, + pub bases: *mut PyObject, + pub body: *mut PyObject, + pub boolop_type: *mut PyObject, + pub cases: *mut PyObject, + pub cause: *mut PyObject, + pub cls: *mut PyObject, + pub cmpop_type: *mut PyObject, + pub col_offset: *mut PyObject, + pub comparators: *mut PyObject, + pub comprehension_type: *mut PyObject, + pub context_expr: *mut PyObject, + pub conversion: *mut PyObject, + pub ctx: *mut PyObject, + pub decorator_list: *mut PyObject, + pub defaults: *mut PyObject, + pub elt: *mut PyObject, + pub elts: *mut PyObject, + pub end_col_offset: *mut PyObject, + pub end_lineno: *mut PyObject, + pub exc: *mut PyObject, + pub excepthandler_type: *mut PyObject, + pub expr_context_type: *mut PyObject, + pub expr_type: *mut PyObject, + pub finalbody: *mut PyObject, + pub format_spec: *mut PyObject, + pub func: *mut PyObject, + pub generators: *mut PyObject, + pub guard: *mut PyObject, + pub handlers: *mut PyObject, + pub id: *mut PyObject, + pub ifs: *mut PyObject, + pub is_async: *mut PyObject, + pub items: *mut PyObject, + pub iter: *mut PyObject, + pub key: *mut PyObject, + pub keys: *mut PyObject, + pub keyword_type: *mut PyObject, + pub keywords: *mut PyObject, + pub kind: *mut PyObject, + pub kw_defaults: *mut PyObject, + pub kwarg: *mut PyObject, + pub kwd_attrs: *mut PyObject, + pub kwd_patterns: *mut PyObject, + pub kwonlyargs: *mut PyObject, + pub left: *mut PyObject, + pub level: *mut PyObject, + pub lineno: *mut PyObject, + pub lower: *mut PyObject, + pub match_case_type: *mut PyObject, + pub mod_type: *mut PyObject, + pub module: *mut PyObject, + pub msg: *mut PyObject, + pub name: *mut PyObject, + pub names: *mut PyObject, + pub op: *mut PyObject, + pub operand: *mut PyObject, + pub operator_type: *mut PyObject, + pub ops: *mut PyObject, + pub optional_vars: *mut PyObject, + pub orelse: *mut PyObject, + pub pattern: *mut PyObject, + pub pattern_type: *mut PyObject, + pub patterns: *mut PyObject, + pub posonlyargs: *mut PyObject, + pub rest: *mut PyObject, + pub returns: *mut PyObject, + pub right: *mut PyObject, + pub simple: *mut PyObject, + pub slice: *mut PyObject, + pub step: *mut PyObject, + pub stmt_type: *mut PyObject, + pub subject: *mut PyObject, + pub tag: *mut PyObject, + pub target: *mut PyObject, + pub targets: *mut PyObject, + pub test: *mut PyObject, + pub type_: *mut PyObject, + pub type_comment: *mut PyObject, + pub type_ignore_type: *mut PyObject, + pub type_ignores: *mut PyObject, + pub unaryop_type: *mut PyObject, + pub upper: *mut PyObject, + pub value: *mut PyObject, + pub values: *mut PyObject, + pub vararg: *mut PyObject, + pub withitem_type: *mut PyObject, +} +impl Default for ast_state { + fn default() -> Self { + let mut s = ::std::mem::MaybeUninit::::uninit(); + unsafe { + ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1); + s.assume_init() + } + } +} +#[repr(C)] +#[derive(Debug, Default, Copy, Clone)] +pub struct PyGC_Head { + pub _gc_next: usize, + pub _gc_prev: usize, +} +#[repr(C)] +#[derive(Debug, Default, Copy, Clone)] +pub struct gc_generation { + pub head: PyGC_Head, + pub threshold: ::std::os::raw::c_int, + pub count: ::std::os::raw::c_int, +} +#[repr(C)] +#[derive(Debug, Default, Copy, Clone)] +pub struct gc_generation_stats { + pub collections: Py_ssize_t, + pub collected: Py_ssize_t, + pub uncollectable: Py_ssize_t, +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct _gc_runtime_state { + pub trash_delete_later: *mut PyObject, + pub trash_delete_nesting: ::std::os::raw::c_int, + pub enabled: ::std::os::raw::c_int, + pub debug: ::std::os::raw::c_int, + pub generations: [gc_generation; 3usize], + pub generation0: *mut PyGC_Head, + pub permanent_generation: gc_generation, + pub generation_stats: [gc_generation_stats; 3usize], + pub collecting: ::std::os::raw::c_int, + pub garbage: *mut PyObject, + pub callbacks: *mut PyObject, + pub long_lived_total: Py_ssize_t, + pub long_lived_pending: Py_ssize_t, +} +impl Default for _gc_runtime_state { + fn default() -> Self { + let mut s = ::std::mem::MaybeUninit::::uninit(); + unsafe { + ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1); + s.assume_init() + } + } +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct _warnings_runtime_state { + pub filters: *mut PyObject, + pub once_registry: *mut PyObject, + pub default_action: *mut PyObject, + pub filters_version: ::std::os::raw::c_long, +} +impl Default for _warnings_runtime_state { + fn default() -> Self { + let mut s = ::std::mem::MaybeUninit::::uninit(); + unsafe { + ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1); + s.assume_init() + } + } +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct _pending_calls { + pub lock: PyThread_type_lock, + pub calls_to_do: _Py_atomic_int, + pub async_exc: ::std::os::raw::c_int, + pub calls: [_pending_calls__bindgen_ty_1; 32usize], + pub first: ::std::os::raw::c_int, + pub last: ::std::os::raw::c_int, +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct _pending_calls__bindgen_ty_1 { + pub func: ::std::option::Option< + unsafe extern "C" fn(arg1: *mut ::std::os::raw::c_void) -> ::std::os::raw::c_int, + >, + pub arg: *mut ::std::os::raw::c_void, +} +impl Default for _pending_calls__bindgen_ty_1 { + fn default() -> Self { + let mut s = ::std::mem::MaybeUninit::::uninit(); + unsafe { + ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1); + s.assume_init() + } + } +} +impl Default for _pending_calls { + fn default() -> Self { + let mut s = ::std::mem::MaybeUninit::::uninit(); + unsafe { + ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1); + s.assume_init() + } + } +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct _ceval_state { + pub recursion_limit: ::std::os::raw::c_int, + pub eval_breaker: _Py_atomic_int, + pub gil_drop_request: _Py_atomic_int, + pub pending: _pending_calls, +} +impl Default for _ceval_state { + fn default() -> Self { + let mut s = ::std::mem::MaybeUninit::::uninit(); + unsafe { + ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1); + s.assume_init() + } + } +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct _Py_unicode_fs_codec { + pub encoding: *mut ::std::os::raw::c_char, + pub utf8: ::std::os::raw::c_int, + pub errors: *mut ::std::os::raw::c_char, + pub error_handler: _Py_error_handler, +} +impl Default for _Py_unicode_fs_codec { + fn default() -> Self { + let mut s = ::std::mem::MaybeUninit::::uninit(); + unsafe { + ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1); + s.assume_init() + } + } +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct _Py_bytes_state { + pub empty_string: *mut PyObject, + pub characters: [*mut PyBytesObject; 256usize], +} +impl Default for _Py_bytes_state { + fn default() -> Self { + let mut s = ::std::mem::MaybeUninit::::uninit(); + unsafe { + ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1); + s.assume_init() + } + } +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct _Py_unicode_ids { + pub size: Py_ssize_t, + pub array: *mut *mut PyObject, +} +impl Default for _Py_unicode_ids { + fn default() -> Self { + let mut s = ::std::mem::MaybeUninit::::uninit(); + unsafe { + ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1); + s.assume_init() + } + } +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct _Py_unicode_state { + pub empty_string: *mut PyObject, + pub latin1: [*mut PyObject; 256usize], + pub fs_codec: _Py_unicode_fs_codec, + pub unused_interned: *mut PyObject, + pub ids: _Py_unicode_ids, +} +impl Default for _Py_unicode_state { + fn default() -> Self { + let mut s = ::std::mem::MaybeUninit::::uninit(); + unsafe { + ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1); + s.assume_init() + } + } +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct _Py_float_state { + pub numfree: ::std::os::raw::c_int, + pub free_list: *mut PyFloatObject, +} +impl Default for _Py_float_state { + fn default() -> Self { + let mut s = ::std::mem::MaybeUninit::::uninit(); + unsafe { + ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1); + s.assume_init() + } + } +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct _Py_tuple_state { + pub free_list: [*mut PyTupleObject; 20usize], + pub numfree: [::std::os::raw::c_int; 20usize], +} +impl Default for _Py_tuple_state { + fn default() -> Self { + let mut s = ::std::mem::MaybeUninit::::uninit(); + unsafe { + ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1); + s.assume_init() + } + } +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct _Py_list_state { + pub free_list: [*mut PyListObject; 80usize], + pub numfree: ::std::os::raw::c_int, +} +impl Default for _Py_list_state { + fn default() -> Self { + let mut s = ::std::mem::MaybeUninit::::uninit(); + unsafe { + ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1); + s.assume_init() + } + } +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct _Py_dict_state { + pub free_list: [*mut PyDictObject; 80usize], + pub numfree: ::std::os::raw::c_int, + pub keys_free_list: [*mut PyDictKeysObject; 80usize], + pub keys_numfree: ::std::os::raw::c_int, +} +impl Default for _Py_dict_state { + fn default() -> Self { + let mut s = ::std::mem::MaybeUninit::::uninit(); + unsafe { + ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1); + s.assume_init() + } + } +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct _Py_frame_state { + pub free_list: *mut PyFrameObject, + pub numfree: ::std::os::raw::c_int, +} +impl Default for _Py_frame_state { + fn default() -> Self { + let mut s = ::std::mem::MaybeUninit::::uninit(); + unsafe { + ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1); + s.assume_init() + } + } +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct _Py_async_gen_state { + pub value_freelist: [*mut _PyAsyncGenWrappedValue; 80usize], + pub value_numfree: ::std::os::raw::c_int, + pub asend_freelist: [*mut PyAsyncGenASend; 80usize], + pub asend_numfree: ::std::os::raw::c_int, +} +impl Default for _Py_async_gen_state { + fn default() -> Self { + let mut s = ::std::mem::MaybeUninit::::uninit(); + unsafe { + ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1); + s.assume_init() + } + } +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct _Py_context_state { + pub freelist: *mut PyContext, + pub numfree: ::std::os::raw::c_int, +} +impl Default for _Py_context_state { + fn default() -> Self { + let mut s = ::std::mem::MaybeUninit::::uninit(); + unsafe { + ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1); + s.assume_init() + } + } +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct _Py_exc_state { + pub errnomap: *mut PyObject, + pub memerrors_freelist: *mut PyBaseExceptionObject, + pub memerrors_numfree: ::std::os::raw::c_int, +} +impl Default for _Py_exc_state { + fn default() -> Self { + let mut s = ::std::mem::MaybeUninit::::uninit(); + unsafe { + ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1); + s.assume_init() + } + } +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct atexit_callback { + pub func: *mut PyObject, + pub args: *mut PyObject, + pub kwargs: *mut PyObject, +} +impl Default for atexit_callback { + fn default() -> Self { + let mut s = ::std::mem::MaybeUninit::::uninit(); + unsafe { + ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1); + s.assume_init() + } + } +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct atexit_state { + pub callbacks: *mut *mut atexit_callback, + pub ncallbacks: ::std::os::raw::c_int, + pub callback_len: ::std::os::raw::c_int, +} +impl Default for atexit_state { + fn default() -> Self { + let mut s = ::std::mem::MaybeUninit::::uninit(); + unsafe { + ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1); + s.assume_init() + } + } +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct type_cache_entry { + pub version: ::std::os::raw::c_uint, + pub name: *mut PyObject, + pub value: *mut PyObject, +} +impl Default for type_cache_entry { + fn default() -> Self { + let mut s = ::std::mem::MaybeUninit::::uninit(); + unsafe { + ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1); + s.assume_init() + } + } +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct type_cache { + pub hashtable: [type_cache_entry; 4096usize], +} +impl Default for type_cache { + fn default() -> Self { + let mut s = ::std::mem::MaybeUninit::::uninit(); + unsafe { + ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1); + s.assume_init() + } + } +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct _is { + pub next: *mut _is, + pub tstate_head: *mut _ts, + pub runtime: *mut pyruntimestate, + pub id: i64, + pub id_refcount: i64, + pub requires_idref: ::std::os::raw::c_int, + pub id_mutex: PyThread_type_lock, + pub finalizing: ::std::os::raw::c_int, + pub ceval: _ceval_state, + pub gc: _gc_runtime_state, + pub modules: *mut PyObject, + pub modules_by_index: *mut PyObject, + pub sysdict: *mut PyObject, + pub builtins: *mut PyObject, + pub importlib: *mut PyObject, + pub num_threads: ::std::os::raw::c_long, + pub pythread_stacksize: usize, + pub codec_search_path: *mut PyObject, + pub codec_search_cache: *mut PyObject, + pub codec_error_registry: *mut PyObject, + pub codecs_initialized: ::std::os::raw::c_int, + pub config: PyConfig, + pub dlopenflags: ::std::os::raw::c_int, + pub dict: *mut PyObject, + pub builtins_copy: *mut PyObject, + pub import_func: *mut PyObject, + pub eval_frame: _PyFrameEvalFunction, + pub co_extra_user_count: Py_ssize_t, + pub co_extra_freefuncs: [freefunc; 255usize], + pub before_forkers: *mut PyObject, + pub after_forkers_parent: *mut PyObject, + pub after_forkers_child: *mut PyObject, + pub tstate_next_unique_id: u64, + pub warnings: _warnings_runtime_state, + pub atexit: atexit_state, + pub audit_hooks: *mut PyObject, + pub small_ints: [*mut PyLongObject; 262usize], + pub bytes: _Py_bytes_state, + pub unicode: _Py_unicode_state, + pub float_state: _Py_float_state, + pub slice_cache: *mut PySliceObject, + pub tuple: _Py_tuple_state, + pub list: _Py_list_state, + pub dict_state: _Py_dict_state, + pub frame: _Py_frame_state, + pub async_gen: _Py_async_gen_state, + pub context: _Py_context_state, + pub exc_state: _Py_exc_state, + pub ast: ast_state, + pub type_cache: type_cache, + pub int_max_str_digits: ::std::os::raw::c_int, +} +impl Default for _is { + fn default() -> Self { + let mut s = ::std::mem::MaybeUninit::::uninit(); + unsafe { + ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1); + s.assume_init() + } + } +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct _xidregitem { + pub cls: *mut PyTypeObject, + pub getdata: crossinterpdatafunc, + pub next: *mut _xidregitem, +} +impl Default for _xidregitem { + fn default() -> Self { + let mut s = ::std::mem::MaybeUninit::::uninit(); + unsafe { + ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1); + s.assume_init() + } + } +} +#[repr(C)] +#[derive(Debug, Default, Copy, Clone)] +pub struct _dictkeysobject { + pub _address: u8, +} +#[repr(C)] +#[derive(Debug, Default, Copy, Clone)] +pub struct _PyAsyncGenWrappedValue { + pub _address: u8, +} +#[repr(C)] +#[derive(Debug, Default, Copy, Clone)] +pub struct PyAsyncGenASend { + pub _address: u8, +} diff --git a/src/python_bindings/v3_11_0.rs b/src/python_bindings/v3_11_0.rs index 3bbd3570..c4e7a6aa 100644 --- a/src/python_bindings/v3_11_0.rs +++ b/src/python_bindings/v3_11_0.rs @@ -1,4 +1,4 @@ -// Generated bindings for python v3.11.0b5 +// Generated bindings for python v3.11.0 #![allow(dead_code)] #![allow(non_upper_case_globals)] #![allow(non_camel_case_types)] @@ -8,25 +8,23 @@ #![allow(clippy::cast_lossless)] #![allow(clippy::trivially_copy_pass_by_ref)] -/* automatically generated by rust-bindgen */ +/* automatically generated by rust-bindgen 0.65.1 */ #[repr(C)] #[derive(Copy, Clone, Debug, Default, Eq, Hash, Ord, PartialEq, PartialOrd)] -pub struct __BindgenBitfieldUnit -where - Storage: AsRef<[u8]> + AsMut<[u8]>, -{ +pub struct __BindgenBitfieldUnit { storage: Storage, - align: [Align; 0], } -impl __BindgenBitfieldUnit +impl __BindgenBitfieldUnit { + #[inline] + pub const fn new(storage: Storage) -> Self { + Self { storage } + } +} +impl __BindgenBitfieldUnit where Storage: AsRef<[u8]> + AsMut<[u8]>, { - #[inline] - pub fn new(storage: Storage) -> Self { - Self { storage, align: [] } - } #[inline] pub fn get_bit(&self, index: usize) -> bool { debug_assert!(index / 8 < self.storage.as_ref().len()); @@ -97,16 +95,16 @@ where pub struct __IncompleteArrayField(::std::marker::PhantomData, [T; 0]); impl __IncompleteArrayField { #[inline] - pub fn new() -> Self { + pub const fn new() -> Self { __IncompleteArrayField(::std::marker::PhantomData, []) } #[inline] - pub unsafe fn as_ptr(&self) -> *const T { - ::std::mem::transmute(self) + pub fn as_ptr(&self) -> *const T { + self as *const _ as *const T } #[inline] - pub unsafe fn as_mut_ptr(&mut self) -> *mut T { - ::std::mem::transmute(self) + pub fn as_mut_ptr(&mut self) -> *mut T { + self as *mut _ as *mut T } #[inline] pub unsafe fn as_slice(&self, len: usize) -> &[T] { @@ -122,127 +120,41 @@ impl ::std::fmt::Debug for __IncompleteArrayField { fmt.write_str("__IncompleteArrayField") } } -impl ::std::clone::Clone for __IncompleteArrayField { - #[inline] - fn clone(&self) -> Self { - Self::new() - } -} -pub type wchar_t = ::std::os::raw::c_int; -pub type __uint8_t = ::std::os::raw::c_uchar; -pub type __uint16_t = ::std::os::raw::c_ushort; -pub type __uint32_t = ::std::os::raw::c_uint; -pub type __int64_t = ::std::os::raw::c_long; -pub type __uint64_t = ::std::os::raw::c_ulong; -pub type __ssize_t = ::std::os::raw::c_long; +pub type __darwin_wchar_t = ::std::os::raw::c_int; #[repr(C)] #[derive(Debug, Copy, Clone)] -pub struct __pthread_internal_list { - pub __prev: *mut __pthread_internal_list, - pub __next: *mut __pthread_internal_list, +pub struct _opaque_pthread_cond_t { + pub __sig: ::std::os::raw::c_long, + pub __opaque: [::std::os::raw::c_char; 40usize], } -impl Default for __pthread_internal_list { +impl Default for _opaque_pthread_cond_t { fn default() -> Self { - unsafe { ::std::mem::zeroed() } + let mut s = ::std::mem::MaybeUninit::::uninit(); + unsafe { + ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1); + s.assume_init() + } } } -pub type __pthread_list_t = __pthread_internal_list; #[repr(C)] #[derive(Debug, Copy, Clone)] -pub struct __pthread_mutex_s { - pub __lock: ::std::os::raw::c_int, - pub __count: ::std::os::raw::c_uint, - pub __owner: ::std::os::raw::c_int, - pub __nusers: ::std::os::raw::c_uint, - pub __kind: ::std::os::raw::c_int, - pub __spins: ::std::os::raw::c_short, - pub __elision: ::std::os::raw::c_short, - pub __list: __pthread_list_t, -} -impl Default for __pthread_mutex_s { - fn default() -> Self { - unsafe { ::std::mem::zeroed() } - } -} -#[repr(C)] -#[derive(Copy, Clone)] -pub struct __pthread_cond_s { - pub __bindgen_anon_1: __pthread_cond_s__bindgen_ty_1, - pub __bindgen_anon_2: __pthread_cond_s__bindgen_ty_2, - pub __g_refs: [::std::os::raw::c_uint; 2usize], - pub __g_size: [::std::os::raw::c_uint; 2usize], - pub __g1_orig_size: ::std::os::raw::c_uint, - pub __wrefs: ::std::os::raw::c_uint, - pub __g_signals: [::std::os::raw::c_uint; 2usize], -} -#[repr(C)] -#[derive(Copy, Clone)] -pub union __pthread_cond_s__bindgen_ty_1 { - pub __wseq: ::std::os::raw::c_ulonglong, - pub __wseq32: __pthread_cond_s__bindgen_ty_1__bindgen_ty_1, - _bindgen_union_align: u64, -} -#[repr(C)] -#[derive(Debug, Default, Copy, Clone)] -pub struct __pthread_cond_s__bindgen_ty_1__bindgen_ty_1 { - pub __low: ::std::os::raw::c_uint, - pub __high: ::std::os::raw::c_uint, -} -impl Default for __pthread_cond_s__bindgen_ty_1 { - fn default() -> Self { - unsafe { ::std::mem::zeroed() } - } -} -#[repr(C)] -#[derive(Copy, Clone)] -pub union __pthread_cond_s__bindgen_ty_2 { - pub __g1_start: ::std::os::raw::c_ulonglong, - pub __g1_start32: __pthread_cond_s__bindgen_ty_2__bindgen_ty_1, - _bindgen_union_align: u64, -} -#[repr(C)] -#[derive(Debug, Default, Copy, Clone)] -pub struct __pthread_cond_s__bindgen_ty_2__bindgen_ty_1 { - pub __low: ::std::os::raw::c_uint, - pub __high: ::std::os::raw::c_uint, -} -impl Default for __pthread_cond_s__bindgen_ty_2 { - fn default() -> Self { - unsafe { ::std::mem::zeroed() } - } -} -impl Default for __pthread_cond_s { - fn default() -> Self { - unsafe { ::std::mem::zeroed() } - } -} -pub type pthread_key_t = ::std::os::raw::c_uint; -#[repr(C)] -#[derive(Copy, Clone)] -pub union pthread_mutex_t { - pub __data: __pthread_mutex_s, - pub __size: [::std::os::raw::c_char; 40usize], - pub __align: ::std::os::raw::c_long, - _bindgen_union_align: [u64; 5usize], -} -impl Default for pthread_mutex_t { - fn default() -> Self { - unsafe { ::std::mem::zeroed() } - } -} -#[repr(C)] -#[derive(Copy, Clone)] -pub union pthread_cond_t { - pub __data: __pthread_cond_s, - pub __size: [::std::os::raw::c_char; 48usize], - pub __align: ::std::os::raw::c_longlong, - _bindgen_union_align: [u64; 6usize], +pub struct _opaque_pthread_mutex_t { + pub __sig: ::std::os::raw::c_long, + pub __opaque: [::std::os::raw::c_char; 56usize], } -impl Default for pthread_cond_t { +impl Default for _opaque_pthread_mutex_t { fn default() -> Self { - unsafe { ::std::mem::zeroed() } + let mut s = ::std::mem::MaybeUninit::::uninit(); + unsafe { + ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1); + s.assume_init() + } } } +pub type __darwin_pthread_cond_t = _opaque_pthread_cond_t; +pub type __darwin_pthread_key_t = ::std::os::raw::c_ulong; +pub type __darwin_pthread_mutex_t = _opaque_pthread_mutex_t; +pub type wchar_t = __darwin_wchar_t; pub type Py_ssize_t = isize; pub type Py_hash_t = Py_ssize_t; #[repr(C)] @@ -273,7 +185,11 @@ pub struct Py_buffer { } impl Default for Py_buffer { fn default() -> Self { - unsafe { ::std::mem::zeroed() } + let mut s = ::std::mem::MaybeUninit::::uninit(); + unsafe { + ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1); + s.assume_init() + } } } #[repr(C)] @@ -284,7 +200,11 @@ pub struct _object { } impl Default for _object { fn default() -> Self { - unsafe { ::std::mem::zeroed() } + let mut s = ::std::mem::MaybeUninit::::uninit(); + unsafe { + ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1); + s.assume_init() + } } } #[repr(C)] @@ -295,7 +215,11 @@ pub struct PyVarObject { } impl Default for PyVarObject { fn default() -> Self { - unsafe { ::std::mem::zeroed() } + let mut s = ::std::mem::MaybeUninit::::uninit(); + unsafe { + ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1); + s.assume_init() + } } } pub type unaryfunc = @@ -416,7 +340,7 @@ pub type allocfunc = ::std::option::Option< pub const PySendResult_PYGEN_RETURN: PySendResult = 0; pub const PySendResult_PYGEN_ERROR: PySendResult = -1; pub const PySendResult_PYGEN_NEXT: PySendResult = 1; -pub type PySendResult = i32; +pub type PySendResult = ::std::os::raw::c_int; pub type getbufferproc = ::std::option::Option< unsafe extern "C" fn( arg1: *mut PyObject, @@ -476,7 +400,11 @@ pub struct PyNumberMethods { } impl Default for PyNumberMethods { fn default() -> Self { - unsafe { ::std::mem::zeroed() } + let mut s = ::std::mem::MaybeUninit::::uninit(); + unsafe { + ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1); + s.assume_init() + } } } #[repr(C)] @@ -495,21 +423,20 @@ pub struct PySequenceMethods { } impl Default for PySequenceMethods { fn default() -> Self { - unsafe { ::std::mem::zeroed() } + let mut s = ::std::mem::MaybeUninit::::uninit(); + unsafe { + ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1); + s.assume_init() + } } } #[repr(C)] -#[derive(Debug, Copy, Clone)] +#[derive(Debug, Default, Copy, Clone)] pub struct PyMappingMethods { pub mp_length: lenfunc, pub mp_subscript: binaryfunc, pub mp_ass_subscript: objobjargproc, } -impl Default for PyMappingMethods { - fn default() -> Self { - unsafe { ::std::mem::zeroed() } - } -} pub type sendfunc = ::std::option::Option< unsafe extern "C" fn( iter: *mut PyObject, @@ -518,29 +445,19 @@ pub type sendfunc = ::std::option::Option< ) -> PySendResult, >; #[repr(C)] -#[derive(Debug, Copy, Clone)] +#[derive(Debug, Default, Copy, Clone)] pub struct PyAsyncMethods { pub am_await: unaryfunc, pub am_aiter: unaryfunc, pub am_anext: unaryfunc, pub am_send: sendfunc, } -impl Default for PyAsyncMethods { - fn default() -> Self { - unsafe { ::std::mem::zeroed() } - } -} #[repr(C)] -#[derive(Debug, Copy, Clone)] +#[derive(Debug, Default, Copy, Clone)] pub struct PyBufferProcs { pub bf_getbuffer: getbufferproc, pub bf_releasebuffer: releasebufferproc, } -impl Default for PyBufferProcs { - fn default() -> Self { - unsafe { ::std::mem::zeroed() } - } -} #[repr(C)] #[derive(Debug, Copy, Clone)] pub struct _typeobject { @@ -596,7 +513,11 @@ pub struct _typeobject { } impl Default for _typeobject { fn default() -> Self { - unsafe { ::std::mem::zeroed() } + let mut s = ::std::mem::MaybeUninit::::uninit(); + unsafe { + ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1); + s.assume_init() + } } } #[repr(C)] @@ -606,7 +527,11 @@ pub struct _specialization_cache { } impl Default for _specialization_cache { fn default() -> Self { - unsafe { ::std::mem::zeroed() } + let mut s = ::std::mem::MaybeUninit::::uninit(); + unsafe { + ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1); + s.assume_init() + } } } #[repr(C)] @@ -628,7 +553,11 @@ pub struct _heaptypeobject { } impl Default for _heaptypeobject { fn default() -> Self { - unsafe { ::std::mem::zeroed() } + let mut s = ::std::mem::MaybeUninit::::uninit(); + unsafe { + ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1); + s.assume_init() + } } } pub type PyHeapTypeObject = _heaptypeobject; @@ -641,7 +570,11 @@ pub struct PyBytesObject { } impl Default for PyBytesObject { fn default() -> Self { - unsafe { ::std::mem::zeroed() } + let mut s = ::std::mem::MaybeUninit::::uninit(); + unsafe { + ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1); + s.assume_init() + } } } pub type Py_UCS4 = u32; @@ -660,7 +593,8 @@ pub struct PyASCIIObject { #[repr(align(4))] #[derive(Debug, Default, Copy, Clone)] pub struct PyASCIIObject__bindgen_ty_1 { - pub _bitfield_1: __BindgenBitfieldUnit<[u8; 4usize], u8>, + pub _bitfield_align_1: [u8; 0], + pub _bitfield_1: __BindgenBitfieldUnit<[u8; 4usize]>, } impl PyASCIIObject__bindgen_ty_1 { #[inline] @@ -725,9 +659,8 @@ impl PyASCIIObject__bindgen_ty_1 { compact: ::std::os::raw::c_uint, ascii: ::std::os::raw::c_uint, ready: ::std::os::raw::c_uint, - ) -> __BindgenBitfieldUnit<[u8; 4usize], u8> { - let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 4usize], u8> = - Default::default(); + ) -> __BindgenBitfieldUnit<[u8; 4usize]> { + let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 4usize]> = Default::default(); __bindgen_bitfield_unit.set(0usize, 2u8, { let interned: u32 = unsafe { ::std::mem::transmute(interned) }; interned as u64 @@ -753,7 +686,11 @@ impl PyASCIIObject__bindgen_ty_1 { } impl Default for PyASCIIObject { fn default() -> Self { - unsafe { ::std::mem::zeroed() } + let mut s = ::std::mem::MaybeUninit::::uninit(); + unsafe { + ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1); + s.assume_init() + } } } #[repr(C)] @@ -766,7 +703,11 @@ pub struct PyCompactUnicodeObject { } impl Default for PyCompactUnicodeObject { fn default() -> Self { - unsafe { ::std::mem::zeroed() } + let mut s = ::std::mem::MaybeUninit::::uninit(); + unsafe { + ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1); + s.assume_init() + } } } #[repr(C)] @@ -782,16 +723,23 @@ pub union PyUnicodeObject__bindgen_ty_1 { pub latin1: *mut Py_UCS1, pub ucs2: *mut Py_UCS2, pub ucs4: *mut Py_UCS4, - _bindgen_union_align: u64, } impl Default for PyUnicodeObject__bindgen_ty_1 { fn default() -> Self { - unsafe { ::std::mem::zeroed() } + let mut s = ::std::mem::MaybeUninit::::uninit(); + unsafe { + ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1); + s.assume_init() + } } } impl Default for PyUnicodeObject { fn default() -> Self { - unsafe { ::std::mem::zeroed() } + let mut s = ::std::mem::MaybeUninit::::uninit(); + unsafe { + ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1); + s.assume_init() + } } } pub type digit = u32; @@ -803,7 +751,11 @@ pub struct _longobject { } impl Default for _longobject { fn default() -> Self { - unsafe { ::std::mem::zeroed() } + let mut s = ::std::mem::MaybeUninit::::uninit(); + unsafe { + ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1); + s.assume_init() + } } } #[repr(C)] @@ -814,7 +766,11 @@ pub struct PyFloatObject { } impl Default for PyFloatObject { fn default() -> Self { - unsafe { ::std::mem::zeroed() } + let mut s = ::std::mem::MaybeUninit::::uninit(); + unsafe { + ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1); + s.assume_init() + } } } #[repr(C)] @@ -825,7 +781,11 @@ pub struct PyTupleObject { } impl Default for PyTupleObject { fn default() -> Self { - unsafe { ::std::mem::zeroed() } + let mut s = ::std::mem::MaybeUninit::::uninit(); + unsafe { + ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1); + s.assume_init() + } } } #[repr(C)] @@ -837,7 +797,11 @@ pub struct PyListObject { } impl Default for PyListObject { fn default() -> Self { - unsafe { ::std::mem::zeroed() } + let mut s = ::std::mem::MaybeUninit::::uninit(); + unsafe { + ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1); + s.assume_init() + } } } pub type PyDictKeysObject = _dictkeysobject; @@ -853,7 +817,11 @@ pub struct PyDictObject { } impl Default for PyDictObject { fn default() -> Self { - unsafe { ::std::mem::zeroed() } + let mut s = ::std::mem::MaybeUninit::::uninit(); + unsafe { + ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1); + s.assume_init() + } } } pub type PyCFunction = ::std::option::Option< @@ -869,7 +837,11 @@ pub struct PyMethodDef { } impl Default for PyMethodDef { fn default() -> Self { - unsafe { ::std::mem::zeroed() } + let mut s = ::std::mem::MaybeUninit::::uninit(); + unsafe { + ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1); + s.assume_init() + } } } #[repr(C)] @@ -894,7 +866,11 @@ pub struct PyFunctionObject { } impl Default for PyFunctionObject { fn default() -> Self { - unsafe { ::std::mem::zeroed() } + let mut s = ::std::mem::MaybeUninit::::uninit(); + unsafe { + ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1); + s.assume_init() + } } } pub type Py_OpenCodeHookFunction = ::std::option::Option< @@ -936,7 +912,11 @@ pub struct PyCodeObject { } impl Default for PyCodeObject { fn default() -> Self { - unsafe { ::std::mem::zeroed() } + let mut s = ::std::mem::MaybeUninit::::uninit(); + unsafe { + ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1); + s.assume_init() + } } } #[repr(C)] @@ -948,7 +928,11 @@ pub struct _opaque { } impl Default for _opaque { fn default() -> Self { - unsafe { ::std::mem::zeroed() } + let mut s = ::std::mem::MaybeUninit::::uninit(); + unsafe { + ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1); + s.assume_init() + } } } #[repr(C)] @@ -961,7 +945,11 @@ pub struct _line_offsets { } impl Default for _line_offsets { fn default() -> Self { - unsafe { ::std::mem::zeroed() } + let mut s = ::std::mem::MaybeUninit::::uninit(); + unsafe { + ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1); + s.assume_init() + } } } pub type PyCodeAddressRange = _line_offsets; @@ -975,7 +963,11 @@ pub struct PySliceObject { } impl Default for PySliceObject { fn default() -> Self { - unsafe { ::std::mem::zeroed() } + let mut s = ::std::mem::MaybeUninit::::uninit(); + unsafe { + ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1); + s.assume_init() + } } } #[repr(C)] @@ -986,7 +978,11 @@ pub struct PyWideStringList { } impl Default for PyWideStringList { fn default() -> Self { - unsafe { ::std::mem::zeroed() } + let mut s = ::std::mem::MaybeUninit::::uninit(); + unsafe { + ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1); + s.assume_init() + } } } #[repr(C)] @@ -1072,7 +1068,11 @@ pub struct PyConfig { } impl Default for PyConfig { fn default() -> Self { - unsafe { ::std::mem::zeroed() } + let mut s = ::std::mem::MaybeUninit::::uninit(); + unsafe { + ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1); + s.assume_init() + } } } pub type Py_tracefunc = ::std::option::Option< @@ -1091,7 +1091,11 @@ pub struct PyTraceInfo { } impl Default for PyTraceInfo { fn default() -> Self { - unsafe { ::std::mem::zeroed() } + let mut s = ::std::mem::MaybeUninit::::uninit(); + unsafe { + ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1); + s.assume_init() + } } } #[repr(C)] @@ -1103,7 +1107,11 @@ pub struct _PyCFrame { } impl Default for _PyCFrame { fn default() -> Self { - unsafe { ::std::mem::zeroed() } + let mut s = ::std::mem::MaybeUninit::::uninit(); + unsafe { + ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1); + s.assume_init() + } } } #[repr(C)] @@ -1114,7 +1122,11 @@ pub struct _err_stackitem { } impl Default for _err_stackitem { fn default() -> Self { - unsafe { ::std::mem::zeroed() } + let mut s = ::std::mem::MaybeUninit::::uninit(); + unsafe { + ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1); + s.assume_init() + } } } pub type _PyErr_StackItem = _err_stackitem; @@ -1128,7 +1140,11 @@ pub struct _stack_chunk { } impl Default for _stack_chunk { fn default() -> Self { - unsafe { ::std::mem::zeroed() } + let mut s = ::std::mem::MaybeUninit::::uninit(); + unsafe { + ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1); + s.assume_init() + } } } pub type _PyStackChunk = _stack_chunk; @@ -1178,7 +1194,11 @@ pub struct _ts { } impl Default for _ts { fn default() -> Self { - unsafe { ::std::mem::zeroed() } + let mut s = ::std::mem::MaybeUninit::::uninit(); + unsafe { + ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1); + s.assume_init() + } } } pub type _PyFrameEvalFunction = ::std::option::Option< @@ -1202,7 +1222,11 @@ pub struct _xid { } impl Default for _xid { fn default() -> Self { - unsafe { ::std::mem::zeroed() } + let mut s = ::std::mem::MaybeUninit::::uninit(); + unsafe { + ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1); + s.assume_init() + } } } pub type crossinterpdatafunc = ::std::option::Option< @@ -1232,7 +1256,11 @@ pub struct PyGetSetDef { } impl Default for PyGetSetDef { fn default() -> Self { - unsafe { ::std::mem::zeroed() } + let mut s = ::std::mem::MaybeUninit::::uninit(); + unsafe { + ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1); + s.assume_init() + } } } #[repr(C)] @@ -1249,11 +1277,18 @@ pub struct PyBaseExceptionObject { } impl Default for PyBaseExceptionObject { fn default() -> Self { - unsafe { ::std::mem::zeroed() } + let mut s = ::std::mem::MaybeUninit::::uninit(); + unsafe { + ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1); + s.assume_init() + } } } pub type PyThread_type_lock = *mut ::std::os::raw::c_void; pub type Py_tss_t = _Py_tss_t; +pub type pthread_cond_t = __darwin_pthread_cond_t; +pub type pthread_key_t = __darwin_pthread_key_t; +pub type pthread_mutex_t = __darwin_pthread_mutex_t; #[repr(C)] #[derive(Debug, Default, Copy, Clone)] pub struct _Py_tss_t { @@ -1269,7 +1304,7 @@ pub type Py_AuditHookFunction = ::std::option::Option< ) -> ::std::os::raw::c_int, >; pub type atomic_int = u32; -pub type atomic_uintptr_t = usize; +pub type atomic_uintptr_t = u64; #[repr(C)] #[derive(Debug, Default, Copy, Clone)] pub struct _Py_atomic_address { @@ -1281,7 +1316,7 @@ pub struct _Py_atomic_int { pub _value: atomic_int, } #[repr(C)] -#[derive(Copy, Clone)] +#[derive(Debug, Copy, Clone)] pub struct _gil_runtime_state { pub interval: ::std::os::raw::c_ulong, pub last_holder: _Py_atomic_address, @@ -1294,7 +1329,11 @@ pub struct _gil_runtime_state { } impl Default for _gil_runtime_state { fn default() -> Self { - unsafe { ::std::mem::zeroed() } + let mut s = ::std::mem::MaybeUninit::::uninit(); + unsafe { + ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1); + s.assume_init() + } } } #[repr(C)] @@ -1336,11 +1375,15 @@ pub struct _gc_runtime_state { } impl Default for _gc_runtime_state { fn default() -> Self { - unsafe { ::std::mem::zeroed() } + let mut s = ::std::mem::MaybeUninit::::uninit(); + unsafe { + ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1); + s.assume_init() + } } } #[repr(C)] -#[derive(Copy, Clone)] +#[derive(Debug, Copy, Clone)] pub struct _Py_global_strings { pub literals: _Py_global_strings__bindgen_ty_1, pub identifiers: _Py_global_strings__bindgen_ty_2, @@ -1380,7 +1423,11 @@ pub struct _Py_global_strings__bindgen_ty_1__bindgen_ty_1 { } impl Default for _Py_global_strings__bindgen_ty_1__bindgen_ty_1 { fn default() -> Self { - unsafe { ::std::mem::zeroed() } + let mut s = ::std::mem::MaybeUninit::::uninit(); + unsafe { + ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1); + s.assume_init() + } } } #[repr(C)] @@ -1391,7 +1438,11 @@ pub struct _Py_global_strings__bindgen_ty_1__bindgen_ty_2 { } impl Default for _Py_global_strings__bindgen_ty_1__bindgen_ty_2 { fn default() -> Self { - unsafe { ::std::mem::zeroed() } + let mut s = ::std::mem::MaybeUninit::::uninit(); + unsafe { + ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1); + s.assume_init() + } } } #[repr(C)] @@ -1402,7 +1453,11 @@ pub struct _Py_global_strings__bindgen_ty_1__bindgen_ty_3 { } impl Default for _Py_global_strings__bindgen_ty_1__bindgen_ty_3 { fn default() -> Self { - unsafe { ::std::mem::zeroed() } + let mut s = ::std::mem::MaybeUninit::::uninit(); + unsafe { + ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1); + s.assume_init() + } } } #[repr(C)] @@ -1413,7 +1468,11 @@ pub struct _Py_global_strings__bindgen_ty_1__bindgen_ty_4 { } impl Default for _Py_global_strings__bindgen_ty_1__bindgen_ty_4 { fn default() -> Self { - unsafe { ::std::mem::zeroed() } + let mut s = ::std::mem::MaybeUninit::::uninit(); + unsafe { + ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1); + s.assume_init() + } } } #[repr(C)] @@ -1424,7 +1483,11 @@ pub struct _Py_global_strings__bindgen_ty_1__bindgen_ty_5 { } impl Default for _Py_global_strings__bindgen_ty_1__bindgen_ty_5 { fn default() -> Self { - unsafe { ::std::mem::zeroed() } + let mut s = ::std::mem::MaybeUninit::::uninit(); + unsafe { + ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1); + s.assume_init() + } } } #[repr(C)] @@ -1435,7 +1498,11 @@ pub struct _Py_global_strings__bindgen_ty_1__bindgen_ty_6 { } impl Default for _Py_global_strings__bindgen_ty_1__bindgen_ty_6 { fn default() -> Self { - unsafe { ::std::mem::zeroed() } + let mut s = ::std::mem::MaybeUninit::::uninit(); + unsafe { + ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1); + s.assume_init() + } } } #[repr(C)] @@ -1446,7 +1513,11 @@ pub struct _Py_global_strings__bindgen_ty_1__bindgen_ty_7 { } impl Default for _Py_global_strings__bindgen_ty_1__bindgen_ty_7 { fn default() -> Self { - unsafe { ::std::mem::zeroed() } + let mut s = ::std::mem::MaybeUninit::::uninit(); + unsafe { + ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1); + s.assume_init() + } } } #[repr(C)] @@ -1457,7 +1528,11 @@ pub struct _Py_global_strings__bindgen_ty_1__bindgen_ty_8 { } impl Default for _Py_global_strings__bindgen_ty_1__bindgen_ty_8 { fn default() -> Self { - unsafe { ::std::mem::zeroed() } + let mut s = ::std::mem::MaybeUninit::::uninit(); + unsafe { + ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1); + s.assume_init() + } } } #[repr(C)] @@ -1468,7 +1543,11 @@ pub struct _Py_global_strings__bindgen_ty_1__bindgen_ty_9 { } impl Default for _Py_global_strings__bindgen_ty_1__bindgen_ty_9 { fn default() -> Self { - unsafe { ::std::mem::zeroed() } + let mut s = ::std::mem::MaybeUninit::::uninit(); + unsafe { + ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1); + s.assume_init() + } } } #[repr(C)] @@ -1479,7 +1558,11 @@ pub struct _Py_global_strings__bindgen_ty_1__bindgen_ty_10 { } impl Default for _Py_global_strings__bindgen_ty_1__bindgen_ty_10 { fn default() -> Self { - unsafe { ::std::mem::zeroed() } + let mut s = ::std::mem::MaybeUninit::::uninit(); + unsafe { + ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1); + s.assume_init() + } } } #[repr(C)] @@ -1490,7 +1573,11 @@ pub struct _Py_global_strings__bindgen_ty_1__bindgen_ty_11 { } impl Default for _Py_global_strings__bindgen_ty_1__bindgen_ty_11 { fn default() -> Self { - unsafe { ::std::mem::zeroed() } + let mut s = ::std::mem::MaybeUninit::::uninit(); + unsafe { + ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1); + s.assume_init() + } } } #[repr(C)] @@ -1501,7 +1588,11 @@ pub struct _Py_global_strings__bindgen_ty_1__bindgen_ty_12 { } impl Default for _Py_global_strings__bindgen_ty_1__bindgen_ty_12 { fn default() -> Self { - unsafe { ::std::mem::zeroed() } + let mut s = ::std::mem::MaybeUninit::::uninit(); + unsafe { + ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1); + s.assume_init() + } } } #[repr(C)] @@ -1512,7 +1603,11 @@ pub struct _Py_global_strings__bindgen_ty_1__bindgen_ty_13 { } impl Default for _Py_global_strings__bindgen_ty_1__bindgen_ty_13 { fn default() -> Self { - unsafe { ::std::mem::zeroed() } + let mut s = ::std::mem::MaybeUninit::::uninit(); + unsafe { + ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1); + s.assume_init() + } } } #[repr(C)] @@ -1523,7 +1618,11 @@ pub struct _Py_global_strings__bindgen_ty_1__bindgen_ty_14 { } impl Default for _Py_global_strings__bindgen_ty_1__bindgen_ty_14 { fn default() -> Self { - unsafe { ::std::mem::zeroed() } + let mut s = ::std::mem::MaybeUninit::::uninit(); + unsafe { + ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1); + s.assume_init() + } } } #[repr(C)] @@ -1534,7 +1633,11 @@ pub struct _Py_global_strings__bindgen_ty_1__bindgen_ty_15 { } impl Default for _Py_global_strings__bindgen_ty_1__bindgen_ty_15 { fn default() -> Self { - unsafe { ::std::mem::zeroed() } + let mut s = ::std::mem::MaybeUninit::::uninit(); + unsafe { + ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1); + s.assume_init() + } } } #[repr(C)] @@ -1545,7 +1648,11 @@ pub struct _Py_global_strings__bindgen_ty_1__bindgen_ty_16 { } impl Default for _Py_global_strings__bindgen_ty_1__bindgen_ty_16 { fn default() -> Self { - unsafe { ::std::mem::zeroed() } + let mut s = ::std::mem::MaybeUninit::::uninit(); + unsafe { + ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1); + s.assume_init() + } } } #[repr(C)] @@ -1556,7 +1663,11 @@ pub struct _Py_global_strings__bindgen_ty_1__bindgen_ty_17 { } impl Default for _Py_global_strings__bindgen_ty_1__bindgen_ty_17 { fn default() -> Self { - unsafe { ::std::mem::zeroed() } + let mut s = ::std::mem::MaybeUninit::::uninit(); + unsafe { + ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1); + s.assume_init() + } } } #[repr(C)] @@ -1567,7 +1678,11 @@ pub struct _Py_global_strings__bindgen_ty_1__bindgen_ty_18 { } impl Default for _Py_global_strings__bindgen_ty_1__bindgen_ty_18 { fn default() -> Self { - unsafe { ::std::mem::zeroed() } + let mut s = ::std::mem::MaybeUninit::::uninit(); + unsafe { + ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1); + s.assume_init() + } } } #[repr(C)] @@ -1578,7 +1693,11 @@ pub struct _Py_global_strings__bindgen_ty_1__bindgen_ty_19 { } impl Default for _Py_global_strings__bindgen_ty_1__bindgen_ty_19 { fn default() -> Self { - unsafe { ::std::mem::zeroed() } + let mut s = ::std::mem::MaybeUninit::::uninit(); + unsafe { + ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1); + s.assume_init() + } } } #[repr(C)] @@ -1589,7 +1708,11 @@ pub struct _Py_global_strings__bindgen_ty_1__bindgen_ty_20 { } impl Default for _Py_global_strings__bindgen_ty_1__bindgen_ty_20 { fn default() -> Self { - unsafe { ::std::mem::zeroed() } + let mut s = ::std::mem::MaybeUninit::::uninit(); + unsafe { + ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1); + s.assume_init() + } } } #[repr(C)] @@ -1600,16 +1723,24 @@ pub struct _Py_global_strings__bindgen_ty_1__bindgen_ty_21 { } impl Default for _Py_global_strings__bindgen_ty_1__bindgen_ty_21 { fn default() -> Self { - unsafe { ::std::mem::zeroed() } + let mut s = ::std::mem::MaybeUninit::::uninit(); + unsafe { + ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1); + s.assume_init() + } } } impl Default for _Py_global_strings__bindgen_ty_1 { fn default() -> Self { - unsafe { ::std::mem::zeroed() } + let mut s = ::std::mem::MaybeUninit::::uninit(); + unsafe { + ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1); + s.assume_init() + } } } #[repr(C)] -#[derive(Copy, Clone)] +#[derive(Debug, Copy, Clone)] pub struct _Py_global_strings__bindgen_ty_2 { pub _False: _Py_global_strings__bindgen_ty_2__bindgen_ty_1, pub _Py_Repr: _Py_global_strings__bindgen_ty_2__bindgen_ty_2, @@ -1924,7 +2055,11 @@ pub struct _Py_global_strings__bindgen_ty_2__bindgen_ty_1 { } impl Default for _Py_global_strings__bindgen_ty_2__bindgen_ty_1 { fn default() -> Self { - unsafe { ::std::mem::zeroed() } + let mut s = ::std::mem::MaybeUninit::::uninit(); + unsafe { + ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1); + s.assume_init() + } } } #[repr(C)] @@ -1935,7 +2070,11 @@ pub struct _Py_global_strings__bindgen_ty_2__bindgen_ty_2 { } impl Default for _Py_global_strings__bindgen_ty_2__bindgen_ty_2 { fn default() -> Self { - unsafe { ::std::mem::zeroed() } + let mut s = ::std::mem::MaybeUninit::::uninit(); + unsafe { + ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1); + s.assume_init() + } } } #[repr(C)] @@ -1946,7 +2085,11 @@ pub struct _Py_global_strings__bindgen_ty_2__bindgen_ty_3 { } impl Default for _Py_global_strings__bindgen_ty_2__bindgen_ty_3 { fn default() -> Self { - unsafe { ::std::mem::zeroed() } + let mut s = ::std::mem::MaybeUninit::::uninit(); + unsafe { + ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1); + s.assume_init() + } } } #[repr(C)] @@ -1957,7 +2100,11 @@ pub struct _Py_global_strings__bindgen_ty_2__bindgen_ty_4 { } impl Default for _Py_global_strings__bindgen_ty_2__bindgen_ty_4 { fn default() -> Self { - unsafe { ::std::mem::zeroed() } + let mut s = ::std::mem::MaybeUninit::::uninit(); + unsafe { + ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1); + s.assume_init() + } } } #[repr(C)] @@ -1968,7 +2115,11 @@ pub struct _Py_global_strings__bindgen_ty_2__bindgen_ty_5 { } impl Default for _Py_global_strings__bindgen_ty_2__bindgen_ty_5 { fn default() -> Self { - unsafe { ::std::mem::zeroed() } + let mut s = ::std::mem::MaybeUninit::::uninit(); + unsafe { + ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1); + s.assume_init() + } } } #[repr(C)] @@ -1979,7 +2130,11 @@ pub struct _Py_global_strings__bindgen_ty_2__bindgen_ty_6 { } impl Default for _Py_global_strings__bindgen_ty_2__bindgen_ty_6 { fn default() -> Self { - unsafe { ::std::mem::zeroed() } + let mut s = ::std::mem::MaybeUninit::::uninit(); + unsafe { + ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1); + s.assume_init() + } } } #[repr(C)] @@ -1990,7 +2145,11 @@ pub struct _Py_global_strings__bindgen_ty_2__bindgen_ty_7 { } impl Default for _Py_global_strings__bindgen_ty_2__bindgen_ty_7 { fn default() -> Self { - unsafe { ::std::mem::zeroed() } + let mut s = ::std::mem::MaybeUninit::::uninit(); + unsafe { + ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1); + s.assume_init() + } } } #[repr(C)] @@ -2001,7 +2160,11 @@ pub struct _Py_global_strings__bindgen_ty_2__bindgen_ty_8 { } impl Default for _Py_global_strings__bindgen_ty_2__bindgen_ty_8 { fn default() -> Self { - unsafe { ::std::mem::zeroed() } + let mut s = ::std::mem::MaybeUninit::::uninit(); + unsafe { + ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1); + s.assume_init() + } } } #[repr(C)] @@ -2012,7 +2175,11 @@ pub struct _Py_global_strings__bindgen_ty_2__bindgen_ty_9 { } impl Default for _Py_global_strings__bindgen_ty_2__bindgen_ty_9 { fn default() -> Self { - unsafe { ::std::mem::zeroed() } + let mut s = ::std::mem::MaybeUninit::::uninit(); + unsafe { + ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1); + s.assume_init() + } } } #[repr(C)] @@ -2023,7 +2190,11 @@ pub struct _Py_global_strings__bindgen_ty_2__bindgen_ty_10 { } impl Default for _Py_global_strings__bindgen_ty_2__bindgen_ty_10 { fn default() -> Self { - unsafe { ::std::mem::zeroed() } + let mut s = ::std::mem::MaybeUninit::::uninit(); + unsafe { + ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1); + s.assume_init() + } } } #[repr(C)] @@ -2034,7 +2205,11 @@ pub struct _Py_global_strings__bindgen_ty_2__bindgen_ty_11 { } impl Default for _Py_global_strings__bindgen_ty_2__bindgen_ty_11 { fn default() -> Self { - unsafe { ::std::mem::zeroed() } + let mut s = ::std::mem::MaybeUninit::::uninit(); + unsafe { + ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1); + s.assume_init() + } } } #[repr(C)] @@ -2045,7 +2220,11 @@ pub struct _Py_global_strings__bindgen_ty_2__bindgen_ty_12 { } impl Default for _Py_global_strings__bindgen_ty_2__bindgen_ty_12 { fn default() -> Self { - unsafe { ::std::mem::zeroed() } + let mut s = ::std::mem::MaybeUninit::::uninit(); + unsafe { + ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1); + s.assume_init() + } } } #[repr(C)] @@ -2056,7 +2235,11 @@ pub struct _Py_global_strings__bindgen_ty_2__bindgen_ty_13 { } impl Default for _Py_global_strings__bindgen_ty_2__bindgen_ty_13 { fn default() -> Self { - unsafe { ::std::mem::zeroed() } + let mut s = ::std::mem::MaybeUninit::::uninit(); + unsafe { + ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1); + s.assume_init() + } } } #[repr(C)] @@ -2067,7 +2250,11 @@ pub struct _Py_global_strings__bindgen_ty_2__bindgen_ty_14 { } impl Default for _Py_global_strings__bindgen_ty_2__bindgen_ty_14 { fn default() -> Self { - unsafe { ::std::mem::zeroed() } + let mut s = ::std::mem::MaybeUninit::::uninit(); + unsafe { + ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1); + s.assume_init() + } } } #[repr(C)] @@ -2078,7 +2265,11 @@ pub struct _Py_global_strings__bindgen_ty_2__bindgen_ty_15 { } impl Default for _Py_global_strings__bindgen_ty_2__bindgen_ty_15 { fn default() -> Self { - unsafe { ::std::mem::zeroed() } + let mut s = ::std::mem::MaybeUninit::::uninit(); + unsafe { + ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1); + s.assume_init() + } } } #[repr(C)] @@ -2089,7 +2280,11 @@ pub struct _Py_global_strings__bindgen_ty_2__bindgen_ty_16 { } impl Default for _Py_global_strings__bindgen_ty_2__bindgen_ty_16 { fn default() -> Self { - unsafe { ::std::mem::zeroed() } + let mut s = ::std::mem::MaybeUninit::::uninit(); + unsafe { + ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1); + s.assume_init() + } } } #[repr(C)] @@ -2100,7 +2295,11 @@ pub struct _Py_global_strings__bindgen_ty_2__bindgen_ty_17 { } impl Default for _Py_global_strings__bindgen_ty_2__bindgen_ty_17 { fn default() -> Self { - unsafe { ::std::mem::zeroed() } + let mut s = ::std::mem::MaybeUninit::::uninit(); + unsafe { + ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1); + s.assume_init() + } } } #[repr(C)] @@ -2111,7 +2310,11 @@ pub struct _Py_global_strings__bindgen_ty_2__bindgen_ty_18 { } impl Default for _Py_global_strings__bindgen_ty_2__bindgen_ty_18 { fn default() -> Self { - unsafe { ::std::mem::zeroed() } + let mut s = ::std::mem::MaybeUninit::::uninit(); + unsafe { + ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1); + s.assume_init() + } } } #[repr(C)] @@ -2122,7 +2325,11 @@ pub struct _Py_global_strings__bindgen_ty_2__bindgen_ty_19 { } impl Default for _Py_global_strings__bindgen_ty_2__bindgen_ty_19 { fn default() -> Self { - unsafe { ::std::mem::zeroed() } + let mut s = ::std::mem::MaybeUninit::::uninit(); + unsafe { + ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1); + s.assume_init() + } } } #[repr(C)] @@ -2133,7 +2340,11 @@ pub struct _Py_global_strings__bindgen_ty_2__bindgen_ty_20 { } impl Default for _Py_global_strings__bindgen_ty_2__bindgen_ty_20 { fn default() -> Self { - unsafe { ::std::mem::zeroed() } + let mut s = ::std::mem::MaybeUninit::::uninit(); + unsafe { + ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1); + s.assume_init() + } } } #[repr(C)] @@ -2144,7 +2355,11 @@ pub struct _Py_global_strings__bindgen_ty_2__bindgen_ty_21 { } impl Default for _Py_global_strings__bindgen_ty_2__bindgen_ty_21 { fn default() -> Self { - unsafe { ::std::mem::zeroed() } + let mut s = ::std::mem::MaybeUninit::::uninit(); + unsafe { + ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1); + s.assume_init() + } } } #[repr(C)] @@ -2155,7 +2370,11 @@ pub struct _Py_global_strings__bindgen_ty_2__bindgen_ty_22 { } impl Default for _Py_global_strings__bindgen_ty_2__bindgen_ty_22 { fn default() -> Self { - unsafe { ::std::mem::zeroed() } + let mut s = ::std::mem::MaybeUninit::::uninit(); + unsafe { + ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1); + s.assume_init() + } } } #[repr(C)] @@ -2166,7 +2385,11 @@ pub struct _Py_global_strings__bindgen_ty_2__bindgen_ty_23 { } impl Default for _Py_global_strings__bindgen_ty_2__bindgen_ty_23 { fn default() -> Self { - unsafe { ::std::mem::zeroed() } + let mut s = ::std::mem::MaybeUninit::::uninit(); + unsafe { + ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1); + s.assume_init() + } } } #[repr(C)] @@ -2177,7 +2400,11 @@ pub struct _Py_global_strings__bindgen_ty_2__bindgen_ty_24 { } impl Default for _Py_global_strings__bindgen_ty_2__bindgen_ty_24 { fn default() -> Self { - unsafe { ::std::mem::zeroed() } + let mut s = ::std::mem::MaybeUninit::::uninit(); + unsafe { + ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1); + s.assume_init() + } } } #[repr(C)] @@ -2188,7 +2415,11 @@ pub struct _Py_global_strings__bindgen_ty_2__bindgen_ty_25 { } impl Default for _Py_global_strings__bindgen_ty_2__bindgen_ty_25 { fn default() -> Self { - unsafe { ::std::mem::zeroed() } + let mut s = ::std::mem::MaybeUninit::::uninit(); + unsafe { + ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1); + s.assume_init() + } } } #[repr(C)] @@ -2199,7 +2430,11 @@ pub struct _Py_global_strings__bindgen_ty_2__bindgen_ty_26 { } impl Default for _Py_global_strings__bindgen_ty_2__bindgen_ty_26 { fn default() -> Self { - unsafe { ::std::mem::zeroed() } + let mut s = ::std::mem::MaybeUninit::::uninit(); + unsafe { + ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1); + s.assume_init() + } } } #[repr(C)] @@ -2210,7 +2445,11 @@ pub struct _Py_global_strings__bindgen_ty_2__bindgen_ty_27 { } impl Default for _Py_global_strings__bindgen_ty_2__bindgen_ty_27 { fn default() -> Self { - unsafe { ::std::mem::zeroed() } + let mut s = ::std::mem::MaybeUninit::::uninit(); + unsafe { + ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1); + s.assume_init() + } } } #[repr(C)] @@ -2221,7 +2460,11 @@ pub struct _Py_global_strings__bindgen_ty_2__bindgen_ty_28 { } impl Default for _Py_global_strings__bindgen_ty_2__bindgen_ty_28 { fn default() -> Self { - unsafe { ::std::mem::zeroed() } + let mut s = ::std::mem::MaybeUninit::::uninit(); + unsafe { + ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1); + s.assume_init() + } } } #[repr(C)] @@ -2232,7 +2475,11 @@ pub struct _Py_global_strings__bindgen_ty_2__bindgen_ty_29 { } impl Default for _Py_global_strings__bindgen_ty_2__bindgen_ty_29 { fn default() -> Self { - unsafe { ::std::mem::zeroed() } + let mut s = ::std::mem::MaybeUninit::::uninit(); + unsafe { + ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1); + s.assume_init() + } } } #[repr(C)] @@ -2243,7 +2490,11 @@ pub struct _Py_global_strings__bindgen_ty_2__bindgen_ty_30 { } impl Default for _Py_global_strings__bindgen_ty_2__bindgen_ty_30 { fn default() -> Self { - unsafe { ::std::mem::zeroed() } + let mut s = ::std::mem::MaybeUninit::::uninit(); + unsafe { + ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1); + s.assume_init() + } } } #[repr(C)] @@ -2254,7 +2505,11 @@ pub struct _Py_global_strings__bindgen_ty_2__bindgen_ty_31 { } impl Default for _Py_global_strings__bindgen_ty_2__bindgen_ty_31 { fn default() -> Self { - unsafe { ::std::mem::zeroed() } + let mut s = ::std::mem::MaybeUninit::::uninit(); + unsafe { + ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1); + s.assume_init() + } } } #[repr(C)] @@ -2265,7 +2520,11 @@ pub struct _Py_global_strings__bindgen_ty_2__bindgen_ty_32 { } impl Default for _Py_global_strings__bindgen_ty_2__bindgen_ty_32 { fn default() -> Self { - unsafe { ::std::mem::zeroed() } + let mut s = ::std::mem::MaybeUninit::::uninit(); + unsafe { + ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1); + s.assume_init() + } } } #[repr(C)] @@ -2276,7 +2535,11 @@ pub struct _Py_global_strings__bindgen_ty_2__bindgen_ty_33 { } impl Default for _Py_global_strings__bindgen_ty_2__bindgen_ty_33 { fn default() -> Self { - unsafe { ::std::mem::zeroed() } + let mut s = ::std::mem::MaybeUninit::::uninit(); + unsafe { + ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1); + s.assume_init() + } } } #[repr(C)] @@ -2287,7 +2550,11 @@ pub struct _Py_global_strings__bindgen_ty_2__bindgen_ty_34 { } impl Default for _Py_global_strings__bindgen_ty_2__bindgen_ty_34 { fn default() -> Self { - unsafe { ::std::mem::zeroed() } + let mut s = ::std::mem::MaybeUninit::::uninit(); + unsafe { + ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1); + s.assume_init() + } } } #[repr(C)] @@ -2298,7 +2565,11 @@ pub struct _Py_global_strings__bindgen_ty_2__bindgen_ty_35 { } impl Default for _Py_global_strings__bindgen_ty_2__bindgen_ty_35 { fn default() -> Self { - unsafe { ::std::mem::zeroed() } + let mut s = ::std::mem::MaybeUninit::::uninit(); + unsafe { + ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1); + s.assume_init() + } } } #[repr(C)] @@ -2309,7 +2580,11 @@ pub struct _Py_global_strings__bindgen_ty_2__bindgen_ty_36 { } impl Default for _Py_global_strings__bindgen_ty_2__bindgen_ty_36 { fn default() -> Self { - unsafe { ::std::mem::zeroed() } + let mut s = ::std::mem::MaybeUninit::::uninit(); + unsafe { + ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1); + s.assume_init() + } } } #[repr(C)] @@ -2320,7 +2595,11 @@ pub struct _Py_global_strings__bindgen_ty_2__bindgen_ty_37 { } impl Default for _Py_global_strings__bindgen_ty_2__bindgen_ty_37 { fn default() -> Self { - unsafe { ::std::mem::zeroed() } + let mut s = ::std::mem::MaybeUninit::::uninit(); + unsafe { + ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1); + s.assume_init() + } } } #[repr(C)] @@ -2331,7 +2610,11 @@ pub struct _Py_global_strings__bindgen_ty_2__bindgen_ty_38 { } impl Default for _Py_global_strings__bindgen_ty_2__bindgen_ty_38 { fn default() -> Self { - unsafe { ::std::mem::zeroed() } + let mut s = ::std::mem::MaybeUninit::::uninit(); + unsafe { + ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1); + s.assume_init() + } } } #[repr(C)] @@ -2342,7 +2625,11 @@ pub struct _Py_global_strings__bindgen_ty_2__bindgen_ty_39 { } impl Default for _Py_global_strings__bindgen_ty_2__bindgen_ty_39 { fn default() -> Self { - unsafe { ::std::mem::zeroed() } + let mut s = ::std::mem::MaybeUninit::::uninit(); + unsafe { + ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1); + s.assume_init() + } } } #[repr(C)] @@ -2353,7 +2640,11 @@ pub struct _Py_global_strings__bindgen_ty_2__bindgen_ty_40 { } impl Default for _Py_global_strings__bindgen_ty_2__bindgen_ty_40 { fn default() -> Self { - unsafe { ::std::mem::zeroed() } + let mut s = ::std::mem::MaybeUninit::::uninit(); + unsafe { + ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1); + s.assume_init() + } } } #[repr(C)] @@ -2364,7 +2655,11 @@ pub struct _Py_global_strings__bindgen_ty_2__bindgen_ty_41 { } impl Default for _Py_global_strings__bindgen_ty_2__bindgen_ty_41 { fn default() -> Self { - unsafe { ::std::mem::zeroed() } + let mut s = ::std::mem::MaybeUninit::::uninit(); + unsafe { + ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1); + s.assume_init() + } } } #[repr(C)] @@ -2375,7 +2670,11 @@ pub struct _Py_global_strings__bindgen_ty_2__bindgen_ty_42 { } impl Default for _Py_global_strings__bindgen_ty_2__bindgen_ty_42 { fn default() -> Self { - unsafe { ::std::mem::zeroed() } + let mut s = ::std::mem::MaybeUninit::::uninit(); + unsafe { + ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1); + s.assume_init() + } } } #[repr(C)] @@ -2386,7 +2685,11 @@ pub struct _Py_global_strings__bindgen_ty_2__bindgen_ty_43 { } impl Default for _Py_global_strings__bindgen_ty_2__bindgen_ty_43 { fn default() -> Self { - unsafe { ::std::mem::zeroed() } + let mut s = ::std::mem::MaybeUninit::::uninit(); + unsafe { + ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1); + s.assume_init() + } } } #[repr(C)] @@ -2397,7 +2700,11 @@ pub struct _Py_global_strings__bindgen_ty_2__bindgen_ty_44 { } impl Default for _Py_global_strings__bindgen_ty_2__bindgen_ty_44 { fn default() -> Self { - unsafe { ::std::mem::zeroed() } + let mut s = ::std::mem::MaybeUninit::::uninit(); + unsafe { + ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1); + s.assume_init() + } } } #[repr(C)] @@ -2408,7 +2715,11 @@ pub struct _Py_global_strings__bindgen_ty_2__bindgen_ty_45 { } impl Default for _Py_global_strings__bindgen_ty_2__bindgen_ty_45 { fn default() -> Self { - unsafe { ::std::mem::zeroed() } + let mut s = ::std::mem::MaybeUninit::::uninit(); + unsafe { + ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1); + s.assume_init() + } } } #[repr(C)] @@ -2419,7 +2730,11 @@ pub struct _Py_global_strings__bindgen_ty_2__bindgen_ty_46 { } impl Default for _Py_global_strings__bindgen_ty_2__bindgen_ty_46 { fn default() -> Self { - unsafe { ::std::mem::zeroed() } + let mut s = ::std::mem::MaybeUninit::::uninit(); + unsafe { + ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1); + s.assume_init() + } } } #[repr(C)] @@ -2430,7 +2745,11 @@ pub struct _Py_global_strings__bindgen_ty_2__bindgen_ty_47 { } impl Default for _Py_global_strings__bindgen_ty_2__bindgen_ty_47 { fn default() -> Self { - unsafe { ::std::mem::zeroed() } + let mut s = ::std::mem::MaybeUninit::::uninit(); + unsafe { + ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1); + s.assume_init() + } } } #[repr(C)] @@ -2441,7 +2760,11 @@ pub struct _Py_global_strings__bindgen_ty_2__bindgen_ty_48 { } impl Default for _Py_global_strings__bindgen_ty_2__bindgen_ty_48 { fn default() -> Self { - unsafe { ::std::mem::zeroed() } + let mut s = ::std::mem::MaybeUninit::::uninit(); + unsafe { + ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1); + s.assume_init() + } } } #[repr(C)] @@ -2452,7 +2775,11 @@ pub struct _Py_global_strings__bindgen_ty_2__bindgen_ty_49 { } impl Default for _Py_global_strings__bindgen_ty_2__bindgen_ty_49 { fn default() -> Self { - unsafe { ::std::mem::zeroed() } + let mut s = ::std::mem::MaybeUninit::::uninit(); + unsafe { + ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1); + s.assume_init() + } } } #[repr(C)] @@ -2463,7 +2790,11 @@ pub struct _Py_global_strings__bindgen_ty_2__bindgen_ty_50 { } impl Default for _Py_global_strings__bindgen_ty_2__bindgen_ty_50 { fn default() -> Self { - unsafe { ::std::mem::zeroed() } + let mut s = ::std::mem::MaybeUninit::::uninit(); + unsafe { + ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1); + s.assume_init() + } } } #[repr(C)] @@ -2474,7 +2805,11 @@ pub struct _Py_global_strings__bindgen_ty_2__bindgen_ty_51 { } impl Default for _Py_global_strings__bindgen_ty_2__bindgen_ty_51 { fn default() -> Self { - unsafe { ::std::mem::zeroed() } + let mut s = ::std::mem::MaybeUninit::::uninit(); + unsafe { + ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1); + s.assume_init() + } } } #[repr(C)] @@ -2485,7 +2820,11 @@ pub struct _Py_global_strings__bindgen_ty_2__bindgen_ty_52 { } impl Default for _Py_global_strings__bindgen_ty_2__bindgen_ty_52 { fn default() -> Self { - unsafe { ::std::mem::zeroed() } + let mut s = ::std::mem::MaybeUninit::::uninit(); + unsafe { + ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1); + s.assume_init() + } } } #[repr(C)] @@ -2496,7 +2835,11 @@ pub struct _Py_global_strings__bindgen_ty_2__bindgen_ty_53 { } impl Default for _Py_global_strings__bindgen_ty_2__bindgen_ty_53 { fn default() -> Self { - unsafe { ::std::mem::zeroed() } + let mut s = ::std::mem::MaybeUninit::::uninit(); + unsafe { + ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1); + s.assume_init() + } } } #[repr(C)] @@ -2507,7 +2850,11 @@ pub struct _Py_global_strings__bindgen_ty_2__bindgen_ty_54 { } impl Default for _Py_global_strings__bindgen_ty_2__bindgen_ty_54 { fn default() -> Self { - unsafe { ::std::mem::zeroed() } + let mut s = ::std::mem::MaybeUninit::::uninit(); + unsafe { + ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1); + s.assume_init() + } } } #[repr(C)] @@ -2518,7 +2865,11 @@ pub struct _Py_global_strings__bindgen_ty_2__bindgen_ty_55 { } impl Default for _Py_global_strings__bindgen_ty_2__bindgen_ty_55 { fn default() -> Self { - unsafe { ::std::mem::zeroed() } + let mut s = ::std::mem::MaybeUninit::::uninit(); + unsafe { + ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1); + s.assume_init() + } } } #[repr(C)] @@ -2529,7 +2880,11 @@ pub struct _Py_global_strings__bindgen_ty_2__bindgen_ty_56 { } impl Default for _Py_global_strings__bindgen_ty_2__bindgen_ty_56 { fn default() -> Self { - unsafe { ::std::mem::zeroed() } + let mut s = ::std::mem::MaybeUninit::::uninit(); + unsafe { + ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1); + s.assume_init() + } } } #[repr(C)] @@ -2540,7 +2895,11 @@ pub struct _Py_global_strings__bindgen_ty_2__bindgen_ty_57 { } impl Default for _Py_global_strings__bindgen_ty_2__bindgen_ty_57 { fn default() -> Self { - unsafe { ::std::mem::zeroed() } + let mut s = ::std::mem::MaybeUninit::::uninit(); + unsafe { + ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1); + s.assume_init() + } } } #[repr(C)] @@ -2551,7 +2910,11 @@ pub struct _Py_global_strings__bindgen_ty_2__bindgen_ty_58 { } impl Default for _Py_global_strings__bindgen_ty_2__bindgen_ty_58 { fn default() -> Self { - unsafe { ::std::mem::zeroed() } + let mut s = ::std::mem::MaybeUninit::::uninit(); + unsafe { + ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1); + s.assume_init() + } } } #[repr(C)] @@ -2562,7 +2925,11 @@ pub struct _Py_global_strings__bindgen_ty_2__bindgen_ty_59 { } impl Default for _Py_global_strings__bindgen_ty_2__bindgen_ty_59 { fn default() -> Self { - unsafe { ::std::mem::zeroed() } + let mut s = ::std::mem::MaybeUninit::::uninit(); + unsafe { + ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1); + s.assume_init() + } } } #[repr(C)] @@ -2573,7 +2940,11 @@ pub struct _Py_global_strings__bindgen_ty_2__bindgen_ty_60 { } impl Default for _Py_global_strings__bindgen_ty_2__bindgen_ty_60 { fn default() -> Self { - unsafe { ::std::mem::zeroed() } + let mut s = ::std::mem::MaybeUninit::::uninit(); + unsafe { + ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1); + s.assume_init() + } } } #[repr(C)] @@ -2584,7 +2955,11 @@ pub struct _Py_global_strings__bindgen_ty_2__bindgen_ty_61 { } impl Default for _Py_global_strings__bindgen_ty_2__bindgen_ty_61 { fn default() -> Self { - unsafe { ::std::mem::zeroed() } + let mut s = ::std::mem::MaybeUninit::::uninit(); + unsafe { + ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1); + s.assume_init() + } } } #[repr(C)] @@ -2595,7 +2970,11 @@ pub struct _Py_global_strings__bindgen_ty_2__bindgen_ty_62 { } impl Default for _Py_global_strings__bindgen_ty_2__bindgen_ty_62 { fn default() -> Self { - unsafe { ::std::mem::zeroed() } + let mut s = ::std::mem::MaybeUninit::::uninit(); + unsafe { + ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1); + s.assume_init() + } } } #[repr(C)] @@ -2606,7 +2985,11 @@ pub struct _Py_global_strings__bindgen_ty_2__bindgen_ty_63 { } impl Default for _Py_global_strings__bindgen_ty_2__bindgen_ty_63 { fn default() -> Self { - unsafe { ::std::mem::zeroed() } + let mut s = ::std::mem::MaybeUninit::::uninit(); + unsafe { + ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1); + s.assume_init() + } } } #[repr(C)] @@ -2617,7 +3000,11 @@ pub struct _Py_global_strings__bindgen_ty_2__bindgen_ty_64 { } impl Default for _Py_global_strings__bindgen_ty_2__bindgen_ty_64 { fn default() -> Self { - unsafe { ::std::mem::zeroed() } + let mut s = ::std::mem::MaybeUninit::::uninit(); + unsafe { + ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1); + s.assume_init() + } } } #[repr(C)] @@ -2628,7 +3015,11 @@ pub struct _Py_global_strings__bindgen_ty_2__bindgen_ty_65 { } impl Default for _Py_global_strings__bindgen_ty_2__bindgen_ty_65 { fn default() -> Self { - unsafe { ::std::mem::zeroed() } + let mut s = ::std::mem::MaybeUninit::::uninit(); + unsafe { + ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1); + s.assume_init() + } } } #[repr(C)] @@ -2639,7 +3030,11 @@ pub struct _Py_global_strings__bindgen_ty_2__bindgen_ty_66 { } impl Default for _Py_global_strings__bindgen_ty_2__bindgen_ty_66 { fn default() -> Self { - unsafe { ::std::mem::zeroed() } + let mut s = ::std::mem::MaybeUninit::::uninit(); + unsafe { + ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1); + s.assume_init() + } } } #[repr(C)] @@ -2650,7 +3045,11 @@ pub struct _Py_global_strings__bindgen_ty_2__bindgen_ty_67 { } impl Default for _Py_global_strings__bindgen_ty_2__bindgen_ty_67 { fn default() -> Self { - unsafe { ::std::mem::zeroed() } + let mut s = ::std::mem::MaybeUninit::::uninit(); + unsafe { + ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1); + s.assume_init() + } } } #[repr(C)] @@ -2661,7 +3060,11 @@ pub struct _Py_global_strings__bindgen_ty_2__bindgen_ty_68 { } impl Default for _Py_global_strings__bindgen_ty_2__bindgen_ty_68 { fn default() -> Self { - unsafe { ::std::mem::zeroed() } + let mut s = ::std::mem::MaybeUninit::::uninit(); + unsafe { + ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1); + s.assume_init() + } } } #[repr(C)] @@ -2672,7 +3075,11 @@ pub struct _Py_global_strings__bindgen_ty_2__bindgen_ty_69 { } impl Default for _Py_global_strings__bindgen_ty_2__bindgen_ty_69 { fn default() -> Self { - unsafe { ::std::mem::zeroed() } + let mut s = ::std::mem::MaybeUninit::::uninit(); + unsafe { + ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1); + s.assume_init() + } } } #[repr(C)] @@ -2683,7 +3090,11 @@ pub struct _Py_global_strings__bindgen_ty_2__bindgen_ty_70 { } impl Default for _Py_global_strings__bindgen_ty_2__bindgen_ty_70 { fn default() -> Self { - unsafe { ::std::mem::zeroed() } + let mut s = ::std::mem::MaybeUninit::::uninit(); + unsafe { + ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1); + s.assume_init() + } } } #[repr(C)] @@ -2694,7 +3105,11 @@ pub struct _Py_global_strings__bindgen_ty_2__bindgen_ty_71 { } impl Default for _Py_global_strings__bindgen_ty_2__bindgen_ty_71 { fn default() -> Self { - unsafe { ::std::mem::zeroed() } + let mut s = ::std::mem::MaybeUninit::::uninit(); + unsafe { + ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1); + s.assume_init() + } } } #[repr(C)] @@ -2705,7 +3120,11 @@ pub struct _Py_global_strings__bindgen_ty_2__bindgen_ty_72 { } impl Default for _Py_global_strings__bindgen_ty_2__bindgen_ty_72 { fn default() -> Self { - unsafe { ::std::mem::zeroed() } + let mut s = ::std::mem::MaybeUninit::::uninit(); + unsafe { + ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1); + s.assume_init() + } } } #[repr(C)] @@ -2716,7 +3135,11 @@ pub struct _Py_global_strings__bindgen_ty_2__bindgen_ty_73 { } impl Default for _Py_global_strings__bindgen_ty_2__bindgen_ty_73 { fn default() -> Self { - unsafe { ::std::mem::zeroed() } + let mut s = ::std::mem::MaybeUninit::::uninit(); + unsafe { + ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1); + s.assume_init() + } } } #[repr(C)] @@ -2727,7 +3150,11 @@ pub struct _Py_global_strings__bindgen_ty_2__bindgen_ty_74 { } impl Default for _Py_global_strings__bindgen_ty_2__bindgen_ty_74 { fn default() -> Self { - unsafe { ::std::mem::zeroed() } + let mut s = ::std::mem::MaybeUninit::::uninit(); + unsafe { + ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1); + s.assume_init() + } } } #[repr(C)] @@ -2738,7 +3165,11 @@ pub struct _Py_global_strings__bindgen_ty_2__bindgen_ty_75 { } impl Default for _Py_global_strings__bindgen_ty_2__bindgen_ty_75 { fn default() -> Self { - unsafe { ::std::mem::zeroed() } + let mut s = ::std::mem::MaybeUninit::::uninit(); + unsafe { + ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1); + s.assume_init() + } } } #[repr(C)] @@ -2749,7 +3180,11 @@ pub struct _Py_global_strings__bindgen_ty_2__bindgen_ty_76 { } impl Default for _Py_global_strings__bindgen_ty_2__bindgen_ty_76 { fn default() -> Self { - unsafe { ::std::mem::zeroed() } + let mut s = ::std::mem::MaybeUninit::::uninit(); + unsafe { + ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1); + s.assume_init() + } } } #[repr(C)] @@ -2760,7 +3195,11 @@ pub struct _Py_global_strings__bindgen_ty_2__bindgen_ty_77 { } impl Default for _Py_global_strings__bindgen_ty_2__bindgen_ty_77 { fn default() -> Self { - unsafe { ::std::mem::zeroed() } + let mut s = ::std::mem::MaybeUninit::::uninit(); + unsafe { + ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1); + s.assume_init() + } } } #[repr(C)] @@ -2771,7 +3210,11 @@ pub struct _Py_global_strings__bindgen_ty_2__bindgen_ty_78 { } impl Default for _Py_global_strings__bindgen_ty_2__bindgen_ty_78 { fn default() -> Self { - unsafe { ::std::mem::zeroed() } + let mut s = ::std::mem::MaybeUninit::::uninit(); + unsafe { + ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1); + s.assume_init() + } } } #[repr(C)] @@ -2782,7 +3225,11 @@ pub struct _Py_global_strings__bindgen_ty_2__bindgen_ty_79 { } impl Default for _Py_global_strings__bindgen_ty_2__bindgen_ty_79 { fn default() -> Self { - unsafe { ::std::mem::zeroed() } + let mut s = ::std::mem::MaybeUninit::::uninit(); + unsafe { + ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1); + s.assume_init() + } } } #[repr(C)] @@ -2793,7 +3240,11 @@ pub struct _Py_global_strings__bindgen_ty_2__bindgen_ty_80 { } impl Default for _Py_global_strings__bindgen_ty_2__bindgen_ty_80 { fn default() -> Self { - unsafe { ::std::mem::zeroed() } + let mut s = ::std::mem::MaybeUninit::::uninit(); + unsafe { + ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1); + s.assume_init() + } } } #[repr(C)] @@ -2804,7 +3255,11 @@ pub struct _Py_global_strings__bindgen_ty_2__bindgen_ty_81 { } impl Default for _Py_global_strings__bindgen_ty_2__bindgen_ty_81 { fn default() -> Self { - unsafe { ::std::mem::zeroed() } + let mut s = ::std::mem::MaybeUninit::::uninit(); + unsafe { + ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1); + s.assume_init() + } } } #[repr(C)] @@ -2815,7 +3270,11 @@ pub struct _Py_global_strings__bindgen_ty_2__bindgen_ty_82 { } impl Default for _Py_global_strings__bindgen_ty_2__bindgen_ty_82 { fn default() -> Self { - unsafe { ::std::mem::zeroed() } + let mut s = ::std::mem::MaybeUninit::::uninit(); + unsafe { + ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1); + s.assume_init() + } } } #[repr(C)] @@ -2826,7 +3285,11 @@ pub struct _Py_global_strings__bindgen_ty_2__bindgen_ty_83 { } impl Default for _Py_global_strings__bindgen_ty_2__bindgen_ty_83 { fn default() -> Self { - unsafe { ::std::mem::zeroed() } + let mut s = ::std::mem::MaybeUninit::::uninit(); + unsafe { + ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1); + s.assume_init() + } } } #[repr(C)] @@ -2837,7 +3300,11 @@ pub struct _Py_global_strings__bindgen_ty_2__bindgen_ty_84 { } impl Default for _Py_global_strings__bindgen_ty_2__bindgen_ty_84 { fn default() -> Self { - unsafe { ::std::mem::zeroed() } + let mut s = ::std::mem::MaybeUninit::::uninit(); + unsafe { + ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1); + s.assume_init() + } } } #[repr(C)] @@ -2848,7 +3315,11 @@ pub struct _Py_global_strings__bindgen_ty_2__bindgen_ty_85 { } impl Default for _Py_global_strings__bindgen_ty_2__bindgen_ty_85 { fn default() -> Self { - unsafe { ::std::mem::zeroed() } + let mut s = ::std::mem::MaybeUninit::::uninit(); + unsafe { + ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1); + s.assume_init() + } } } #[repr(C)] @@ -2859,7 +3330,11 @@ pub struct _Py_global_strings__bindgen_ty_2__bindgen_ty_86 { } impl Default for _Py_global_strings__bindgen_ty_2__bindgen_ty_86 { fn default() -> Self { - unsafe { ::std::mem::zeroed() } + let mut s = ::std::mem::MaybeUninit::::uninit(); + unsafe { + ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1); + s.assume_init() + } } } #[repr(C)] @@ -2870,7 +3345,11 @@ pub struct _Py_global_strings__bindgen_ty_2__bindgen_ty_87 { } impl Default for _Py_global_strings__bindgen_ty_2__bindgen_ty_87 { fn default() -> Self { - unsafe { ::std::mem::zeroed() } + let mut s = ::std::mem::MaybeUninit::::uninit(); + unsafe { + ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1); + s.assume_init() + } } } #[repr(C)] @@ -2881,7 +3360,11 @@ pub struct _Py_global_strings__bindgen_ty_2__bindgen_ty_88 { } impl Default for _Py_global_strings__bindgen_ty_2__bindgen_ty_88 { fn default() -> Self { - unsafe { ::std::mem::zeroed() } + let mut s = ::std::mem::MaybeUninit::::uninit(); + unsafe { + ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1); + s.assume_init() + } } } #[repr(C)] @@ -2892,7 +3375,11 @@ pub struct _Py_global_strings__bindgen_ty_2__bindgen_ty_89 { } impl Default for _Py_global_strings__bindgen_ty_2__bindgen_ty_89 { fn default() -> Self { - unsafe { ::std::mem::zeroed() } + let mut s = ::std::mem::MaybeUninit::::uninit(); + unsafe { + ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1); + s.assume_init() + } } } #[repr(C)] @@ -2903,7 +3390,11 @@ pub struct _Py_global_strings__bindgen_ty_2__bindgen_ty_90 { } impl Default for _Py_global_strings__bindgen_ty_2__bindgen_ty_90 { fn default() -> Self { - unsafe { ::std::mem::zeroed() } + let mut s = ::std::mem::MaybeUninit::::uninit(); + unsafe { + ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1); + s.assume_init() + } } } #[repr(C)] @@ -2914,7 +3405,11 @@ pub struct _Py_global_strings__bindgen_ty_2__bindgen_ty_91 { } impl Default for _Py_global_strings__bindgen_ty_2__bindgen_ty_91 { fn default() -> Self { - unsafe { ::std::mem::zeroed() } + let mut s = ::std::mem::MaybeUninit::::uninit(); + unsafe { + ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1); + s.assume_init() + } } } #[repr(C)] @@ -2925,7 +3420,11 @@ pub struct _Py_global_strings__bindgen_ty_2__bindgen_ty_92 { } impl Default for _Py_global_strings__bindgen_ty_2__bindgen_ty_92 { fn default() -> Self { - unsafe { ::std::mem::zeroed() } + let mut s = ::std::mem::MaybeUninit::::uninit(); + unsafe { + ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1); + s.assume_init() + } } } #[repr(C)] @@ -2936,7 +3435,11 @@ pub struct _Py_global_strings__bindgen_ty_2__bindgen_ty_93 { } impl Default for _Py_global_strings__bindgen_ty_2__bindgen_ty_93 { fn default() -> Self { - unsafe { ::std::mem::zeroed() } + let mut s = ::std::mem::MaybeUninit::::uninit(); + unsafe { + ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1); + s.assume_init() + } } } #[repr(C)] @@ -2947,7 +3450,11 @@ pub struct _Py_global_strings__bindgen_ty_2__bindgen_ty_94 { } impl Default for _Py_global_strings__bindgen_ty_2__bindgen_ty_94 { fn default() -> Self { - unsafe { ::std::mem::zeroed() } + let mut s = ::std::mem::MaybeUninit::::uninit(); + unsafe { + ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1); + s.assume_init() + } } } #[repr(C)] @@ -2958,7 +3465,11 @@ pub struct _Py_global_strings__bindgen_ty_2__bindgen_ty_95 { } impl Default for _Py_global_strings__bindgen_ty_2__bindgen_ty_95 { fn default() -> Self { - unsafe { ::std::mem::zeroed() } + let mut s = ::std::mem::MaybeUninit::::uninit(); + unsafe { + ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1); + s.assume_init() + } } } #[repr(C)] @@ -2969,7 +3480,11 @@ pub struct _Py_global_strings__bindgen_ty_2__bindgen_ty_96 { } impl Default for _Py_global_strings__bindgen_ty_2__bindgen_ty_96 { fn default() -> Self { - unsafe { ::std::mem::zeroed() } + let mut s = ::std::mem::MaybeUninit::::uninit(); + unsafe { + ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1); + s.assume_init() + } } } #[repr(C)] @@ -2980,7 +3495,11 @@ pub struct _Py_global_strings__bindgen_ty_2__bindgen_ty_97 { } impl Default for _Py_global_strings__bindgen_ty_2__bindgen_ty_97 { fn default() -> Self { - unsafe { ::std::mem::zeroed() } + let mut s = ::std::mem::MaybeUninit::::uninit(); + unsafe { + ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1); + s.assume_init() + } } } #[repr(C)] @@ -2991,7 +3510,11 @@ pub struct _Py_global_strings__bindgen_ty_2__bindgen_ty_98 { } impl Default for _Py_global_strings__bindgen_ty_2__bindgen_ty_98 { fn default() -> Self { - unsafe { ::std::mem::zeroed() } + let mut s = ::std::mem::MaybeUninit::::uninit(); + unsafe { + ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1); + s.assume_init() + } } } #[repr(C)] @@ -3002,7 +3525,11 @@ pub struct _Py_global_strings__bindgen_ty_2__bindgen_ty_99 { } impl Default for _Py_global_strings__bindgen_ty_2__bindgen_ty_99 { fn default() -> Self { - unsafe { ::std::mem::zeroed() } + let mut s = ::std::mem::MaybeUninit::::uninit(); + unsafe { + ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1); + s.assume_init() + } } } #[repr(C)] @@ -3013,7 +3540,11 @@ pub struct _Py_global_strings__bindgen_ty_2__bindgen_ty_100 { } impl Default for _Py_global_strings__bindgen_ty_2__bindgen_ty_100 { fn default() -> Self { - unsafe { ::std::mem::zeroed() } + let mut s = ::std::mem::MaybeUninit::::uninit(); + unsafe { + ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1); + s.assume_init() + } } } #[repr(C)] @@ -3024,7 +3555,11 @@ pub struct _Py_global_strings__bindgen_ty_2__bindgen_ty_101 { } impl Default for _Py_global_strings__bindgen_ty_2__bindgen_ty_101 { fn default() -> Self { - unsafe { ::std::mem::zeroed() } + let mut s = ::std::mem::MaybeUninit::::uninit(); + unsafe { + ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1); + s.assume_init() + } } } #[repr(C)] @@ -3035,7 +3570,11 @@ pub struct _Py_global_strings__bindgen_ty_2__bindgen_ty_102 { } impl Default for _Py_global_strings__bindgen_ty_2__bindgen_ty_102 { fn default() -> Self { - unsafe { ::std::mem::zeroed() } + let mut s = ::std::mem::MaybeUninit::::uninit(); + unsafe { + ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1); + s.assume_init() + } } } #[repr(C)] @@ -3046,7 +3585,11 @@ pub struct _Py_global_strings__bindgen_ty_2__bindgen_ty_103 { } impl Default for _Py_global_strings__bindgen_ty_2__bindgen_ty_103 { fn default() -> Self { - unsafe { ::std::mem::zeroed() } + let mut s = ::std::mem::MaybeUninit::::uninit(); + unsafe { + ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1); + s.assume_init() + } } } #[repr(C)] @@ -3057,7 +3600,11 @@ pub struct _Py_global_strings__bindgen_ty_2__bindgen_ty_104 { } impl Default for _Py_global_strings__bindgen_ty_2__bindgen_ty_104 { fn default() -> Self { - unsafe { ::std::mem::zeroed() } + let mut s = ::std::mem::MaybeUninit::::uninit(); + unsafe { + ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1); + s.assume_init() + } } } #[repr(C)] @@ -3068,7 +3615,11 @@ pub struct _Py_global_strings__bindgen_ty_2__bindgen_ty_105 { } impl Default for _Py_global_strings__bindgen_ty_2__bindgen_ty_105 { fn default() -> Self { - unsafe { ::std::mem::zeroed() } + let mut s = ::std::mem::MaybeUninit::::uninit(); + unsafe { + ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1); + s.assume_init() + } } } #[repr(C)] @@ -3079,7 +3630,11 @@ pub struct _Py_global_strings__bindgen_ty_2__bindgen_ty_106 { } impl Default for _Py_global_strings__bindgen_ty_2__bindgen_ty_106 { fn default() -> Self { - unsafe { ::std::mem::zeroed() } + let mut s = ::std::mem::MaybeUninit::::uninit(); + unsafe { + ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1); + s.assume_init() + } } } #[repr(C)] @@ -3090,7 +3645,11 @@ pub struct _Py_global_strings__bindgen_ty_2__bindgen_ty_107 { } impl Default for _Py_global_strings__bindgen_ty_2__bindgen_ty_107 { fn default() -> Self { - unsafe { ::std::mem::zeroed() } + let mut s = ::std::mem::MaybeUninit::::uninit(); + unsafe { + ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1); + s.assume_init() + } } } #[repr(C)] @@ -3101,7 +3660,11 @@ pub struct _Py_global_strings__bindgen_ty_2__bindgen_ty_108 { } impl Default for _Py_global_strings__bindgen_ty_2__bindgen_ty_108 { fn default() -> Self { - unsafe { ::std::mem::zeroed() } + let mut s = ::std::mem::MaybeUninit::::uninit(); + unsafe { + ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1); + s.assume_init() + } } } #[repr(C)] @@ -3112,7 +3675,11 @@ pub struct _Py_global_strings__bindgen_ty_2__bindgen_ty_109 { } impl Default for _Py_global_strings__bindgen_ty_2__bindgen_ty_109 { fn default() -> Self { - unsafe { ::std::mem::zeroed() } + let mut s = ::std::mem::MaybeUninit::::uninit(); + unsafe { + ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1); + s.assume_init() + } } } #[repr(C)] @@ -3123,7 +3690,11 @@ pub struct _Py_global_strings__bindgen_ty_2__bindgen_ty_110 { } impl Default for _Py_global_strings__bindgen_ty_2__bindgen_ty_110 { fn default() -> Self { - unsafe { ::std::mem::zeroed() } + let mut s = ::std::mem::MaybeUninit::::uninit(); + unsafe { + ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1); + s.assume_init() + } } } #[repr(C)] @@ -3134,7 +3705,11 @@ pub struct _Py_global_strings__bindgen_ty_2__bindgen_ty_111 { } impl Default for _Py_global_strings__bindgen_ty_2__bindgen_ty_111 { fn default() -> Self { - unsafe { ::std::mem::zeroed() } + let mut s = ::std::mem::MaybeUninit::::uninit(); + unsafe { + ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1); + s.assume_init() + } } } #[repr(C)] @@ -3145,7 +3720,11 @@ pub struct _Py_global_strings__bindgen_ty_2__bindgen_ty_112 { } impl Default for _Py_global_strings__bindgen_ty_2__bindgen_ty_112 { fn default() -> Self { - unsafe { ::std::mem::zeroed() } + let mut s = ::std::mem::MaybeUninit::::uninit(); + unsafe { + ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1); + s.assume_init() + } } } #[repr(C)] @@ -3156,7 +3735,11 @@ pub struct _Py_global_strings__bindgen_ty_2__bindgen_ty_113 { } impl Default for _Py_global_strings__bindgen_ty_2__bindgen_ty_113 { fn default() -> Self { - unsafe { ::std::mem::zeroed() } + let mut s = ::std::mem::MaybeUninit::::uninit(); + unsafe { + ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1); + s.assume_init() + } } } #[repr(C)] @@ -3167,7 +3750,11 @@ pub struct _Py_global_strings__bindgen_ty_2__bindgen_ty_114 { } impl Default for _Py_global_strings__bindgen_ty_2__bindgen_ty_114 { fn default() -> Self { - unsafe { ::std::mem::zeroed() } + let mut s = ::std::mem::MaybeUninit::::uninit(); + unsafe { + ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1); + s.assume_init() + } } } #[repr(C)] @@ -3178,7 +3765,11 @@ pub struct _Py_global_strings__bindgen_ty_2__bindgen_ty_115 { } impl Default for _Py_global_strings__bindgen_ty_2__bindgen_ty_115 { fn default() -> Self { - unsafe { ::std::mem::zeroed() } + let mut s = ::std::mem::MaybeUninit::::uninit(); + unsafe { + ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1); + s.assume_init() + } } } #[repr(C)] @@ -3189,7 +3780,11 @@ pub struct _Py_global_strings__bindgen_ty_2__bindgen_ty_116 { } impl Default for _Py_global_strings__bindgen_ty_2__bindgen_ty_116 { fn default() -> Self { - unsafe { ::std::mem::zeroed() } + let mut s = ::std::mem::MaybeUninit::::uninit(); + unsafe { + ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1); + s.assume_init() + } } } #[repr(C)] @@ -3200,7 +3795,11 @@ pub struct _Py_global_strings__bindgen_ty_2__bindgen_ty_117 { } impl Default for _Py_global_strings__bindgen_ty_2__bindgen_ty_117 { fn default() -> Self { - unsafe { ::std::mem::zeroed() } + let mut s = ::std::mem::MaybeUninit::::uninit(); + unsafe { + ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1); + s.assume_init() + } } } #[repr(C)] @@ -3211,7 +3810,11 @@ pub struct _Py_global_strings__bindgen_ty_2__bindgen_ty_118 { } impl Default for _Py_global_strings__bindgen_ty_2__bindgen_ty_118 { fn default() -> Self { - unsafe { ::std::mem::zeroed() } + let mut s = ::std::mem::MaybeUninit::::uninit(); + unsafe { + ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1); + s.assume_init() + } } } #[repr(C)] @@ -3222,7 +3825,11 @@ pub struct _Py_global_strings__bindgen_ty_2__bindgen_ty_119 { } impl Default for _Py_global_strings__bindgen_ty_2__bindgen_ty_119 { fn default() -> Self { - unsafe { ::std::mem::zeroed() } + let mut s = ::std::mem::MaybeUninit::::uninit(); + unsafe { + ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1); + s.assume_init() + } } } #[repr(C)] @@ -3233,7 +3840,11 @@ pub struct _Py_global_strings__bindgen_ty_2__bindgen_ty_120 { } impl Default for _Py_global_strings__bindgen_ty_2__bindgen_ty_120 { fn default() -> Self { - unsafe { ::std::mem::zeroed() } + let mut s = ::std::mem::MaybeUninit::::uninit(); + unsafe { + ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1); + s.assume_init() + } } } #[repr(C)] @@ -3244,7 +3855,11 @@ pub struct _Py_global_strings__bindgen_ty_2__bindgen_ty_121 { } impl Default for _Py_global_strings__bindgen_ty_2__bindgen_ty_121 { fn default() -> Self { - unsafe { ::std::mem::zeroed() } + let mut s = ::std::mem::MaybeUninit::::uninit(); + unsafe { + ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1); + s.assume_init() + } } } #[repr(C)] @@ -3255,7 +3870,11 @@ pub struct _Py_global_strings__bindgen_ty_2__bindgen_ty_122 { } impl Default for _Py_global_strings__bindgen_ty_2__bindgen_ty_122 { fn default() -> Self { - unsafe { ::std::mem::zeroed() } + let mut s = ::std::mem::MaybeUninit::::uninit(); + unsafe { + ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1); + s.assume_init() + } } } #[repr(C)] @@ -3266,7 +3885,11 @@ pub struct _Py_global_strings__bindgen_ty_2__bindgen_ty_123 { } impl Default for _Py_global_strings__bindgen_ty_2__bindgen_ty_123 { fn default() -> Self { - unsafe { ::std::mem::zeroed() } + let mut s = ::std::mem::MaybeUninit::::uninit(); + unsafe { + ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1); + s.assume_init() + } } } #[repr(C)] @@ -3277,7 +3900,11 @@ pub struct _Py_global_strings__bindgen_ty_2__bindgen_ty_124 { } impl Default for _Py_global_strings__bindgen_ty_2__bindgen_ty_124 { fn default() -> Self { - unsafe { ::std::mem::zeroed() } + let mut s = ::std::mem::MaybeUninit::::uninit(); + unsafe { + ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1); + s.assume_init() + } } } #[repr(C)] @@ -3288,7 +3915,11 @@ pub struct _Py_global_strings__bindgen_ty_2__bindgen_ty_125 { } impl Default for _Py_global_strings__bindgen_ty_2__bindgen_ty_125 { fn default() -> Self { - unsafe { ::std::mem::zeroed() } + let mut s = ::std::mem::MaybeUninit::::uninit(); + unsafe { + ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1); + s.assume_init() + } } } #[repr(C)] @@ -3299,7 +3930,11 @@ pub struct _Py_global_strings__bindgen_ty_2__bindgen_ty_126 { } impl Default for _Py_global_strings__bindgen_ty_2__bindgen_ty_126 { fn default() -> Self { - unsafe { ::std::mem::zeroed() } + let mut s = ::std::mem::MaybeUninit::::uninit(); + unsafe { + ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1); + s.assume_init() + } } } #[repr(C)] @@ -3310,7 +3945,11 @@ pub struct _Py_global_strings__bindgen_ty_2__bindgen_ty_127 { } impl Default for _Py_global_strings__bindgen_ty_2__bindgen_ty_127 { fn default() -> Self { - unsafe { ::std::mem::zeroed() } + let mut s = ::std::mem::MaybeUninit::::uninit(); + unsafe { + ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1); + s.assume_init() + } } } #[repr(C)] @@ -3321,7 +3960,11 @@ pub struct _Py_global_strings__bindgen_ty_2__bindgen_ty_128 { } impl Default for _Py_global_strings__bindgen_ty_2__bindgen_ty_128 { fn default() -> Self { - unsafe { ::std::mem::zeroed() } + let mut s = ::std::mem::MaybeUninit::::uninit(); + unsafe { + ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1); + s.assume_init() + } } } #[repr(C)] @@ -3332,7 +3975,11 @@ pub struct _Py_global_strings__bindgen_ty_2__bindgen_ty_129 { } impl Default for _Py_global_strings__bindgen_ty_2__bindgen_ty_129 { fn default() -> Self { - unsafe { ::std::mem::zeroed() } + let mut s = ::std::mem::MaybeUninit::::uninit(); + unsafe { + ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1); + s.assume_init() + } } } #[repr(C)] @@ -3343,7 +3990,11 @@ pub struct _Py_global_strings__bindgen_ty_2__bindgen_ty_130 { } impl Default for _Py_global_strings__bindgen_ty_2__bindgen_ty_130 { fn default() -> Self { - unsafe { ::std::mem::zeroed() } + let mut s = ::std::mem::MaybeUninit::::uninit(); + unsafe { + ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1); + s.assume_init() + } } } #[repr(C)] @@ -3354,7 +4005,11 @@ pub struct _Py_global_strings__bindgen_ty_2__bindgen_ty_131 { } impl Default for _Py_global_strings__bindgen_ty_2__bindgen_ty_131 { fn default() -> Self { - unsafe { ::std::mem::zeroed() } + let mut s = ::std::mem::MaybeUninit::::uninit(); + unsafe { + ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1); + s.assume_init() + } } } #[repr(C)] @@ -3365,7 +4020,11 @@ pub struct _Py_global_strings__bindgen_ty_2__bindgen_ty_132 { } impl Default for _Py_global_strings__bindgen_ty_2__bindgen_ty_132 { fn default() -> Self { - unsafe { ::std::mem::zeroed() } + let mut s = ::std::mem::MaybeUninit::::uninit(); + unsafe { + ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1); + s.assume_init() + } } } #[repr(C)] @@ -3376,7 +4035,11 @@ pub struct _Py_global_strings__bindgen_ty_2__bindgen_ty_133 { } impl Default for _Py_global_strings__bindgen_ty_2__bindgen_ty_133 { fn default() -> Self { - unsafe { ::std::mem::zeroed() } + let mut s = ::std::mem::MaybeUninit::::uninit(); + unsafe { + ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1); + s.assume_init() + } } } #[repr(C)] @@ -3387,7 +4050,11 @@ pub struct _Py_global_strings__bindgen_ty_2__bindgen_ty_134 { } impl Default for _Py_global_strings__bindgen_ty_2__bindgen_ty_134 { fn default() -> Self { - unsafe { ::std::mem::zeroed() } + let mut s = ::std::mem::MaybeUninit::::uninit(); + unsafe { + ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1); + s.assume_init() + } } } #[repr(C)] @@ -3398,7 +4065,11 @@ pub struct _Py_global_strings__bindgen_ty_2__bindgen_ty_135 { } impl Default for _Py_global_strings__bindgen_ty_2__bindgen_ty_135 { fn default() -> Self { - unsafe { ::std::mem::zeroed() } + let mut s = ::std::mem::MaybeUninit::::uninit(); + unsafe { + ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1); + s.assume_init() + } } } #[repr(C)] @@ -3409,7 +4080,11 @@ pub struct _Py_global_strings__bindgen_ty_2__bindgen_ty_136 { } impl Default for _Py_global_strings__bindgen_ty_2__bindgen_ty_136 { fn default() -> Self { - unsafe { ::std::mem::zeroed() } + let mut s = ::std::mem::MaybeUninit::::uninit(); + unsafe { + ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1); + s.assume_init() + } } } #[repr(C)] @@ -3420,7 +4095,11 @@ pub struct _Py_global_strings__bindgen_ty_2__bindgen_ty_137 { } impl Default for _Py_global_strings__bindgen_ty_2__bindgen_ty_137 { fn default() -> Self { - unsafe { ::std::mem::zeroed() } + let mut s = ::std::mem::MaybeUninit::::uninit(); + unsafe { + ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1); + s.assume_init() + } } } #[repr(C)] @@ -3431,7 +4110,11 @@ pub struct _Py_global_strings__bindgen_ty_2__bindgen_ty_138 { } impl Default for _Py_global_strings__bindgen_ty_2__bindgen_ty_138 { fn default() -> Self { - unsafe { ::std::mem::zeroed() } + let mut s = ::std::mem::MaybeUninit::::uninit(); + unsafe { + ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1); + s.assume_init() + } } } #[repr(C)] @@ -3442,7 +4125,11 @@ pub struct _Py_global_strings__bindgen_ty_2__bindgen_ty_139 { } impl Default for _Py_global_strings__bindgen_ty_2__bindgen_ty_139 { fn default() -> Self { - unsafe { ::std::mem::zeroed() } + let mut s = ::std::mem::MaybeUninit::::uninit(); + unsafe { + ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1); + s.assume_init() + } } } #[repr(C)] @@ -3453,7 +4140,11 @@ pub struct _Py_global_strings__bindgen_ty_2__bindgen_ty_140 { } impl Default for _Py_global_strings__bindgen_ty_2__bindgen_ty_140 { fn default() -> Self { - unsafe { ::std::mem::zeroed() } + let mut s = ::std::mem::MaybeUninit::::uninit(); + unsafe { + ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1); + s.assume_init() + } } } #[repr(C)] @@ -3464,7 +4155,11 @@ pub struct _Py_global_strings__bindgen_ty_2__bindgen_ty_141 { } impl Default for _Py_global_strings__bindgen_ty_2__bindgen_ty_141 { fn default() -> Self { - unsafe { ::std::mem::zeroed() } + let mut s = ::std::mem::MaybeUninit::::uninit(); + unsafe { + ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1); + s.assume_init() + } } } #[repr(C)] @@ -3475,7 +4170,11 @@ pub struct _Py_global_strings__bindgen_ty_2__bindgen_ty_142 { } impl Default for _Py_global_strings__bindgen_ty_2__bindgen_ty_142 { fn default() -> Self { - unsafe { ::std::mem::zeroed() } + let mut s = ::std::mem::MaybeUninit::::uninit(); + unsafe { + ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1); + s.assume_init() + } } } #[repr(C)] @@ -3486,7 +4185,11 @@ pub struct _Py_global_strings__bindgen_ty_2__bindgen_ty_143 { } impl Default for _Py_global_strings__bindgen_ty_2__bindgen_ty_143 { fn default() -> Self { - unsafe { ::std::mem::zeroed() } + let mut s = ::std::mem::MaybeUninit::::uninit(); + unsafe { + ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1); + s.assume_init() + } } } #[repr(C)] @@ -3497,7 +4200,11 @@ pub struct _Py_global_strings__bindgen_ty_2__bindgen_ty_144 { } impl Default for _Py_global_strings__bindgen_ty_2__bindgen_ty_144 { fn default() -> Self { - unsafe { ::std::mem::zeroed() } + let mut s = ::std::mem::MaybeUninit::::uninit(); + unsafe { + ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1); + s.assume_init() + } } } #[repr(C)] @@ -3508,7 +4215,11 @@ pub struct _Py_global_strings__bindgen_ty_2__bindgen_ty_145 { } impl Default for _Py_global_strings__bindgen_ty_2__bindgen_ty_145 { fn default() -> Self { - unsafe { ::std::mem::zeroed() } + let mut s = ::std::mem::MaybeUninit::::uninit(); + unsafe { + ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1); + s.assume_init() + } } } #[repr(C)] @@ -3519,7 +4230,11 @@ pub struct _Py_global_strings__bindgen_ty_2__bindgen_ty_146 { } impl Default for _Py_global_strings__bindgen_ty_2__bindgen_ty_146 { fn default() -> Self { - unsafe { ::std::mem::zeroed() } + let mut s = ::std::mem::MaybeUninit::::uninit(); + unsafe { + ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1); + s.assume_init() + } } } #[repr(C)] @@ -3530,7 +4245,11 @@ pub struct _Py_global_strings__bindgen_ty_2__bindgen_ty_147 { } impl Default for _Py_global_strings__bindgen_ty_2__bindgen_ty_147 { fn default() -> Self { - unsafe { ::std::mem::zeroed() } + let mut s = ::std::mem::MaybeUninit::::uninit(); + unsafe { + ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1); + s.assume_init() + } } } #[repr(C)] @@ -3541,7 +4260,11 @@ pub struct _Py_global_strings__bindgen_ty_2__bindgen_ty_148 { } impl Default for _Py_global_strings__bindgen_ty_2__bindgen_ty_148 { fn default() -> Self { - unsafe { ::std::mem::zeroed() } + let mut s = ::std::mem::MaybeUninit::::uninit(); + unsafe { + ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1); + s.assume_init() + } } } #[repr(C)] @@ -3552,18 +4275,26 @@ pub struct _Py_global_strings__bindgen_ty_2__bindgen_ty_149 { } impl Default for _Py_global_strings__bindgen_ty_2__bindgen_ty_149 { fn default() -> Self { - unsafe { ::std::mem::zeroed() } + let mut s = ::std::mem::MaybeUninit::::uninit(); + unsafe { + ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1); + s.assume_init() + } } } #[repr(C)] -#[derive(Copy, Clone)] +#[derive(Debug, Copy, Clone)] pub struct _Py_global_strings__bindgen_ty_2__bindgen_ty_150 { pub _ascii: PyASCIIObject, pub _data: [u8; 36usize], } impl Default for _Py_global_strings__bindgen_ty_2__bindgen_ty_150 { fn default() -> Self { - unsafe { ::std::mem::zeroed() } + let mut s = ::std::mem::MaybeUninit::::uninit(); + unsafe { + ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1); + s.assume_init() + } } } #[repr(C)] @@ -3574,7 +4305,11 @@ pub struct _Py_global_strings__bindgen_ty_2__bindgen_ty_151 { } impl Default for _Py_global_strings__bindgen_ty_2__bindgen_ty_151 { fn default() -> Self { - unsafe { ::std::mem::zeroed() } + let mut s = ::std::mem::MaybeUninit::::uninit(); + unsafe { + ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1); + s.assume_init() + } } } #[repr(C)] @@ -3585,7 +4320,11 @@ pub struct _Py_global_strings__bindgen_ty_2__bindgen_ty_152 { } impl Default for _Py_global_strings__bindgen_ty_2__bindgen_ty_152 { fn default() -> Self { - unsafe { ::std::mem::zeroed() } + let mut s = ::std::mem::MaybeUninit::::uninit(); + unsafe { + ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1); + s.assume_init() + } } } #[repr(C)] @@ -3596,7 +4335,11 @@ pub struct _Py_global_strings__bindgen_ty_2__bindgen_ty_153 { } impl Default for _Py_global_strings__bindgen_ty_2__bindgen_ty_153 { fn default() -> Self { - unsafe { ::std::mem::zeroed() } + let mut s = ::std::mem::MaybeUninit::::uninit(); + unsafe { + ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1); + s.assume_init() + } } } #[repr(C)] @@ -3607,7 +4350,11 @@ pub struct _Py_global_strings__bindgen_ty_2__bindgen_ty_154 { } impl Default for _Py_global_strings__bindgen_ty_2__bindgen_ty_154 { fn default() -> Self { - unsafe { ::std::mem::zeroed() } + let mut s = ::std::mem::MaybeUninit::::uninit(); + unsafe { + ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1); + s.assume_init() + } } } #[repr(C)] @@ -3618,7 +4365,11 @@ pub struct _Py_global_strings__bindgen_ty_2__bindgen_ty_155 { } impl Default for _Py_global_strings__bindgen_ty_2__bindgen_ty_155 { fn default() -> Self { - unsafe { ::std::mem::zeroed() } + let mut s = ::std::mem::MaybeUninit::::uninit(); + unsafe { + ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1); + s.assume_init() + } } } #[repr(C)] @@ -3629,7 +4380,11 @@ pub struct _Py_global_strings__bindgen_ty_2__bindgen_ty_156 { } impl Default for _Py_global_strings__bindgen_ty_2__bindgen_ty_156 { fn default() -> Self { - unsafe { ::std::mem::zeroed() } + let mut s = ::std::mem::MaybeUninit::::uninit(); + unsafe { + ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1); + s.assume_init() + } } } #[repr(C)] @@ -3640,7 +4395,11 @@ pub struct _Py_global_strings__bindgen_ty_2__bindgen_ty_157 { } impl Default for _Py_global_strings__bindgen_ty_2__bindgen_ty_157 { fn default() -> Self { - unsafe { ::std::mem::zeroed() } + let mut s = ::std::mem::MaybeUninit::::uninit(); + unsafe { + ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1); + s.assume_init() + } } } #[repr(C)] @@ -3651,7 +4410,11 @@ pub struct _Py_global_strings__bindgen_ty_2__bindgen_ty_158 { } impl Default for _Py_global_strings__bindgen_ty_2__bindgen_ty_158 { fn default() -> Self { - unsafe { ::std::mem::zeroed() } + let mut s = ::std::mem::MaybeUninit::::uninit(); + unsafe { + ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1); + s.assume_init() + } } } #[repr(C)] @@ -3662,7 +4425,11 @@ pub struct _Py_global_strings__bindgen_ty_2__bindgen_ty_159 { } impl Default for _Py_global_strings__bindgen_ty_2__bindgen_ty_159 { fn default() -> Self { - unsafe { ::std::mem::zeroed() } + let mut s = ::std::mem::MaybeUninit::::uninit(); + unsafe { + ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1); + s.assume_init() + } } } #[repr(C)] @@ -3673,7 +4440,11 @@ pub struct _Py_global_strings__bindgen_ty_2__bindgen_ty_160 { } impl Default for _Py_global_strings__bindgen_ty_2__bindgen_ty_160 { fn default() -> Self { - unsafe { ::std::mem::zeroed() } + let mut s = ::std::mem::MaybeUninit::::uninit(); + unsafe { + ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1); + s.assume_init() + } } } #[repr(C)] @@ -3684,7 +4455,11 @@ pub struct _Py_global_strings__bindgen_ty_2__bindgen_ty_161 { } impl Default for _Py_global_strings__bindgen_ty_2__bindgen_ty_161 { fn default() -> Self { - unsafe { ::std::mem::zeroed() } + let mut s = ::std::mem::MaybeUninit::::uninit(); + unsafe { + ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1); + s.assume_init() + } } } #[repr(C)] @@ -3695,7 +4470,11 @@ pub struct _Py_global_strings__bindgen_ty_2__bindgen_ty_162 { } impl Default for _Py_global_strings__bindgen_ty_2__bindgen_ty_162 { fn default() -> Self { - unsafe { ::std::mem::zeroed() } + let mut s = ::std::mem::MaybeUninit::::uninit(); + unsafe { + ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1); + s.assume_init() + } } } #[repr(C)] @@ -3706,7 +4485,11 @@ pub struct _Py_global_strings__bindgen_ty_2__bindgen_ty_163 { } impl Default for _Py_global_strings__bindgen_ty_2__bindgen_ty_163 { fn default() -> Self { - unsafe { ::std::mem::zeroed() } + let mut s = ::std::mem::MaybeUninit::::uninit(); + unsafe { + ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1); + s.assume_init() + } } } #[repr(C)] @@ -3717,7 +4500,11 @@ pub struct _Py_global_strings__bindgen_ty_2__bindgen_ty_164 { } impl Default for _Py_global_strings__bindgen_ty_2__bindgen_ty_164 { fn default() -> Self { - unsafe { ::std::mem::zeroed() } + let mut s = ::std::mem::MaybeUninit::::uninit(); + unsafe { + ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1); + s.assume_init() + } } } #[repr(C)] @@ -3728,7 +4515,11 @@ pub struct _Py_global_strings__bindgen_ty_2__bindgen_ty_165 { } impl Default for _Py_global_strings__bindgen_ty_2__bindgen_ty_165 { fn default() -> Self { - unsafe { ::std::mem::zeroed() } + let mut s = ::std::mem::MaybeUninit::::uninit(); + unsafe { + ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1); + s.assume_init() + } } } #[repr(C)] @@ -3739,7 +4530,11 @@ pub struct _Py_global_strings__bindgen_ty_2__bindgen_ty_166 { } impl Default for _Py_global_strings__bindgen_ty_2__bindgen_ty_166 { fn default() -> Self { - unsafe { ::std::mem::zeroed() } + let mut s = ::std::mem::MaybeUninit::::uninit(); + unsafe { + ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1); + s.assume_init() + } } } #[repr(C)] @@ -3750,7 +4545,11 @@ pub struct _Py_global_strings__bindgen_ty_2__bindgen_ty_167 { } impl Default for _Py_global_strings__bindgen_ty_2__bindgen_ty_167 { fn default() -> Self { - unsafe { ::std::mem::zeroed() } + let mut s = ::std::mem::MaybeUninit::::uninit(); + unsafe { + ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1); + s.assume_init() + } } } #[repr(C)] @@ -3761,7 +4560,11 @@ pub struct _Py_global_strings__bindgen_ty_2__bindgen_ty_168 { } impl Default for _Py_global_strings__bindgen_ty_2__bindgen_ty_168 { fn default() -> Self { - unsafe { ::std::mem::zeroed() } + let mut s = ::std::mem::MaybeUninit::::uninit(); + unsafe { + ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1); + s.assume_init() + } } } #[repr(C)] @@ -3772,7 +4575,11 @@ pub struct _Py_global_strings__bindgen_ty_2__bindgen_ty_169 { } impl Default for _Py_global_strings__bindgen_ty_2__bindgen_ty_169 { fn default() -> Self { - unsafe { ::std::mem::zeroed() } + let mut s = ::std::mem::MaybeUninit::::uninit(); + unsafe { + ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1); + s.assume_init() + } } } #[repr(C)] @@ -3783,7 +4590,11 @@ pub struct _Py_global_strings__bindgen_ty_2__bindgen_ty_170 { } impl Default for _Py_global_strings__bindgen_ty_2__bindgen_ty_170 { fn default() -> Self { - unsafe { ::std::mem::zeroed() } + let mut s = ::std::mem::MaybeUninit::::uninit(); + unsafe { + ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1); + s.assume_init() + } } } #[repr(C)] @@ -3794,7 +4605,11 @@ pub struct _Py_global_strings__bindgen_ty_2__bindgen_ty_171 { } impl Default for _Py_global_strings__bindgen_ty_2__bindgen_ty_171 { fn default() -> Self { - unsafe { ::std::mem::zeroed() } + let mut s = ::std::mem::MaybeUninit::::uninit(); + unsafe { + ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1); + s.assume_init() + } } } #[repr(C)] @@ -3805,7 +4620,11 @@ pub struct _Py_global_strings__bindgen_ty_2__bindgen_ty_172 { } impl Default for _Py_global_strings__bindgen_ty_2__bindgen_ty_172 { fn default() -> Self { - unsafe { ::std::mem::zeroed() } + let mut s = ::std::mem::MaybeUninit::::uninit(); + unsafe { + ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1); + s.assume_init() + } } } #[repr(C)] @@ -3816,7 +4635,11 @@ pub struct _Py_global_strings__bindgen_ty_2__bindgen_ty_173 { } impl Default for _Py_global_strings__bindgen_ty_2__bindgen_ty_173 { fn default() -> Self { - unsafe { ::std::mem::zeroed() } + let mut s = ::std::mem::MaybeUninit::::uninit(); + unsafe { + ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1); + s.assume_init() + } } } #[repr(C)] @@ -3827,7 +4650,11 @@ pub struct _Py_global_strings__bindgen_ty_2__bindgen_ty_174 { } impl Default for _Py_global_strings__bindgen_ty_2__bindgen_ty_174 { fn default() -> Self { - unsafe { ::std::mem::zeroed() } + let mut s = ::std::mem::MaybeUninit::::uninit(); + unsafe { + ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1); + s.assume_init() + } } } #[repr(C)] @@ -3838,7 +4665,11 @@ pub struct _Py_global_strings__bindgen_ty_2__bindgen_ty_175 { } impl Default for _Py_global_strings__bindgen_ty_2__bindgen_ty_175 { fn default() -> Self { - unsafe { ::std::mem::zeroed() } + let mut s = ::std::mem::MaybeUninit::::uninit(); + unsafe { + ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1); + s.assume_init() + } } } #[repr(C)] @@ -3849,7 +4680,11 @@ pub struct _Py_global_strings__bindgen_ty_2__bindgen_ty_176 { } impl Default for _Py_global_strings__bindgen_ty_2__bindgen_ty_176 { fn default() -> Self { - unsafe { ::std::mem::zeroed() } + let mut s = ::std::mem::MaybeUninit::::uninit(); + unsafe { + ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1); + s.assume_init() + } } } #[repr(C)] @@ -3860,7 +4695,11 @@ pub struct _Py_global_strings__bindgen_ty_2__bindgen_ty_177 { } impl Default for _Py_global_strings__bindgen_ty_2__bindgen_ty_177 { fn default() -> Self { - unsafe { ::std::mem::zeroed() } + let mut s = ::std::mem::MaybeUninit::::uninit(); + unsafe { + ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1); + s.assume_init() + } } } #[repr(C)] @@ -3871,7 +4710,11 @@ pub struct _Py_global_strings__bindgen_ty_2__bindgen_ty_178 { } impl Default for _Py_global_strings__bindgen_ty_2__bindgen_ty_178 { fn default() -> Self { - unsafe { ::std::mem::zeroed() } + let mut s = ::std::mem::MaybeUninit::::uninit(); + unsafe { + ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1); + s.assume_init() + } } } #[repr(C)] @@ -3882,7 +4725,11 @@ pub struct _Py_global_strings__bindgen_ty_2__bindgen_ty_179 { } impl Default for _Py_global_strings__bindgen_ty_2__bindgen_ty_179 { fn default() -> Self { - unsafe { ::std::mem::zeroed() } + let mut s = ::std::mem::MaybeUninit::::uninit(); + unsafe { + ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1); + s.assume_init() + } } } #[repr(C)] @@ -3893,7 +4740,11 @@ pub struct _Py_global_strings__bindgen_ty_2__bindgen_ty_180 { } impl Default for _Py_global_strings__bindgen_ty_2__bindgen_ty_180 { fn default() -> Self { - unsafe { ::std::mem::zeroed() } + let mut s = ::std::mem::MaybeUninit::::uninit(); + unsafe { + ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1); + s.assume_init() + } } } #[repr(C)] @@ -3904,7 +4755,11 @@ pub struct _Py_global_strings__bindgen_ty_2__bindgen_ty_181 { } impl Default for _Py_global_strings__bindgen_ty_2__bindgen_ty_181 { fn default() -> Self { - unsafe { ::std::mem::zeroed() } + let mut s = ::std::mem::MaybeUninit::::uninit(); + unsafe { + ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1); + s.assume_init() + } } } #[repr(C)] @@ -3915,7 +4770,11 @@ pub struct _Py_global_strings__bindgen_ty_2__bindgen_ty_182 { } impl Default for _Py_global_strings__bindgen_ty_2__bindgen_ty_182 { fn default() -> Self { - unsafe { ::std::mem::zeroed() } + let mut s = ::std::mem::MaybeUninit::::uninit(); + unsafe { + ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1); + s.assume_init() + } } } #[repr(C)] @@ -3926,7 +4785,11 @@ pub struct _Py_global_strings__bindgen_ty_2__bindgen_ty_183 { } impl Default for _Py_global_strings__bindgen_ty_2__bindgen_ty_183 { fn default() -> Self { - unsafe { ::std::mem::zeroed() } + let mut s = ::std::mem::MaybeUninit::::uninit(); + unsafe { + ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1); + s.assume_init() + } } } #[repr(C)] @@ -3937,7 +4800,11 @@ pub struct _Py_global_strings__bindgen_ty_2__bindgen_ty_184 { } impl Default for _Py_global_strings__bindgen_ty_2__bindgen_ty_184 { fn default() -> Self { - unsafe { ::std::mem::zeroed() } + let mut s = ::std::mem::MaybeUninit::::uninit(); + unsafe { + ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1); + s.assume_init() + } } } #[repr(C)] @@ -3948,7 +4815,11 @@ pub struct _Py_global_strings__bindgen_ty_2__bindgen_ty_185 { } impl Default for _Py_global_strings__bindgen_ty_2__bindgen_ty_185 { fn default() -> Self { - unsafe { ::std::mem::zeroed() } + let mut s = ::std::mem::MaybeUninit::::uninit(); + unsafe { + ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1); + s.assume_init() + } } } #[repr(C)] @@ -3959,7 +4830,11 @@ pub struct _Py_global_strings__bindgen_ty_2__bindgen_ty_186 { } impl Default for _Py_global_strings__bindgen_ty_2__bindgen_ty_186 { fn default() -> Self { - unsafe { ::std::mem::zeroed() } + let mut s = ::std::mem::MaybeUninit::::uninit(); + unsafe { + ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1); + s.assume_init() + } } } #[repr(C)] @@ -3970,7 +4845,11 @@ pub struct _Py_global_strings__bindgen_ty_2__bindgen_ty_187 { } impl Default for _Py_global_strings__bindgen_ty_2__bindgen_ty_187 { fn default() -> Self { - unsafe { ::std::mem::zeroed() } + let mut s = ::std::mem::MaybeUninit::::uninit(); + unsafe { + ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1); + s.assume_init() + } } } #[repr(C)] @@ -3981,7 +4860,11 @@ pub struct _Py_global_strings__bindgen_ty_2__bindgen_ty_188 { } impl Default for _Py_global_strings__bindgen_ty_2__bindgen_ty_188 { fn default() -> Self { - unsafe { ::std::mem::zeroed() } + let mut s = ::std::mem::MaybeUninit::::uninit(); + unsafe { + ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1); + s.assume_init() + } } } #[repr(C)] @@ -3992,7 +4875,11 @@ pub struct _Py_global_strings__bindgen_ty_2__bindgen_ty_189 { } impl Default for _Py_global_strings__bindgen_ty_2__bindgen_ty_189 { fn default() -> Self { - unsafe { ::std::mem::zeroed() } + let mut s = ::std::mem::MaybeUninit::::uninit(); + unsafe { + ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1); + s.assume_init() + } } } #[repr(C)] @@ -4003,7 +4890,11 @@ pub struct _Py_global_strings__bindgen_ty_2__bindgen_ty_190 { } impl Default for _Py_global_strings__bindgen_ty_2__bindgen_ty_190 { fn default() -> Self { - unsafe { ::std::mem::zeroed() } + let mut s = ::std::mem::MaybeUninit::::uninit(); + unsafe { + ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1); + s.assume_init() + } } } #[repr(C)] @@ -4014,7 +4905,11 @@ pub struct _Py_global_strings__bindgen_ty_2__bindgen_ty_191 { } impl Default for _Py_global_strings__bindgen_ty_2__bindgen_ty_191 { fn default() -> Self { - unsafe { ::std::mem::zeroed() } + let mut s = ::std::mem::MaybeUninit::::uninit(); + unsafe { + ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1); + s.assume_init() + } } } #[repr(C)] @@ -4025,7 +4920,11 @@ pub struct _Py_global_strings__bindgen_ty_2__bindgen_ty_192 { } impl Default for _Py_global_strings__bindgen_ty_2__bindgen_ty_192 { fn default() -> Self { - unsafe { ::std::mem::zeroed() } + let mut s = ::std::mem::MaybeUninit::::uninit(); + unsafe { + ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1); + s.assume_init() + } } } #[repr(C)] @@ -4036,7 +4935,11 @@ pub struct _Py_global_strings__bindgen_ty_2__bindgen_ty_193 { } impl Default for _Py_global_strings__bindgen_ty_2__bindgen_ty_193 { fn default() -> Self { - unsafe { ::std::mem::zeroed() } + let mut s = ::std::mem::MaybeUninit::::uninit(); + unsafe { + ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1); + s.assume_init() + } } } #[repr(C)] @@ -4047,7 +4950,11 @@ pub struct _Py_global_strings__bindgen_ty_2__bindgen_ty_194 { } impl Default for _Py_global_strings__bindgen_ty_2__bindgen_ty_194 { fn default() -> Self { - unsafe { ::std::mem::zeroed() } + let mut s = ::std::mem::MaybeUninit::::uninit(); + unsafe { + ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1); + s.assume_init() + } } } #[repr(C)] @@ -4058,7 +4965,11 @@ pub struct _Py_global_strings__bindgen_ty_2__bindgen_ty_195 { } impl Default for _Py_global_strings__bindgen_ty_2__bindgen_ty_195 { fn default() -> Self { - unsafe { ::std::mem::zeroed() } + let mut s = ::std::mem::MaybeUninit::::uninit(); + unsafe { + ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1); + s.assume_init() + } } } #[repr(C)] @@ -4069,7 +4980,11 @@ pub struct _Py_global_strings__bindgen_ty_2__bindgen_ty_196 { } impl Default for _Py_global_strings__bindgen_ty_2__bindgen_ty_196 { fn default() -> Self { - unsafe { ::std::mem::zeroed() } + let mut s = ::std::mem::MaybeUninit::::uninit(); + unsafe { + ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1); + s.assume_init() + } } } #[repr(C)] @@ -4080,7 +4995,11 @@ pub struct _Py_global_strings__bindgen_ty_2__bindgen_ty_197 { } impl Default for _Py_global_strings__bindgen_ty_2__bindgen_ty_197 { fn default() -> Self { - unsafe { ::std::mem::zeroed() } + let mut s = ::std::mem::MaybeUninit::::uninit(); + unsafe { + ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1); + s.assume_init() + } } } #[repr(C)] @@ -4091,7 +5010,11 @@ pub struct _Py_global_strings__bindgen_ty_2__bindgen_ty_198 { } impl Default for _Py_global_strings__bindgen_ty_2__bindgen_ty_198 { fn default() -> Self { - unsafe { ::std::mem::zeroed() } + let mut s = ::std::mem::MaybeUninit::::uninit(); + unsafe { + ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1); + s.assume_init() + } } } #[repr(C)] @@ -4102,7 +5025,11 @@ pub struct _Py_global_strings__bindgen_ty_2__bindgen_ty_199 { } impl Default for _Py_global_strings__bindgen_ty_2__bindgen_ty_199 { fn default() -> Self { - unsafe { ::std::mem::zeroed() } + let mut s = ::std::mem::MaybeUninit::::uninit(); + unsafe { + ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1); + s.assume_init() + } } } #[repr(C)] @@ -4113,7 +5040,11 @@ pub struct _Py_global_strings__bindgen_ty_2__bindgen_ty_200 { } impl Default for _Py_global_strings__bindgen_ty_2__bindgen_ty_200 { fn default() -> Self { - unsafe { ::std::mem::zeroed() } + let mut s = ::std::mem::MaybeUninit::::uninit(); + unsafe { + ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1); + s.assume_init() + } } } #[repr(C)] @@ -4124,7 +5055,11 @@ pub struct _Py_global_strings__bindgen_ty_2__bindgen_ty_201 { } impl Default for _Py_global_strings__bindgen_ty_2__bindgen_ty_201 { fn default() -> Self { - unsafe { ::std::mem::zeroed() } + let mut s = ::std::mem::MaybeUninit::::uninit(); + unsafe { + ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1); + s.assume_init() + } } } #[repr(C)] @@ -4135,7 +5070,11 @@ pub struct _Py_global_strings__bindgen_ty_2__bindgen_ty_202 { } impl Default for _Py_global_strings__bindgen_ty_2__bindgen_ty_202 { fn default() -> Self { - unsafe { ::std::mem::zeroed() } + let mut s = ::std::mem::MaybeUninit::::uninit(); + unsafe { + ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1); + s.assume_init() + } } } #[repr(C)] @@ -4146,7 +5085,11 @@ pub struct _Py_global_strings__bindgen_ty_2__bindgen_ty_203 { } impl Default for _Py_global_strings__bindgen_ty_2__bindgen_ty_203 { fn default() -> Self { - unsafe { ::std::mem::zeroed() } + let mut s = ::std::mem::MaybeUninit::::uninit(); + unsafe { + ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1); + s.assume_init() + } } } #[repr(C)] @@ -4157,7 +5100,11 @@ pub struct _Py_global_strings__bindgen_ty_2__bindgen_ty_204 { } impl Default for _Py_global_strings__bindgen_ty_2__bindgen_ty_204 { fn default() -> Self { - unsafe { ::std::mem::zeroed() } + let mut s = ::std::mem::MaybeUninit::::uninit(); + unsafe { + ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1); + s.assume_init() + } } } #[repr(C)] @@ -4168,7 +5115,11 @@ pub struct _Py_global_strings__bindgen_ty_2__bindgen_ty_205 { } impl Default for _Py_global_strings__bindgen_ty_2__bindgen_ty_205 { fn default() -> Self { - unsafe { ::std::mem::zeroed() } + let mut s = ::std::mem::MaybeUninit::::uninit(); + unsafe { + ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1); + s.assume_init() + } } } #[repr(C)] @@ -4179,7 +5130,11 @@ pub struct _Py_global_strings__bindgen_ty_2__bindgen_ty_206 { } impl Default for _Py_global_strings__bindgen_ty_2__bindgen_ty_206 { fn default() -> Self { - unsafe { ::std::mem::zeroed() } + let mut s = ::std::mem::MaybeUninit::::uninit(); + unsafe { + ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1); + s.assume_init() + } } } #[repr(C)] @@ -4190,7 +5145,11 @@ pub struct _Py_global_strings__bindgen_ty_2__bindgen_ty_207 { } impl Default for _Py_global_strings__bindgen_ty_2__bindgen_ty_207 { fn default() -> Self { - unsafe { ::std::mem::zeroed() } + let mut s = ::std::mem::MaybeUninit::::uninit(); + unsafe { + ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1); + s.assume_init() + } } } #[repr(C)] @@ -4201,7 +5160,11 @@ pub struct _Py_global_strings__bindgen_ty_2__bindgen_ty_208 { } impl Default for _Py_global_strings__bindgen_ty_2__bindgen_ty_208 { fn default() -> Self { - unsafe { ::std::mem::zeroed() } + let mut s = ::std::mem::MaybeUninit::::uninit(); + unsafe { + ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1); + s.assume_init() + } } } #[repr(C)] @@ -4212,7 +5175,11 @@ pub struct _Py_global_strings__bindgen_ty_2__bindgen_ty_209 { } impl Default for _Py_global_strings__bindgen_ty_2__bindgen_ty_209 { fn default() -> Self { - unsafe { ::std::mem::zeroed() } + let mut s = ::std::mem::MaybeUninit::::uninit(); + unsafe { + ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1); + s.assume_init() + } } } #[repr(C)] @@ -4223,7 +5190,11 @@ pub struct _Py_global_strings__bindgen_ty_2__bindgen_ty_210 { } impl Default for _Py_global_strings__bindgen_ty_2__bindgen_ty_210 { fn default() -> Self { - unsafe { ::std::mem::zeroed() } + let mut s = ::std::mem::MaybeUninit::::uninit(); + unsafe { + ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1); + s.assume_init() + } } } #[repr(C)] @@ -4234,7 +5205,11 @@ pub struct _Py_global_strings__bindgen_ty_2__bindgen_ty_211 { } impl Default for _Py_global_strings__bindgen_ty_2__bindgen_ty_211 { fn default() -> Self { - unsafe { ::std::mem::zeroed() } + let mut s = ::std::mem::MaybeUninit::::uninit(); + unsafe { + ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1); + s.assume_init() + } } } #[repr(C)] @@ -4245,7 +5220,11 @@ pub struct _Py_global_strings__bindgen_ty_2__bindgen_ty_212 { } impl Default for _Py_global_strings__bindgen_ty_2__bindgen_ty_212 { fn default() -> Self { - unsafe { ::std::mem::zeroed() } + let mut s = ::std::mem::MaybeUninit::::uninit(); + unsafe { + ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1); + s.assume_init() + } } } #[repr(C)] @@ -4256,7 +5235,11 @@ pub struct _Py_global_strings__bindgen_ty_2__bindgen_ty_213 { } impl Default for _Py_global_strings__bindgen_ty_2__bindgen_ty_213 { fn default() -> Self { - unsafe { ::std::mem::zeroed() } + let mut s = ::std::mem::MaybeUninit::::uninit(); + unsafe { + ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1); + s.assume_init() + } } } #[repr(C)] @@ -4267,7 +5250,11 @@ pub struct _Py_global_strings__bindgen_ty_2__bindgen_ty_214 { } impl Default for _Py_global_strings__bindgen_ty_2__bindgen_ty_214 { fn default() -> Self { - unsafe { ::std::mem::zeroed() } + let mut s = ::std::mem::MaybeUninit::::uninit(); + unsafe { + ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1); + s.assume_init() + } } } #[repr(C)] @@ -4278,7 +5265,11 @@ pub struct _Py_global_strings__bindgen_ty_2__bindgen_ty_215 { } impl Default for _Py_global_strings__bindgen_ty_2__bindgen_ty_215 { fn default() -> Self { - unsafe { ::std::mem::zeroed() } + let mut s = ::std::mem::MaybeUninit::::uninit(); + unsafe { + ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1); + s.assume_init() + } } } #[repr(C)] @@ -4289,7 +5280,11 @@ pub struct _Py_global_strings__bindgen_ty_2__bindgen_ty_216 { } impl Default for _Py_global_strings__bindgen_ty_2__bindgen_ty_216 { fn default() -> Self { - unsafe { ::std::mem::zeroed() } + let mut s = ::std::mem::MaybeUninit::::uninit(); + unsafe { + ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1); + s.assume_init() + } } } #[repr(C)] @@ -4300,7 +5295,11 @@ pub struct _Py_global_strings__bindgen_ty_2__bindgen_ty_217 { } impl Default for _Py_global_strings__bindgen_ty_2__bindgen_ty_217 { fn default() -> Self { - unsafe { ::std::mem::zeroed() } + let mut s = ::std::mem::MaybeUninit::::uninit(); + unsafe { + ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1); + s.assume_init() + } } } #[repr(C)] @@ -4311,7 +5310,11 @@ pub struct _Py_global_strings__bindgen_ty_2__bindgen_ty_218 { } impl Default for _Py_global_strings__bindgen_ty_2__bindgen_ty_218 { fn default() -> Self { - unsafe { ::std::mem::zeroed() } + let mut s = ::std::mem::MaybeUninit::::uninit(); + unsafe { + ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1); + s.assume_init() + } } } #[repr(C)] @@ -4322,7 +5325,11 @@ pub struct _Py_global_strings__bindgen_ty_2__bindgen_ty_219 { } impl Default for _Py_global_strings__bindgen_ty_2__bindgen_ty_219 { fn default() -> Self { - unsafe { ::std::mem::zeroed() } + let mut s = ::std::mem::MaybeUninit::::uninit(); + unsafe { + ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1); + s.assume_init() + } } } #[repr(C)] @@ -4333,7 +5340,11 @@ pub struct _Py_global_strings__bindgen_ty_2__bindgen_ty_220 { } impl Default for _Py_global_strings__bindgen_ty_2__bindgen_ty_220 { fn default() -> Self { - unsafe { ::std::mem::zeroed() } + let mut s = ::std::mem::MaybeUninit::::uninit(); + unsafe { + ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1); + s.assume_init() + } } } #[repr(C)] @@ -4344,7 +5355,11 @@ pub struct _Py_global_strings__bindgen_ty_2__bindgen_ty_221 { } impl Default for _Py_global_strings__bindgen_ty_2__bindgen_ty_221 { fn default() -> Self { - unsafe { ::std::mem::zeroed() } + let mut s = ::std::mem::MaybeUninit::::uninit(); + unsafe { + ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1); + s.assume_init() + } } } #[repr(C)] @@ -4355,7 +5370,11 @@ pub struct _Py_global_strings__bindgen_ty_2__bindgen_ty_222 { } impl Default for _Py_global_strings__bindgen_ty_2__bindgen_ty_222 { fn default() -> Self { - unsafe { ::std::mem::zeroed() } + let mut s = ::std::mem::MaybeUninit::::uninit(); + unsafe { + ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1); + s.assume_init() + } } } #[repr(C)] @@ -4366,7 +5385,11 @@ pub struct _Py_global_strings__bindgen_ty_2__bindgen_ty_223 { } impl Default for _Py_global_strings__bindgen_ty_2__bindgen_ty_223 { fn default() -> Self { - unsafe { ::std::mem::zeroed() } + let mut s = ::std::mem::MaybeUninit::::uninit(); + unsafe { + ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1); + s.assume_init() + } } } #[repr(C)] @@ -4377,7 +5400,11 @@ pub struct _Py_global_strings__bindgen_ty_2__bindgen_ty_224 { } impl Default for _Py_global_strings__bindgen_ty_2__bindgen_ty_224 { fn default() -> Self { - unsafe { ::std::mem::zeroed() } + let mut s = ::std::mem::MaybeUninit::::uninit(); + unsafe { + ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1); + s.assume_init() + } } } #[repr(C)] @@ -4388,7 +5415,11 @@ pub struct _Py_global_strings__bindgen_ty_2__bindgen_ty_225 { } impl Default for _Py_global_strings__bindgen_ty_2__bindgen_ty_225 { fn default() -> Self { - unsafe { ::std::mem::zeroed() } + let mut s = ::std::mem::MaybeUninit::::uninit(); + unsafe { + ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1); + s.assume_init() + } } } #[repr(C)] @@ -4399,7 +5430,11 @@ pub struct _Py_global_strings__bindgen_ty_2__bindgen_ty_226 { } impl Default for _Py_global_strings__bindgen_ty_2__bindgen_ty_226 { fn default() -> Self { - unsafe { ::std::mem::zeroed() } + let mut s = ::std::mem::MaybeUninit::::uninit(); + unsafe { + ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1); + s.assume_init() + } } } #[repr(C)] @@ -4410,7 +5445,11 @@ pub struct _Py_global_strings__bindgen_ty_2__bindgen_ty_227 { } impl Default for _Py_global_strings__bindgen_ty_2__bindgen_ty_227 { fn default() -> Self { - unsafe { ::std::mem::zeroed() } + let mut s = ::std::mem::MaybeUninit::::uninit(); + unsafe { + ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1); + s.assume_init() + } } } #[repr(C)] @@ -4421,7 +5460,11 @@ pub struct _Py_global_strings__bindgen_ty_2__bindgen_ty_228 { } impl Default for _Py_global_strings__bindgen_ty_2__bindgen_ty_228 { fn default() -> Self { - unsafe { ::std::mem::zeroed() } + let mut s = ::std::mem::MaybeUninit::::uninit(); + unsafe { + ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1); + s.assume_init() + } } } #[repr(C)] @@ -4432,7 +5475,11 @@ pub struct _Py_global_strings__bindgen_ty_2__bindgen_ty_229 { } impl Default for _Py_global_strings__bindgen_ty_2__bindgen_ty_229 { fn default() -> Self { - unsafe { ::std::mem::zeroed() } + let mut s = ::std::mem::MaybeUninit::::uninit(); + unsafe { + ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1); + s.assume_init() + } } } #[repr(C)] @@ -4443,7 +5490,11 @@ pub struct _Py_global_strings__bindgen_ty_2__bindgen_ty_230 { } impl Default for _Py_global_strings__bindgen_ty_2__bindgen_ty_230 { fn default() -> Self { - unsafe { ::std::mem::zeroed() } + let mut s = ::std::mem::MaybeUninit::::uninit(); + unsafe { + ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1); + s.assume_init() + } } } #[repr(C)] @@ -4454,7 +5505,11 @@ pub struct _Py_global_strings__bindgen_ty_2__bindgen_ty_231 { } impl Default for _Py_global_strings__bindgen_ty_2__bindgen_ty_231 { fn default() -> Self { - unsafe { ::std::mem::zeroed() } + let mut s = ::std::mem::MaybeUninit::::uninit(); + unsafe { + ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1); + s.assume_init() + } } } #[repr(C)] @@ -4465,7 +5520,11 @@ pub struct _Py_global_strings__bindgen_ty_2__bindgen_ty_232 { } impl Default for _Py_global_strings__bindgen_ty_2__bindgen_ty_232 { fn default() -> Self { - unsafe { ::std::mem::zeroed() } + let mut s = ::std::mem::MaybeUninit::::uninit(); + unsafe { + ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1); + s.assume_init() + } } } #[repr(C)] @@ -4476,7 +5535,11 @@ pub struct _Py_global_strings__bindgen_ty_2__bindgen_ty_233 { } impl Default for _Py_global_strings__bindgen_ty_2__bindgen_ty_233 { fn default() -> Self { - unsafe { ::std::mem::zeroed() } + let mut s = ::std::mem::MaybeUninit::::uninit(); + unsafe { + ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1); + s.assume_init() + } } } #[repr(C)] @@ -4487,7 +5550,11 @@ pub struct _Py_global_strings__bindgen_ty_2__bindgen_ty_234 { } impl Default for _Py_global_strings__bindgen_ty_2__bindgen_ty_234 { fn default() -> Self { - unsafe { ::std::mem::zeroed() } + let mut s = ::std::mem::MaybeUninit::::uninit(); + unsafe { + ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1); + s.assume_init() + } } } #[repr(C)] @@ -4498,7 +5565,11 @@ pub struct _Py_global_strings__bindgen_ty_2__bindgen_ty_235 { } impl Default for _Py_global_strings__bindgen_ty_2__bindgen_ty_235 { fn default() -> Self { - unsafe { ::std::mem::zeroed() } + let mut s = ::std::mem::MaybeUninit::::uninit(); + unsafe { + ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1); + s.assume_init() + } } } #[repr(C)] @@ -4509,7 +5580,11 @@ pub struct _Py_global_strings__bindgen_ty_2__bindgen_ty_236 { } impl Default for _Py_global_strings__bindgen_ty_2__bindgen_ty_236 { fn default() -> Self { - unsafe { ::std::mem::zeroed() } + let mut s = ::std::mem::MaybeUninit::::uninit(); + unsafe { + ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1); + s.assume_init() + } } } #[repr(C)] @@ -4520,7 +5595,11 @@ pub struct _Py_global_strings__bindgen_ty_2__bindgen_ty_237 { } impl Default for _Py_global_strings__bindgen_ty_2__bindgen_ty_237 { fn default() -> Self { - unsafe { ::std::mem::zeroed() } + let mut s = ::std::mem::MaybeUninit::::uninit(); + unsafe { + ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1); + s.assume_init() + } } } #[repr(C)] @@ -4531,7 +5610,11 @@ pub struct _Py_global_strings__bindgen_ty_2__bindgen_ty_238 { } impl Default for _Py_global_strings__bindgen_ty_2__bindgen_ty_238 { fn default() -> Self { - unsafe { ::std::mem::zeroed() } + let mut s = ::std::mem::MaybeUninit::::uninit(); + unsafe { + ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1); + s.assume_init() + } } } #[repr(C)] @@ -4542,7 +5625,11 @@ pub struct _Py_global_strings__bindgen_ty_2__bindgen_ty_239 { } impl Default for _Py_global_strings__bindgen_ty_2__bindgen_ty_239 { fn default() -> Self { - unsafe { ::std::mem::zeroed() } + let mut s = ::std::mem::MaybeUninit::::uninit(); + unsafe { + ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1); + s.assume_init() + } } } #[repr(C)] @@ -4553,7 +5640,11 @@ pub struct _Py_global_strings__bindgen_ty_2__bindgen_ty_240 { } impl Default for _Py_global_strings__bindgen_ty_2__bindgen_ty_240 { fn default() -> Self { - unsafe { ::std::mem::zeroed() } + let mut s = ::std::mem::MaybeUninit::::uninit(); + unsafe { + ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1); + s.assume_init() + } } } #[repr(C)] @@ -4564,7 +5655,11 @@ pub struct _Py_global_strings__bindgen_ty_2__bindgen_ty_241 { } impl Default for _Py_global_strings__bindgen_ty_2__bindgen_ty_241 { fn default() -> Self { - unsafe { ::std::mem::zeroed() } + let mut s = ::std::mem::MaybeUninit::::uninit(); + unsafe { + ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1); + s.assume_init() + } } } #[repr(C)] @@ -4575,7 +5670,11 @@ pub struct _Py_global_strings__bindgen_ty_2__bindgen_ty_242 { } impl Default for _Py_global_strings__bindgen_ty_2__bindgen_ty_242 { fn default() -> Self { - unsafe { ::std::mem::zeroed() } + let mut s = ::std::mem::MaybeUninit::::uninit(); + unsafe { + ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1); + s.assume_init() + } } } #[repr(C)] @@ -4586,7 +5685,11 @@ pub struct _Py_global_strings__bindgen_ty_2__bindgen_ty_243 { } impl Default for _Py_global_strings__bindgen_ty_2__bindgen_ty_243 { fn default() -> Self { - unsafe { ::std::mem::zeroed() } + let mut s = ::std::mem::MaybeUninit::::uninit(); + unsafe { + ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1); + s.assume_init() + } } } #[repr(C)] @@ -4597,7 +5700,11 @@ pub struct _Py_global_strings__bindgen_ty_2__bindgen_ty_244 { } impl Default for _Py_global_strings__bindgen_ty_2__bindgen_ty_244 { fn default() -> Self { - unsafe { ::std::mem::zeroed() } + let mut s = ::std::mem::MaybeUninit::::uninit(); + unsafe { + ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1); + s.assume_init() + } } } #[repr(C)] @@ -4608,7 +5715,11 @@ pub struct _Py_global_strings__bindgen_ty_2__bindgen_ty_245 { } impl Default for _Py_global_strings__bindgen_ty_2__bindgen_ty_245 { fn default() -> Self { - unsafe { ::std::mem::zeroed() } + let mut s = ::std::mem::MaybeUninit::::uninit(); + unsafe { + ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1); + s.assume_init() + } } } #[repr(C)] @@ -4619,7 +5730,11 @@ pub struct _Py_global_strings__bindgen_ty_2__bindgen_ty_246 { } impl Default for _Py_global_strings__bindgen_ty_2__bindgen_ty_246 { fn default() -> Self { - unsafe { ::std::mem::zeroed() } + let mut s = ::std::mem::MaybeUninit::::uninit(); + unsafe { + ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1); + s.assume_init() + } } } #[repr(C)] @@ -4630,7 +5745,11 @@ pub struct _Py_global_strings__bindgen_ty_2__bindgen_ty_247 { } impl Default for _Py_global_strings__bindgen_ty_2__bindgen_ty_247 { fn default() -> Self { - unsafe { ::std::mem::zeroed() } + let mut s = ::std::mem::MaybeUninit::::uninit(); + unsafe { + ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1); + s.assume_init() + } } } #[repr(C)] @@ -4641,7 +5760,11 @@ pub struct _Py_global_strings__bindgen_ty_2__bindgen_ty_248 { } impl Default for _Py_global_strings__bindgen_ty_2__bindgen_ty_248 { fn default() -> Self { - unsafe { ::std::mem::zeroed() } + let mut s = ::std::mem::MaybeUninit::::uninit(); + unsafe { + ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1); + s.assume_init() + } } } #[repr(C)] @@ -4652,7 +5775,11 @@ pub struct _Py_global_strings__bindgen_ty_2__bindgen_ty_249 { } impl Default for _Py_global_strings__bindgen_ty_2__bindgen_ty_249 { fn default() -> Self { - unsafe { ::std::mem::zeroed() } + let mut s = ::std::mem::MaybeUninit::::uninit(); + unsafe { + ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1); + s.assume_init() + } } } #[repr(C)] @@ -4663,7 +5790,11 @@ pub struct _Py_global_strings__bindgen_ty_2__bindgen_ty_250 { } impl Default for _Py_global_strings__bindgen_ty_2__bindgen_ty_250 { fn default() -> Self { - unsafe { ::std::mem::zeroed() } + let mut s = ::std::mem::MaybeUninit::::uninit(); + unsafe { + ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1); + s.assume_init() + } } } #[repr(C)] @@ -4674,7 +5805,11 @@ pub struct _Py_global_strings__bindgen_ty_2__bindgen_ty_251 { } impl Default for _Py_global_strings__bindgen_ty_2__bindgen_ty_251 { fn default() -> Self { - unsafe { ::std::mem::zeroed() } + let mut s = ::std::mem::MaybeUninit::::uninit(); + unsafe { + ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1); + s.assume_init() + } } } #[repr(C)] @@ -4685,7 +5820,11 @@ pub struct _Py_global_strings__bindgen_ty_2__bindgen_ty_252 { } impl Default for _Py_global_strings__bindgen_ty_2__bindgen_ty_252 { fn default() -> Self { - unsafe { ::std::mem::zeroed() } + let mut s = ::std::mem::MaybeUninit::::uninit(); + unsafe { + ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1); + s.assume_init() + } } } #[repr(C)] @@ -4696,7 +5835,11 @@ pub struct _Py_global_strings__bindgen_ty_2__bindgen_ty_253 { } impl Default for _Py_global_strings__bindgen_ty_2__bindgen_ty_253 { fn default() -> Self { - unsafe { ::std::mem::zeroed() } + let mut s = ::std::mem::MaybeUninit::::uninit(); + unsafe { + ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1); + s.assume_init() + } } } #[repr(C)] @@ -4707,7 +5850,11 @@ pub struct _Py_global_strings__bindgen_ty_2__bindgen_ty_254 { } impl Default for _Py_global_strings__bindgen_ty_2__bindgen_ty_254 { fn default() -> Self { - unsafe { ::std::mem::zeroed() } + let mut s = ::std::mem::MaybeUninit::::uninit(); + unsafe { + ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1); + s.assume_init() + } } } #[repr(C)] @@ -4718,7 +5865,11 @@ pub struct _Py_global_strings__bindgen_ty_2__bindgen_ty_255 { } impl Default for _Py_global_strings__bindgen_ty_2__bindgen_ty_255 { fn default() -> Self { - unsafe { ::std::mem::zeroed() } + let mut s = ::std::mem::MaybeUninit::::uninit(); + unsafe { + ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1); + s.assume_init() + } } } #[repr(C)] @@ -4729,7 +5880,11 @@ pub struct _Py_global_strings__bindgen_ty_2__bindgen_ty_256 { } impl Default for _Py_global_strings__bindgen_ty_2__bindgen_ty_256 { fn default() -> Self { - unsafe { ::std::mem::zeroed() } + let mut s = ::std::mem::MaybeUninit::::uninit(); + unsafe { + ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1); + s.assume_init() + } } } #[repr(C)] @@ -4740,7 +5895,11 @@ pub struct _Py_global_strings__bindgen_ty_2__bindgen_ty_257 { } impl Default for _Py_global_strings__bindgen_ty_2__bindgen_ty_257 { fn default() -> Self { - unsafe { ::std::mem::zeroed() } + let mut s = ::std::mem::MaybeUninit::::uninit(); + unsafe { + ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1); + s.assume_init() + } } } #[repr(C)] @@ -4751,7 +5910,11 @@ pub struct _Py_global_strings__bindgen_ty_2__bindgen_ty_258 { } impl Default for _Py_global_strings__bindgen_ty_2__bindgen_ty_258 { fn default() -> Self { - unsafe { ::std::mem::zeroed() } + let mut s = ::std::mem::MaybeUninit::::uninit(); + unsafe { + ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1); + s.assume_init() + } } } #[repr(C)] @@ -4762,7 +5925,11 @@ pub struct _Py_global_strings__bindgen_ty_2__bindgen_ty_259 { } impl Default for _Py_global_strings__bindgen_ty_2__bindgen_ty_259 { fn default() -> Self { - unsafe { ::std::mem::zeroed() } + let mut s = ::std::mem::MaybeUninit::::uninit(); + unsafe { + ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1); + s.assume_init() + } } } #[repr(C)] @@ -4773,7 +5940,11 @@ pub struct _Py_global_strings__bindgen_ty_2__bindgen_ty_260 { } impl Default for _Py_global_strings__bindgen_ty_2__bindgen_ty_260 { fn default() -> Self { - unsafe { ::std::mem::zeroed() } + let mut s = ::std::mem::MaybeUninit::::uninit(); + unsafe { + ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1); + s.assume_init() + } } } #[repr(C)] @@ -4784,7 +5955,11 @@ pub struct _Py_global_strings__bindgen_ty_2__bindgen_ty_261 { } impl Default for _Py_global_strings__bindgen_ty_2__bindgen_ty_261 { fn default() -> Self { - unsafe { ::std::mem::zeroed() } + let mut s = ::std::mem::MaybeUninit::::uninit(); + unsafe { + ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1); + s.assume_init() + } } } #[repr(C)] @@ -4795,7 +5970,11 @@ pub struct _Py_global_strings__bindgen_ty_2__bindgen_ty_262 { } impl Default for _Py_global_strings__bindgen_ty_2__bindgen_ty_262 { fn default() -> Self { - unsafe { ::std::mem::zeroed() } + let mut s = ::std::mem::MaybeUninit::::uninit(); + unsafe { + ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1); + s.assume_init() + } } } #[repr(C)] @@ -4806,7 +5985,11 @@ pub struct _Py_global_strings__bindgen_ty_2__bindgen_ty_263 { } impl Default for _Py_global_strings__bindgen_ty_2__bindgen_ty_263 { fn default() -> Self { - unsafe { ::std::mem::zeroed() } + let mut s = ::std::mem::MaybeUninit::::uninit(); + unsafe { + ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1); + s.assume_init() + } } } #[repr(C)] @@ -4817,7 +6000,11 @@ pub struct _Py_global_strings__bindgen_ty_2__bindgen_ty_264 { } impl Default for _Py_global_strings__bindgen_ty_2__bindgen_ty_264 { fn default() -> Self { - unsafe { ::std::mem::zeroed() } + let mut s = ::std::mem::MaybeUninit::::uninit(); + unsafe { + ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1); + s.assume_init() + } } } #[repr(C)] @@ -4828,7 +6015,11 @@ pub struct _Py_global_strings__bindgen_ty_2__bindgen_ty_265 { } impl Default for _Py_global_strings__bindgen_ty_2__bindgen_ty_265 { fn default() -> Self { - unsafe { ::std::mem::zeroed() } + let mut s = ::std::mem::MaybeUninit::::uninit(); + unsafe { + ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1); + s.assume_init() + } } } #[repr(C)] @@ -4839,7 +6030,11 @@ pub struct _Py_global_strings__bindgen_ty_2__bindgen_ty_266 { } impl Default for _Py_global_strings__bindgen_ty_2__bindgen_ty_266 { fn default() -> Self { - unsafe { ::std::mem::zeroed() } + let mut s = ::std::mem::MaybeUninit::::uninit(); + unsafe { + ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1); + s.assume_init() + } } } #[repr(C)] @@ -4850,7 +6045,11 @@ pub struct _Py_global_strings__bindgen_ty_2__bindgen_ty_267 { } impl Default for _Py_global_strings__bindgen_ty_2__bindgen_ty_267 { fn default() -> Self { - unsafe { ::std::mem::zeroed() } + let mut s = ::std::mem::MaybeUninit::::uninit(); + unsafe { + ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1); + s.assume_init() + } } } #[repr(C)] @@ -4861,7 +6060,11 @@ pub struct _Py_global_strings__bindgen_ty_2__bindgen_ty_268 { } impl Default for _Py_global_strings__bindgen_ty_2__bindgen_ty_268 { fn default() -> Self { - unsafe { ::std::mem::zeroed() } + let mut s = ::std::mem::MaybeUninit::::uninit(); + unsafe { + ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1); + s.assume_init() + } } } #[repr(C)] @@ -4872,7 +6075,11 @@ pub struct _Py_global_strings__bindgen_ty_2__bindgen_ty_269 { } impl Default for _Py_global_strings__bindgen_ty_2__bindgen_ty_269 { fn default() -> Self { - unsafe { ::std::mem::zeroed() } + let mut s = ::std::mem::MaybeUninit::::uninit(); + unsafe { + ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1); + s.assume_init() + } } } #[repr(C)] @@ -4883,7 +6090,11 @@ pub struct _Py_global_strings__bindgen_ty_2__bindgen_ty_270 { } impl Default for _Py_global_strings__bindgen_ty_2__bindgen_ty_270 { fn default() -> Self { - unsafe { ::std::mem::zeroed() } + let mut s = ::std::mem::MaybeUninit::::uninit(); + unsafe { + ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1); + s.assume_init() + } } } #[repr(C)] @@ -4894,7 +6105,11 @@ pub struct _Py_global_strings__bindgen_ty_2__bindgen_ty_271 { } impl Default for _Py_global_strings__bindgen_ty_2__bindgen_ty_271 { fn default() -> Self { - unsafe { ::std::mem::zeroed() } + let mut s = ::std::mem::MaybeUninit::::uninit(); + unsafe { + ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1); + s.assume_init() + } } } #[repr(C)] @@ -4905,7 +6120,11 @@ pub struct _Py_global_strings__bindgen_ty_2__bindgen_ty_272 { } impl Default for _Py_global_strings__bindgen_ty_2__bindgen_ty_272 { fn default() -> Self { - unsafe { ::std::mem::zeroed() } + let mut s = ::std::mem::MaybeUninit::::uninit(); + unsafe { + ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1); + s.assume_init() + } } } #[repr(C)] @@ -4916,7 +6135,11 @@ pub struct _Py_global_strings__bindgen_ty_2__bindgen_ty_273 { } impl Default for _Py_global_strings__bindgen_ty_2__bindgen_ty_273 { fn default() -> Self { - unsafe { ::std::mem::zeroed() } + let mut s = ::std::mem::MaybeUninit::::uninit(); + unsafe { + ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1); + s.assume_init() + } } } #[repr(C)] @@ -4927,7 +6150,11 @@ pub struct _Py_global_strings__bindgen_ty_2__bindgen_ty_274 { } impl Default for _Py_global_strings__bindgen_ty_2__bindgen_ty_274 { fn default() -> Self { - unsafe { ::std::mem::zeroed() } + let mut s = ::std::mem::MaybeUninit::::uninit(); + unsafe { + ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1); + s.assume_init() + } } } #[repr(C)] @@ -4938,7 +6165,11 @@ pub struct _Py_global_strings__bindgen_ty_2__bindgen_ty_275 { } impl Default for _Py_global_strings__bindgen_ty_2__bindgen_ty_275 { fn default() -> Self { - unsafe { ::std::mem::zeroed() } + let mut s = ::std::mem::MaybeUninit::::uninit(); + unsafe { + ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1); + s.assume_init() + } } } #[repr(C)] @@ -4949,7 +6180,11 @@ pub struct _Py_global_strings__bindgen_ty_2__bindgen_ty_276 { } impl Default for _Py_global_strings__bindgen_ty_2__bindgen_ty_276 { fn default() -> Self { - unsafe { ::std::mem::zeroed() } + let mut s = ::std::mem::MaybeUninit::::uninit(); + unsafe { + ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1); + s.assume_init() + } } } #[repr(C)] @@ -4960,7 +6195,11 @@ pub struct _Py_global_strings__bindgen_ty_2__bindgen_ty_277 { } impl Default for _Py_global_strings__bindgen_ty_2__bindgen_ty_277 { fn default() -> Self { - unsafe { ::std::mem::zeroed() } + let mut s = ::std::mem::MaybeUninit::::uninit(); + unsafe { + ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1); + s.assume_init() + } } } #[repr(C)] @@ -4971,7 +6210,11 @@ pub struct _Py_global_strings__bindgen_ty_2__bindgen_ty_278 { } impl Default for _Py_global_strings__bindgen_ty_2__bindgen_ty_278 { fn default() -> Self { - unsafe { ::std::mem::zeroed() } + let mut s = ::std::mem::MaybeUninit::::uninit(); + unsafe { + ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1); + s.assume_init() + } } } #[repr(C)] @@ -4982,7 +6225,11 @@ pub struct _Py_global_strings__bindgen_ty_2__bindgen_ty_279 { } impl Default for _Py_global_strings__bindgen_ty_2__bindgen_ty_279 { fn default() -> Self { - unsafe { ::std::mem::zeroed() } + let mut s = ::std::mem::MaybeUninit::::uninit(); + unsafe { + ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1); + s.assume_init() + } } } #[repr(C)] @@ -4993,7 +6240,11 @@ pub struct _Py_global_strings__bindgen_ty_2__bindgen_ty_280 { } impl Default for _Py_global_strings__bindgen_ty_2__bindgen_ty_280 { fn default() -> Self { - unsafe { ::std::mem::zeroed() } + let mut s = ::std::mem::MaybeUninit::::uninit(); + unsafe { + ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1); + s.assume_init() + } } } #[repr(C)] @@ -5004,7 +6255,11 @@ pub struct _Py_global_strings__bindgen_ty_2__bindgen_ty_281 { } impl Default for _Py_global_strings__bindgen_ty_2__bindgen_ty_281 { fn default() -> Self { - unsafe { ::std::mem::zeroed() } + let mut s = ::std::mem::MaybeUninit::::uninit(); + unsafe { + ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1); + s.assume_init() + } } } #[repr(C)] @@ -5015,7 +6270,11 @@ pub struct _Py_global_strings__bindgen_ty_2__bindgen_ty_282 { } impl Default for _Py_global_strings__bindgen_ty_2__bindgen_ty_282 { fn default() -> Self { - unsafe { ::std::mem::zeroed() } + let mut s = ::std::mem::MaybeUninit::::uninit(); + unsafe { + ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1); + s.assume_init() + } } } #[repr(C)] @@ -5026,7 +6285,11 @@ pub struct _Py_global_strings__bindgen_ty_2__bindgen_ty_283 { } impl Default for _Py_global_strings__bindgen_ty_2__bindgen_ty_283 { fn default() -> Self { - unsafe { ::std::mem::zeroed() } + let mut s = ::std::mem::MaybeUninit::::uninit(); + unsafe { + ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1); + s.assume_init() + } } } #[repr(C)] @@ -5037,7 +6300,11 @@ pub struct _Py_global_strings__bindgen_ty_2__bindgen_ty_284 { } impl Default for _Py_global_strings__bindgen_ty_2__bindgen_ty_284 { fn default() -> Self { - unsafe { ::std::mem::zeroed() } + let mut s = ::std::mem::MaybeUninit::::uninit(); + unsafe { + ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1); + s.assume_init() + } } } #[repr(C)] @@ -5048,7 +6315,11 @@ pub struct _Py_global_strings__bindgen_ty_2__bindgen_ty_285 { } impl Default for _Py_global_strings__bindgen_ty_2__bindgen_ty_285 { fn default() -> Self { - unsafe { ::std::mem::zeroed() } + let mut s = ::std::mem::MaybeUninit::::uninit(); + unsafe { + ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1); + s.assume_init() + } } } #[repr(C)] @@ -5059,7 +6330,11 @@ pub struct _Py_global_strings__bindgen_ty_2__bindgen_ty_286 { } impl Default for _Py_global_strings__bindgen_ty_2__bindgen_ty_286 { fn default() -> Self { - unsafe { ::std::mem::zeroed() } + let mut s = ::std::mem::MaybeUninit::::uninit(); + unsafe { + ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1); + s.assume_init() + } } } #[repr(C)] @@ -5070,7 +6345,11 @@ pub struct _Py_global_strings__bindgen_ty_2__bindgen_ty_287 { } impl Default for _Py_global_strings__bindgen_ty_2__bindgen_ty_287 { fn default() -> Self { - unsafe { ::std::mem::zeroed() } + let mut s = ::std::mem::MaybeUninit::::uninit(); + unsafe { + ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1); + s.assume_init() + } } } #[repr(C)] @@ -5081,7 +6360,11 @@ pub struct _Py_global_strings__bindgen_ty_2__bindgen_ty_288 { } impl Default for _Py_global_strings__bindgen_ty_2__bindgen_ty_288 { fn default() -> Self { - unsafe { ::std::mem::zeroed() } + let mut s = ::std::mem::MaybeUninit::::uninit(); + unsafe { + ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1); + s.assume_init() + } } } #[repr(C)] @@ -5092,7 +6375,11 @@ pub struct _Py_global_strings__bindgen_ty_2__bindgen_ty_289 { } impl Default for _Py_global_strings__bindgen_ty_2__bindgen_ty_289 { fn default() -> Self { - unsafe { ::std::mem::zeroed() } + let mut s = ::std::mem::MaybeUninit::::uninit(); + unsafe { + ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1); + s.assume_init() + } } } #[repr(C)] @@ -5103,7 +6390,11 @@ pub struct _Py_global_strings__bindgen_ty_2__bindgen_ty_290 { } impl Default for _Py_global_strings__bindgen_ty_2__bindgen_ty_290 { fn default() -> Self { - unsafe { ::std::mem::zeroed() } + let mut s = ::std::mem::MaybeUninit::::uninit(); + unsafe { + ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1); + s.assume_init() + } } } #[repr(C)] @@ -5114,7 +6405,11 @@ pub struct _Py_global_strings__bindgen_ty_2__bindgen_ty_291 { } impl Default for _Py_global_strings__bindgen_ty_2__bindgen_ty_291 { fn default() -> Self { - unsafe { ::std::mem::zeroed() } + let mut s = ::std::mem::MaybeUninit::::uninit(); + unsafe { + ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1); + s.assume_init() + } } } #[repr(C)] @@ -5125,7 +6420,11 @@ pub struct _Py_global_strings__bindgen_ty_2__bindgen_ty_292 { } impl Default for _Py_global_strings__bindgen_ty_2__bindgen_ty_292 { fn default() -> Self { - unsafe { ::std::mem::zeroed() } + let mut s = ::std::mem::MaybeUninit::::uninit(); + unsafe { + ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1); + s.assume_init() + } } } #[repr(C)] @@ -5136,7 +6435,11 @@ pub struct _Py_global_strings__bindgen_ty_2__bindgen_ty_293 { } impl Default for _Py_global_strings__bindgen_ty_2__bindgen_ty_293 { fn default() -> Self { - unsafe { ::std::mem::zeroed() } + let mut s = ::std::mem::MaybeUninit::::uninit(); + unsafe { + ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1); + s.assume_init() + } } } #[repr(C)] @@ -5147,7 +6450,11 @@ pub struct _Py_global_strings__bindgen_ty_2__bindgen_ty_294 { } impl Default for _Py_global_strings__bindgen_ty_2__bindgen_ty_294 { fn default() -> Self { - unsafe { ::std::mem::zeroed() } + let mut s = ::std::mem::MaybeUninit::::uninit(); + unsafe { + ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1); + s.assume_init() + } } } #[repr(C)] @@ -5158,7 +6465,11 @@ pub struct _Py_global_strings__bindgen_ty_2__bindgen_ty_295 { } impl Default for _Py_global_strings__bindgen_ty_2__bindgen_ty_295 { fn default() -> Self { - unsafe { ::std::mem::zeroed() } + let mut s = ::std::mem::MaybeUninit::::uninit(); + unsafe { + ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1); + s.assume_init() + } } } #[repr(C)] @@ -5169,7 +6480,11 @@ pub struct _Py_global_strings__bindgen_ty_2__bindgen_ty_296 { } impl Default for _Py_global_strings__bindgen_ty_2__bindgen_ty_296 { fn default() -> Self { - unsafe { ::std::mem::zeroed() } + let mut s = ::std::mem::MaybeUninit::::uninit(); + unsafe { + ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1); + s.assume_init() + } } } #[repr(C)] @@ -5180,7 +6495,11 @@ pub struct _Py_global_strings__bindgen_ty_2__bindgen_ty_297 { } impl Default for _Py_global_strings__bindgen_ty_2__bindgen_ty_297 { fn default() -> Self { - unsafe { ::std::mem::zeroed() } + let mut s = ::std::mem::MaybeUninit::::uninit(); + unsafe { + ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1); + s.assume_init() + } } } #[repr(C)] @@ -5191,7 +6510,11 @@ pub struct _Py_global_strings__bindgen_ty_2__bindgen_ty_298 { } impl Default for _Py_global_strings__bindgen_ty_2__bindgen_ty_298 { fn default() -> Self { - unsafe { ::std::mem::zeroed() } + let mut s = ::std::mem::MaybeUninit::::uninit(); + unsafe { + ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1); + s.assume_init() + } } } #[repr(C)] @@ -5202,7 +6525,11 @@ pub struct _Py_global_strings__bindgen_ty_2__bindgen_ty_299 { } impl Default for _Py_global_strings__bindgen_ty_2__bindgen_ty_299 { fn default() -> Self { - unsafe { ::std::mem::zeroed() } + let mut s = ::std::mem::MaybeUninit::::uninit(); + unsafe { + ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1); + s.assume_init() + } } } #[repr(C)] @@ -5213,7 +6540,11 @@ pub struct _Py_global_strings__bindgen_ty_2__bindgen_ty_300 { } impl Default for _Py_global_strings__bindgen_ty_2__bindgen_ty_300 { fn default() -> Self { - unsafe { ::std::mem::zeroed() } + let mut s = ::std::mem::MaybeUninit::::uninit(); + unsafe { + ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1); + s.assume_init() + } } } #[repr(C)] @@ -5224,7 +6555,11 @@ pub struct _Py_global_strings__bindgen_ty_2__bindgen_ty_301 { } impl Default for _Py_global_strings__bindgen_ty_2__bindgen_ty_301 { fn default() -> Self { - unsafe { ::std::mem::zeroed() } + let mut s = ::std::mem::MaybeUninit::::uninit(); + unsafe { + ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1); + s.assume_init() + } } } #[repr(C)] @@ -5235,7 +6570,11 @@ pub struct _Py_global_strings__bindgen_ty_2__bindgen_ty_302 { } impl Default for _Py_global_strings__bindgen_ty_2__bindgen_ty_302 { fn default() -> Self { - unsafe { ::std::mem::zeroed() } + let mut s = ::std::mem::MaybeUninit::::uninit(); + unsafe { + ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1); + s.assume_init() + } } } #[repr(C)] @@ -5246,7 +6585,11 @@ pub struct _Py_global_strings__bindgen_ty_2__bindgen_ty_303 { } impl Default for _Py_global_strings__bindgen_ty_2__bindgen_ty_303 { fn default() -> Self { - unsafe { ::std::mem::zeroed() } + let mut s = ::std::mem::MaybeUninit::::uninit(); + unsafe { + ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1); + s.assume_init() + } } } #[repr(C)] @@ -5257,12 +6600,20 @@ pub struct _Py_global_strings__bindgen_ty_2__bindgen_ty_304 { } impl Default for _Py_global_strings__bindgen_ty_2__bindgen_ty_304 { fn default() -> Self { - unsafe { ::std::mem::zeroed() } + let mut s = ::std::mem::MaybeUninit::::uninit(); + unsafe { + ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1); + s.assume_init() + } } } impl Default for _Py_global_strings__bindgen_ty_2 { fn default() -> Self { - unsafe { ::std::mem::zeroed() } + let mut s = ::std::mem::MaybeUninit::::uninit(); + unsafe { + ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1); + s.assume_init() + } } } #[repr(C)] @@ -5273,7 +6624,11 @@ pub struct _Py_global_strings__bindgen_ty_3 { } impl Default for _Py_global_strings__bindgen_ty_3 { fn default() -> Self { - unsafe { ::std::mem::zeroed() } + let mut s = ::std::mem::MaybeUninit::::uninit(); + unsafe { + ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1); + s.assume_init() + } } } #[repr(C)] @@ -5284,21 +6639,29 @@ pub struct _Py_global_strings__bindgen_ty_4 { } impl Default for _Py_global_strings__bindgen_ty_4 { fn default() -> Self { - unsafe { ::std::mem::zeroed() } + let mut s = ::std::mem::MaybeUninit::::uninit(); + unsafe { + ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1); + s.assume_init() + } } } impl Default for _Py_global_strings { fn default() -> Self { - unsafe { ::std::mem::zeroed() } + let mut s = ::std::mem::MaybeUninit::::uninit(); + unsafe { + ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1); + s.assume_init() + } } } #[repr(C)] -#[derive(Copy, Clone)] +#[derive(Debug, Copy, Clone)] pub struct _Py_global_objects { pub singletons: _Py_global_objects__bindgen_ty_1, } #[repr(C)] -#[derive(Copy, Clone)] +#[derive(Debug, Copy, Clone)] pub struct _Py_global_objects__bindgen_ty_1 { pub small_ints: [PyLongObject; 262usize], pub bytes_empty: PyBytesObject, @@ -5315,23 +6678,37 @@ pub struct _Py_global_objects__bindgen_ty_1__bindgen_ty_1 { } impl Default for _Py_global_objects__bindgen_ty_1__bindgen_ty_1 { fn default() -> Self { - unsafe { ::std::mem::zeroed() } + let mut s = ::std::mem::MaybeUninit::::uninit(); + unsafe { + ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1); + s.assume_init() + } } } impl Default for _Py_global_objects__bindgen_ty_1 { fn default() -> Self { - unsafe { ::std::mem::zeroed() } + let mut s = ::std::mem::MaybeUninit::::uninit(); + unsafe { + ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1); + s.assume_init() + } } } impl Default for _Py_global_objects { fn default() -> Self { - unsafe { ::std::mem::zeroed() } + let mut s = ::std::mem::MaybeUninit::::uninit(); + unsafe { + ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1); + s.assume_init() + } } } #[repr(C)] #[derive(Debug, Copy, Clone)] pub struct ast_state { pub initialized: ::std::os::raw::c_int, + pub recursion_depth: ::std::os::raw::c_int, + pub recursion_limit: ::std::os::raw::c_int, pub AST_type: *mut PyObject, pub Add_singleton: *mut PyObject, pub Add_type: *mut PyObject, @@ -5570,7 +6947,11 @@ pub struct ast_state { } impl Default for ast_state { fn default() -> Self { - unsafe { ::std::mem::zeroed() } + let mut s = ::std::mem::MaybeUninit::::uninit(); + unsafe { + ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1); + s.assume_init() + } } } #[repr(C)] @@ -5582,7 +6963,11 @@ pub struct callable_cache { } impl Default for callable_cache { fn default() -> Self { - unsafe { ::std::mem::zeroed() } + let mut s = ::std::mem::MaybeUninit::::uninit(); + unsafe { + ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1); + s.assume_init() + } } } #[repr(C)] @@ -5592,7 +6977,11 @@ pub struct PyHamtNode { } impl Default for PyHamtNode { fn default() -> Self { - unsafe { ::std::mem::zeroed() } + let mut s = ::std::mem::MaybeUninit::::uninit(); + unsafe { + ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1); + s.assume_init() + } } } #[repr(C)] @@ -5605,7 +6994,11 @@ pub struct PyHamtObject { } impl Default for PyHamtObject { fn default() -> Self { - unsafe { ::std::mem::zeroed() } + let mut s = ::std::mem::MaybeUninit::::uninit(); + unsafe { + ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1); + s.assume_init() + } } } #[repr(C)] @@ -5616,7 +7009,11 @@ pub struct _Py_context_state { } impl Default for _Py_context_state { fn default() -> Self { - unsafe { ::std::mem::zeroed() } + let mut s = ::std::mem::MaybeUninit::::uninit(); + unsafe { + ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1); + s.assume_init() + } } } #[repr(C)] @@ -5630,11 +7027,15 @@ pub struct _pycontextobject { } impl Default for _pycontextobject { fn default() -> Self { - unsafe { ::std::mem::zeroed() } + let mut s = ::std::mem::MaybeUninit::::uninit(); + unsafe { + ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1); + s.assume_init() + } } } #[repr(C)] -#[derive(Copy, Clone)] +#[derive(Debug, Copy, Clone)] pub struct _Py_dict_state { pub free_list: [*mut PyDictObject; 80usize], pub numfree: ::std::os::raw::c_int, @@ -5643,7 +7044,11 @@ pub struct _Py_dict_state { } impl Default for _Py_dict_state { fn default() -> Self { - unsafe { ::std::mem::zeroed() } + let mut s = ::std::mem::MaybeUninit::::uninit(); + unsafe { + ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1); + s.assume_init() + } } } #[repr(C)] @@ -5655,7 +7060,11 @@ pub struct PyDictKeyEntry { } impl Default for PyDictKeyEntry { fn default() -> Self { - unsafe { ::std::mem::zeroed() } + let mut s = ::std::mem::MaybeUninit::::uninit(); + unsafe { + ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1); + s.assume_init() + } } } #[repr(C)] @@ -5666,7 +7075,11 @@ pub struct PyDictUnicodeEntry { } impl Default for PyDictUnicodeEntry { fn default() -> Self { - unsafe { ::std::mem::zeroed() } + let mut s = ::std::mem::MaybeUninit::::uninit(); + unsafe { + ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1); + s.assume_init() + } } } #[repr(C)] @@ -5688,7 +7101,11 @@ pub struct _dictvalues { } impl Default for _dictvalues { fn default() -> Self { - unsafe { ::std::mem::zeroed() } + let mut s = ::std::mem::MaybeUninit::::uninit(); + unsafe { + ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1); + s.assume_init() + } } } #[repr(C)] @@ -5701,7 +7118,11 @@ pub struct _Py_exc_state { } impl Default for _Py_exc_state { fn default() -> Self { - unsafe { ::std::mem::zeroed() } + let mut s = ::std::mem::MaybeUninit::::uninit(); + unsafe { + ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1); + s.assume_init() + } } } #[repr(C)] @@ -5712,11 +7133,15 @@ pub struct _Py_float_state { } impl Default for _Py_float_state { fn default() -> Self { - unsafe { ::std::mem::zeroed() } + let mut s = ::std::mem::MaybeUninit::::uninit(); + unsafe { + ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1); + s.assume_init() + } } } #[repr(C)] -#[derive(Copy, Clone)] +#[derive(Debug, Copy, Clone)] pub struct _Py_async_gen_state { pub value_freelist: [*mut _PyAsyncGenWrappedValue; 80usize], pub value_numfree: ::std::os::raw::c_int, @@ -5725,18 +7150,26 @@ pub struct _Py_async_gen_state { } impl Default for _Py_async_gen_state { fn default() -> Self { - unsafe { ::std::mem::zeroed() } + let mut s = ::std::mem::MaybeUninit::::uninit(); + unsafe { + ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1); + s.assume_init() + } } } #[repr(C)] -#[derive(Copy, Clone)] +#[derive(Debug, Copy, Clone)] pub struct _Py_list_state { pub free_list: [*mut PyListObject; 80usize], pub numfree: ::std::os::raw::c_int, } impl Default for _Py_list_state { fn default() -> Self { - unsafe { ::std::mem::zeroed() } + let mut s = ::std::mem::MaybeUninit::::uninit(); + unsafe { + ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1); + s.assume_init() + } } } #[repr(C)] @@ -5747,7 +7180,11 @@ pub struct _Py_tuple_state { } impl Default for _Py_tuple_state { fn default() -> Self { - unsafe { ::std::mem::zeroed() } + let mut s = ::std::mem::MaybeUninit::::uninit(); + unsafe { + ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1); + s.assume_init() + } } } #[repr(C)] @@ -5759,17 +7196,25 @@ pub struct type_cache_entry { } impl Default for type_cache_entry { fn default() -> Self { - unsafe { ::std::mem::zeroed() } + let mut s = ::std::mem::MaybeUninit::::uninit(); + unsafe { + ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1); + s.assume_init() + } } } #[repr(C)] -#[derive(Copy, Clone)] +#[derive(Debug, Copy, Clone)] pub struct type_cache { pub hashtable: [type_cache_entry; 4096usize], } impl Default for type_cache { fn default() -> Self { - unsafe { ::std::mem::zeroed() } + let mut s = ::std::mem::MaybeUninit::::uninit(); + unsafe { + ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1); + s.assume_init() + } } } pub const _Py_error_handler__Py_ERROR_UNKNOWN: _Py_error_handler = 0; @@ -5781,7 +7226,7 @@ pub const _Py_error_handler__Py_ERROR_BACKSLASHREPLACE: _Py_error_handler = 5; pub const _Py_error_handler__Py_ERROR_SURROGATEPASS: _Py_error_handler = 6; pub const _Py_error_handler__Py_ERROR_XMLCHARREFREPLACE: _Py_error_handler = 7; pub const _Py_error_handler__Py_ERROR_OTHER: _Py_error_handler = 8; -pub type _Py_error_handler = u32; +pub type _Py_error_handler = ::std::os::raw::c_uint; #[repr(C)] #[derive(Debug, Copy, Clone)] pub struct _Py_unicode_runtime_ids { @@ -5790,7 +7235,11 @@ pub struct _Py_unicode_runtime_ids { } impl Default for _Py_unicode_runtime_ids { fn default() -> Self { - unsafe { ::std::mem::zeroed() } + let mut s = ::std::mem::MaybeUninit::::uninit(); + unsafe { + ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1); + s.assume_init() + } } } #[repr(C)] @@ -5803,7 +7252,11 @@ pub struct _Py_unicode_fs_codec { } impl Default for _Py_unicode_fs_codec { fn default() -> Self { - unsafe { ::std::mem::zeroed() } + let mut s = ::std::mem::MaybeUninit::::uninit(); + unsafe { + ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1); + s.assume_init() + } } } #[repr(C)] @@ -5814,7 +7267,11 @@ pub struct _Py_unicode_ids { } impl Default for _Py_unicode_ids { fn default() -> Self { - unsafe { ::std::mem::zeroed() } + let mut s = ::std::mem::MaybeUninit::::uninit(); + unsafe { + ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1); + s.assume_init() + } } } #[repr(C)] @@ -5825,7 +7282,11 @@ pub struct _Py_unicode_state { } impl Default for _Py_unicode_state { fn default() -> Self { - unsafe { ::std::mem::zeroed() } + let mut s = ::std::mem::MaybeUninit::::uninit(); + unsafe { + ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1); + s.assume_init() + } } } #[repr(C)] @@ -5838,7 +7299,11 @@ pub struct _warnings_runtime_state { } impl Default for _warnings_runtime_state { fn default() -> Self { - unsafe { ::std::mem::zeroed() } + let mut s = ::std::mem::MaybeUninit::::uninit(); + unsafe { + ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1); + s.assume_init() + } } } #[repr(C)] @@ -5861,12 +7326,20 @@ pub struct _pending_calls__bindgen_ty_1 { } impl Default for _pending_calls__bindgen_ty_1 { fn default() -> Self { - unsafe { ::std::mem::zeroed() } + let mut s = ::std::mem::MaybeUninit::::uninit(); + unsafe { + ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1); + s.assume_init() + } } } impl Default for _pending_calls { fn default() -> Self { - unsafe { ::std::mem::zeroed() } + let mut s = ::std::mem::MaybeUninit::::uninit(); + unsafe { + ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1); + s.assume_init() + } } } #[repr(C)] @@ -5879,7 +7352,11 @@ pub struct _ceval_state { } impl Default for _ceval_state { fn default() -> Self { - unsafe { ::std::mem::zeroed() } + let mut s = ::std::mem::MaybeUninit::::uninit(); + unsafe { + ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1); + s.assume_init() + } } } #[repr(C)] @@ -5891,7 +7368,11 @@ pub struct atexit_callback { } impl Default for atexit_callback { fn default() -> Self { - unsafe { ::std::mem::zeroed() } + let mut s = ::std::mem::MaybeUninit::::uninit(); + unsafe { + ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1); + s.assume_init() + } } } #[repr(C)] @@ -5903,11 +7384,15 @@ pub struct atexit_state { } impl Default for atexit_state { fn default() -> Self { - unsafe { ::std::mem::zeroed() } + let mut s = ::std::mem::MaybeUninit::::uninit(); + unsafe { + ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1); + s.assume_init() + } } } #[repr(C)] -#[derive(Copy, Clone)] +#[derive(Debug, Copy, Clone)] pub struct _is { pub next: *mut PyInterpreterState, pub threads: _is_pythreads, @@ -5957,6 +7442,7 @@ pub struct _is { pub ast: ast_state, pub type_cache: type_cache, pub callable_cache: callable_cache, + pub int_max_str_digits: ::std::os::raw::c_int, pub _initial_thread: PyThreadState, } #[repr(C)] @@ -5969,12 +7455,20 @@ pub struct _is_pythreads { } impl Default for _is_pythreads { fn default() -> Self { - unsafe { ::std::mem::zeroed() } + let mut s = ::std::mem::MaybeUninit::::uninit(); + unsafe { + ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1); + s.assume_init() + } } } impl Default for _is { fn default() -> Self { - unsafe { ::std::mem::zeroed() } + let mut s = ::std::mem::MaybeUninit::::uninit(); + unsafe { + ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1); + s.assume_init() + } } } #[repr(C)] @@ -5986,18 +7480,26 @@ pub struct _xidregitem { } impl Default for _xidregitem { fn default() -> Self { - unsafe { ::std::mem::zeroed() } + let mut s = ::std::mem::MaybeUninit::::uninit(); + unsafe { + ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1); + s.assume_init() + } } } #[repr(C)] -#[derive(Copy, Clone)] +#[derive(Debug, Copy, Clone)] pub struct _ceval_runtime_state { pub signals_pending: _Py_atomic_int, pub gil: _gil_runtime_state, } impl Default for _ceval_runtime_state { fn default() -> Self { - unsafe { ::std::mem::zeroed() } + let mut s = ::std::mem::MaybeUninit::::uninit(); + unsafe { + ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1); + s.assume_init() + } } } #[repr(C)] @@ -6010,7 +7512,11 @@ pub struct _gilstate_runtime_state { } impl Default for _gilstate_runtime_state { fn default() -> Self { - unsafe { ::std::mem::zeroed() } + let mut s = ::std::mem::MaybeUninit::::uninit(); + unsafe { + ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1); + s.assume_init() + } } } #[repr(C)] @@ -6022,11 +7528,15 @@ pub struct _Py_AuditHookEntry { } impl Default for _Py_AuditHookEntry { fn default() -> Self { - unsafe { ::std::mem::zeroed() } + let mut s = ::std::mem::MaybeUninit::::uninit(); + unsafe { + ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1); + s.assume_init() + } } } #[repr(C)] -#[derive(Copy, Clone)] +#[derive(Debug, Copy, Clone)] pub struct pyruntimestate { pub _initialized: ::std::os::raw::c_int, pub preinitializing: ::std::os::raw::c_int, @@ -6059,7 +7569,11 @@ pub struct pyruntimestate_pyinterpreters { } impl Default for pyruntimestate_pyinterpreters { fn default() -> Self { - unsafe { ::std::mem::zeroed() } + let mut s = ::std::mem::MaybeUninit::::uninit(); + unsafe { + ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1); + s.assume_init() + } } } #[repr(C)] @@ -6070,12 +7584,20 @@ pub struct pyruntimestate__xidregistry { } impl Default for pyruntimestate__xidregistry { fn default() -> Self { - unsafe { ::std::mem::zeroed() } + let mut s = ::std::mem::MaybeUninit::::uninit(); + unsafe { + ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1); + s.assume_init() + } } } impl Default for pyruntimestate { fn default() -> Self { - unsafe { ::std::mem::zeroed() } + let mut s = ::std::mem::MaybeUninit::::uninit(); + unsafe { + ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1); + s.assume_init() + } } } #[repr(C)] @@ -6093,7 +7615,11 @@ pub struct _frame { } impl Default for _frame { fn default() -> Self { - unsafe { ::std::mem::zeroed() } + let mut s = ::std::mem::MaybeUninit::::uninit(); + unsafe { + ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1); + s.assume_init() + } } } #[repr(C)] @@ -6114,7 +7640,11 @@ pub struct _PyInterpreterFrame { } impl Default for _PyInterpreterFrame { fn default() -> Self { - unsafe { ::std::mem::zeroed() } + let mut s = ::std::mem::MaybeUninit::::uninit(); + unsafe { + ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1); + s.assume_init() + } } } #[repr(C)] diff --git a/src/python_bindings/v3_6_15.rs b/src/python_bindings/v3_6_15.rs new file mode 100644 index 00000000..c3563d35 --- /dev/null +++ b/src/python_bindings/v3_6_15.rs @@ -0,0 +1,1020 @@ +// Generated bindings for python v3.6.15 +#![allow(dead_code)] +#![allow(non_upper_case_globals)] +#![allow(non_camel_case_types)] +#![allow(non_snake_case)] +#![allow(clippy::useless_transmute)] +#![allow(clippy::default_trait_access)] +#![allow(clippy::cast_lossless)] +#![allow(clippy::trivially_copy_pass_by_ref)] + +/* automatically generated by rust-bindgen 0.65.1 */ + +#[repr(C)] +#[derive(Copy, Clone, Debug, Default, Eq, Hash, Ord, PartialEq, PartialOrd)] +pub struct __BindgenBitfieldUnit { + storage: Storage, +} +impl __BindgenBitfieldUnit { + #[inline] + pub const fn new(storage: Storage) -> Self { + Self { storage } + } +} +impl __BindgenBitfieldUnit +where + Storage: AsRef<[u8]> + AsMut<[u8]>, +{ + #[inline] + pub fn get_bit(&self, index: usize) -> bool { + debug_assert!(index / 8 < self.storage.as_ref().len()); + let byte_index = index / 8; + let byte = self.storage.as_ref()[byte_index]; + let bit_index = if cfg!(target_endian = "big") { + 7 - (index % 8) + } else { + index % 8 + }; + let mask = 1 << bit_index; + byte & mask == mask + } + #[inline] + pub fn set_bit(&mut self, index: usize, val: bool) { + debug_assert!(index / 8 < self.storage.as_ref().len()); + let byte_index = index / 8; + let byte = &mut self.storage.as_mut()[byte_index]; + let bit_index = if cfg!(target_endian = "big") { + 7 - (index % 8) + } else { + index % 8 + }; + let mask = 1 << bit_index; + if val { + *byte |= mask; + } else { + *byte &= !mask; + } + } + #[inline] + pub fn get(&self, bit_offset: usize, bit_width: u8) -> u64 { + debug_assert!(bit_width <= 64); + debug_assert!(bit_offset / 8 < self.storage.as_ref().len()); + debug_assert!((bit_offset + (bit_width as usize)) / 8 <= self.storage.as_ref().len()); + let mut val = 0; + for i in 0..(bit_width as usize) { + if self.get_bit(i + bit_offset) { + let index = if cfg!(target_endian = "big") { + bit_width as usize - 1 - i + } else { + i + }; + val |= 1 << index; + } + } + val + } + #[inline] + pub fn set(&mut self, bit_offset: usize, bit_width: u8, val: u64) { + debug_assert!(bit_width <= 64); + debug_assert!(bit_offset / 8 < self.storage.as_ref().len()); + debug_assert!((bit_offset + (bit_width as usize)) / 8 <= self.storage.as_ref().len()); + for i in 0..(bit_width as usize) { + let mask = 1 << i; + let val_bit_is_set = val & mask == mask; + let index = if cfg!(target_endian = "big") { + bit_width as usize - 1 - i + } else { + i + }; + self.set_bit(index + bit_offset, val_bit_is_set); + } + } +} +pub type __int64_t = ::std::os::raw::c_longlong; +pub type __darwin_wchar_t = ::std::os::raw::c_int; +pub type __darwin_off_t = __int64_t; +pub type fpos_t = __darwin_off_t; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct __sbuf { + pub _base: *mut ::std::os::raw::c_uchar, + pub _size: ::std::os::raw::c_int, +} +impl Default for __sbuf { + fn default() -> Self { + let mut s = ::std::mem::MaybeUninit::::uninit(); + unsafe { + ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1); + s.assume_init() + } + } +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct __sFILEX { + _unused: [u8; 0], +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct __sFILE { + pub _p: *mut ::std::os::raw::c_uchar, + pub _r: ::std::os::raw::c_int, + pub _w: ::std::os::raw::c_int, + pub _flags: ::std::os::raw::c_short, + pub _file: ::std::os::raw::c_short, + pub _bf: __sbuf, + pub _lbfsize: ::std::os::raw::c_int, + pub _cookie: *mut ::std::os::raw::c_void, + pub _close: ::std::option::Option< + unsafe extern "C" fn(arg1: *mut ::std::os::raw::c_void) -> ::std::os::raw::c_int, + >, + pub _read: ::std::option::Option< + unsafe extern "C" fn( + arg1: *mut ::std::os::raw::c_void, + arg2: *mut ::std::os::raw::c_char, + arg3: ::std::os::raw::c_int, + ) -> ::std::os::raw::c_int, + >, + pub _seek: ::std::option::Option< + unsafe extern "C" fn( + arg1: *mut ::std::os::raw::c_void, + arg2: fpos_t, + arg3: ::std::os::raw::c_int, + ) -> fpos_t, + >, + pub _write: ::std::option::Option< + unsafe extern "C" fn( + arg1: *mut ::std::os::raw::c_void, + arg2: *const ::std::os::raw::c_char, + arg3: ::std::os::raw::c_int, + ) -> ::std::os::raw::c_int, + >, + pub _ub: __sbuf, + pub _extra: *mut __sFILEX, + pub _ur: ::std::os::raw::c_int, + pub _ubuf: [::std::os::raw::c_uchar; 3usize], + pub _nbuf: [::std::os::raw::c_uchar; 1usize], + pub _lb: __sbuf, + pub _blksize: ::std::os::raw::c_int, + pub _offset: fpos_t, +} +impl Default for __sFILE { + fn default() -> Self { + let mut s = ::std::mem::MaybeUninit::::uninit(); + unsafe { + ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1); + s.assume_init() + } + } +} +pub type FILE = __sFILE; +pub type wchar_t = __darwin_wchar_t; +pub type Py_ssize_t = isize; +pub type Py_hash_t = Py_ssize_t; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct _object { + pub ob_refcnt: Py_ssize_t, + pub ob_type: *mut _typeobject, +} +impl Default for _object { + fn default() -> Self { + let mut s = ::std::mem::MaybeUninit::::uninit(); + unsafe { + ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1); + s.assume_init() + } + } +} +pub type PyObject = _object; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct PyVarObject { + pub ob_base: PyObject, + pub ob_size: Py_ssize_t, +} +impl Default for PyVarObject { + fn default() -> Self { + let mut s = ::std::mem::MaybeUninit::::uninit(); + unsafe { + ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1); + s.assume_init() + } + } +} +pub type unaryfunc = + ::std::option::Option *mut PyObject>; +pub type binaryfunc = ::std::option::Option< + unsafe extern "C" fn(arg1: *mut PyObject, arg2: *mut PyObject) -> *mut PyObject, +>; +pub type ternaryfunc = ::std::option::Option< + unsafe extern "C" fn( + arg1: *mut PyObject, + arg2: *mut PyObject, + arg3: *mut PyObject, + ) -> *mut PyObject, +>; +pub type inquiry = + ::std::option::Option ::std::os::raw::c_int>; +pub type lenfunc = ::std::option::Option Py_ssize_t>; +pub type ssizeargfunc = ::std::option::Option< + unsafe extern "C" fn(arg1: *mut PyObject, arg2: Py_ssize_t) -> *mut PyObject, +>; +pub type ssizeobjargproc = ::std::option::Option< + unsafe extern "C" fn( + arg1: *mut PyObject, + arg2: Py_ssize_t, + arg3: *mut PyObject, + ) -> ::std::os::raw::c_int, +>; +pub type objobjargproc = ::std::option::Option< + unsafe extern "C" fn( + arg1: *mut PyObject, + arg2: *mut PyObject, + arg3: *mut PyObject, + ) -> ::std::os::raw::c_int, +>; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct bufferinfo { + pub buf: *mut ::std::os::raw::c_void, + pub obj: *mut PyObject, + pub len: Py_ssize_t, + pub itemsize: Py_ssize_t, + pub readonly: ::std::os::raw::c_int, + pub ndim: ::std::os::raw::c_int, + pub format: *mut ::std::os::raw::c_char, + pub shape: *mut Py_ssize_t, + pub strides: *mut Py_ssize_t, + pub suboffsets: *mut Py_ssize_t, + pub internal: *mut ::std::os::raw::c_void, +} +impl Default for bufferinfo { + fn default() -> Self { + let mut s = ::std::mem::MaybeUninit::::uninit(); + unsafe { + ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1); + s.assume_init() + } + } +} +pub type Py_buffer = bufferinfo; +pub type getbufferproc = ::std::option::Option< + unsafe extern "C" fn( + arg1: *mut PyObject, + arg2: *mut Py_buffer, + arg3: ::std::os::raw::c_int, + ) -> ::std::os::raw::c_int, +>; +pub type releasebufferproc = + ::std::option::Option; +pub type objobjproc = ::std::option::Option< + unsafe extern "C" fn(arg1: *mut PyObject, arg2: *mut PyObject) -> ::std::os::raw::c_int, +>; +pub type visitproc = ::std::option::Option< + unsafe extern "C" fn( + arg1: *mut PyObject, + arg2: *mut ::std::os::raw::c_void, + ) -> ::std::os::raw::c_int, +>; +pub type traverseproc = ::std::option::Option< + unsafe extern "C" fn( + arg1: *mut PyObject, + arg2: visitproc, + arg3: *mut ::std::os::raw::c_void, + ) -> ::std::os::raw::c_int, +>; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct PyNumberMethods { + pub nb_add: binaryfunc, + pub nb_subtract: binaryfunc, + pub nb_multiply: binaryfunc, + pub nb_remainder: binaryfunc, + pub nb_divmod: binaryfunc, + pub nb_power: ternaryfunc, + pub nb_negative: unaryfunc, + pub nb_positive: unaryfunc, + pub nb_absolute: unaryfunc, + pub nb_bool: inquiry, + pub nb_invert: unaryfunc, + pub nb_lshift: binaryfunc, + pub nb_rshift: binaryfunc, + pub nb_and: binaryfunc, + pub nb_xor: binaryfunc, + pub nb_or: binaryfunc, + pub nb_int: unaryfunc, + pub nb_reserved: *mut ::std::os::raw::c_void, + pub nb_float: unaryfunc, + pub nb_inplace_add: binaryfunc, + pub nb_inplace_subtract: binaryfunc, + pub nb_inplace_multiply: binaryfunc, + pub nb_inplace_remainder: binaryfunc, + pub nb_inplace_power: ternaryfunc, + pub nb_inplace_lshift: binaryfunc, + pub nb_inplace_rshift: binaryfunc, + pub nb_inplace_and: binaryfunc, + pub nb_inplace_xor: binaryfunc, + pub nb_inplace_or: binaryfunc, + pub nb_floor_divide: binaryfunc, + pub nb_true_divide: binaryfunc, + pub nb_inplace_floor_divide: binaryfunc, + pub nb_inplace_true_divide: binaryfunc, + pub nb_index: unaryfunc, + pub nb_matrix_multiply: binaryfunc, + pub nb_inplace_matrix_multiply: binaryfunc, +} +impl Default for PyNumberMethods { + fn default() -> Self { + let mut s = ::std::mem::MaybeUninit::::uninit(); + unsafe { + ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1); + s.assume_init() + } + } +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct PySequenceMethods { + pub sq_length: lenfunc, + pub sq_concat: binaryfunc, + pub sq_repeat: ssizeargfunc, + pub sq_item: ssizeargfunc, + pub was_sq_slice: *mut ::std::os::raw::c_void, + pub sq_ass_item: ssizeobjargproc, + pub was_sq_ass_slice: *mut ::std::os::raw::c_void, + pub sq_contains: objobjproc, + pub sq_inplace_concat: binaryfunc, + pub sq_inplace_repeat: ssizeargfunc, +} +impl Default for PySequenceMethods { + fn default() -> Self { + let mut s = ::std::mem::MaybeUninit::::uninit(); + unsafe { + ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1); + s.assume_init() + } + } +} +#[repr(C)] +#[derive(Debug, Default, Copy, Clone)] +pub struct PyMappingMethods { + pub mp_length: lenfunc, + pub mp_subscript: binaryfunc, + pub mp_ass_subscript: objobjargproc, +} +#[repr(C)] +#[derive(Debug, Default, Copy, Clone)] +pub struct PyAsyncMethods { + pub am_await: unaryfunc, + pub am_aiter: unaryfunc, + pub am_anext: unaryfunc, +} +#[repr(C)] +#[derive(Debug, Default, Copy, Clone)] +pub struct PyBufferProcs { + pub bf_getbuffer: getbufferproc, + pub bf_releasebuffer: releasebufferproc, +} +pub type freefunc = ::std::option::Option; +pub type destructor = ::std::option::Option; +pub type printfunc = ::std::option::Option< + unsafe extern "C" fn( + arg1: *mut PyObject, + arg2: *mut FILE, + arg3: ::std::os::raw::c_int, + ) -> ::std::os::raw::c_int, +>; +pub type getattrfunc = ::std::option::Option< + unsafe extern "C" fn(arg1: *mut PyObject, arg2: *mut ::std::os::raw::c_char) -> *mut PyObject, +>; +pub type getattrofunc = ::std::option::Option< + unsafe extern "C" fn(arg1: *mut PyObject, arg2: *mut PyObject) -> *mut PyObject, +>; +pub type setattrfunc = ::std::option::Option< + unsafe extern "C" fn( + arg1: *mut PyObject, + arg2: *mut ::std::os::raw::c_char, + arg3: *mut PyObject, + ) -> ::std::os::raw::c_int, +>; +pub type setattrofunc = ::std::option::Option< + unsafe extern "C" fn( + arg1: *mut PyObject, + arg2: *mut PyObject, + arg3: *mut PyObject, + ) -> ::std::os::raw::c_int, +>; +pub type reprfunc = + ::std::option::Option *mut PyObject>; +pub type hashfunc = ::std::option::Option Py_hash_t>; +pub type richcmpfunc = ::std::option::Option< + unsafe extern "C" fn( + arg1: *mut PyObject, + arg2: *mut PyObject, + arg3: ::std::os::raw::c_int, + ) -> *mut PyObject, +>; +pub type getiterfunc = + ::std::option::Option *mut PyObject>; +pub type iternextfunc = + ::std::option::Option *mut PyObject>; +pub type descrgetfunc = ::std::option::Option< + unsafe extern "C" fn( + arg1: *mut PyObject, + arg2: *mut PyObject, + arg3: *mut PyObject, + ) -> *mut PyObject, +>; +pub type descrsetfunc = ::std::option::Option< + unsafe extern "C" fn( + arg1: *mut PyObject, + arg2: *mut PyObject, + arg3: *mut PyObject, + ) -> ::std::os::raw::c_int, +>; +pub type initproc = ::std::option::Option< + unsafe extern "C" fn( + arg1: *mut PyObject, + arg2: *mut PyObject, + arg3: *mut PyObject, + ) -> ::std::os::raw::c_int, +>; +pub type newfunc = ::std::option::Option< + unsafe extern "C" fn( + arg1: *mut _typeobject, + arg2: *mut PyObject, + arg3: *mut PyObject, + ) -> *mut PyObject, +>; +pub type allocfunc = ::std::option::Option< + unsafe extern "C" fn(arg1: *mut _typeobject, arg2: Py_ssize_t) -> *mut PyObject, +>; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct _typeobject { + pub ob_base: PyVarObject, + pub tp_name: *const ::std::os::raw::c_char, + pub tp_basicsize: Py_ssize_t, + pub tp_itemsize: Py_ssize_t, + pub tp_dealloc: destructor, + pub tp_print: printfunc, + pub tp_getattr: getattrfunc, + pub tp_setattr: setattrfunc, + pub tp_as_async: *mut PyAsyncMethods, + pub tp_repr: reprfunc, + pub tp_as_number: *mut PyNumberMethods, + pub tp_as_sequence: *mut PySequenceMethods, + pub tp_as_mapping: *mut PyMappingMethods, + pub tp_hash: hashfunc, + pub tp_call: ternaryfunc, + pub tp_str: reprfunc, + pub tp_getattro: getattrofunc, + pub tp_setattro: setattrofunc, + pub tp_as_buffer: *mut PyBufferProcs, + pub tp_flags: ::std::os::raw::c_ulong, + pub tp_doc: *const ::std::os::raw::c_char, + pub tp_traverse: traverseproc, + pub tp_clear: inquiry, + pub tp_richcompare: richcmpfunc, + pub tp_weaklistoffset: Py_ssize_t, + pub tp_iter: getiterfunc, + pub tp_iternext: iternextfunc, + pub tp_methods: *mut PyMethodDef, + pub tp_members: *mut PyMemberDef, + pub tp_getset: *mut PyGetSetDef, + pub tp_base: *mut _typeobject, + pub tp_dict: *mut PyObject, + pub tp_descr_get: descrgetfunc, + pub tp_descr_set: descrsetfunc, + pub tp_dictoffset: Py_ssize_t, + pub tp_init: initproc, + pub tp_alloc: allocfunc, + pub tp_new: newfunc, + pub tp_free: freefunc, + pub tp_is_gc: inquiry, + pub tp_bases: *mut PyObject, + pub tp_mro: *mut PyObject, + pub tp_cache: *mut PyObject, + pub tp_subclasses: *mut PyObject, + pub tp_weaklist: *mut PyObject, + pub tp_del: destructor, + pub tp_version_tag: ::std::os::raw::c_uint, + pub tp_finalize: destructor, +} +impl Default for _typeobject { + fn default() -> Self { + let mut s = ::std::mem::MaybeUninit::::uninit(); + unsafe { + ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1); + s.assume_init() + } + } +} +pub type PyTypeObject = _typeobject; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct _heaptypeobject { + pub ht_type: PyTypeObject, + pub as_async: PyAsyncMethods, + pub as_number: PyNumberMethods, + pub as_mapping: PyMappingMethods, + pub as_sequence: PySequenceMethods, + pub as_buffer: PyBufferProcs, + pub ht_name: *mut PyObject, + pub ht_slots: *mut PyObject, + pub ht_qualname: *mut PyObject, + pub ht_cached_keys: *mut _dictkeysobject, +} +impl Default for _heaptypeobject { + fn default() -> Self { + let mut s = ::std::mem::MaybeUninit::::uninit(); + unsafe { + ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1); + s.assume_init() + } + } +} +pub type PyHeapTypeObject = _heaptypeobject; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct PyBytesObject { + pub ob_base: PyVarObject, + pub ob_shash: Py_hash_t, + pub ob_sval: [::std::os::raw::c_char; 1usize], +} +impl Default for PyBytesObject { + fn default() -> Self { + let mut s = ::std::mem::MaybeUninit::::uninit(); + unsafe { + ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1); + s.assume_init() + } + } +} +pub type Py_UCS4 = u32; +pub type Py_UCS2 = u16; +pub type Py_UCS1 = u8; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct PyASCIIObject { + pub ob_base: PyObject, + pub length: Py_ssize_t, + pub hash: Py_hash_t, + pub state: PyASCIIObject__bindgen_ty_1, + pub wstr: *mut wchar_t, +} +#[repr(C)] +#[repr(align(4))] +#[derive(Debug, Default, Copy, Clone)] +pub struct PyASCIIObject__bindgen_ty_1 { + pub _bitfield_align_1: [u8; 0], + pub _bitfield_1: __BindgenBitfieldUnit<[u8; 4usize]>, +} +impl PyASCIIObject__bindgen_ty_1 { + #[inline] + pub fn interned(&self) -> ::std::os::raw::c_uint { + unsafe { ::std::mem::transmute(self._bitfield_1.get(0usize, 2u8) as u32) } + } + #[inline] + pub fn set_interned(&mut self, val: ::std::os::raw::c_uint) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + self._bitfield_1.set(0usize, 2u8, val as u64) + } + } + #[inline] + pub fn kind(&self) -> ::std::os::raw::c_uint { + unsafe { ::std::mem::transmute(self._bitfield_1.get(2usize, 3u8) as u32) } + } + #[inline] + pub fn set_kind(&mut self, val: ::std::os::raw::c_uint) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + self._bitfield_1.set(2usize, 3u8, val as u64) + } + } + #[inline] + pub fn compact(&self) -> ::std::os::raw::c_uint { + unsafe { ::std::mem::transmute(self._bitfield_1.get(5usize, 1u8) as u32) } + } + #[inline] + pub fn set_compact(&mut self, val: ::std::os::raw::c_uint) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + self._bitfield_1.set(5usize, 1u8, val as u64) + } + } + #[inline] + pub fn ascii(&self) -> ::std::os::raw::c_uint { + unsafe { ::std::mem::transmute(self._bitfield_1.get(6usize, 1u8) as u32) } + } + #[inline] + pub fn set_ascii(&mut self, val: ::std::os::raw::c_uint) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + self._bitfield_1.set(6usize, 1u8, val as u64) + } + } + #[inline] + pub fn ready(&self) -> ::std::os::raw::c_uint { + unsafe { ::std::mem::transmute(self._bitfield_1.get(7usize, 1u8) as u32) } + } + #[inline] + pub fn set_ready(&mut self, val: ::std::os::raw::c_uint) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + self._bitfield_1.set(7usize, 1u8, val as u64) + } + } + #[inline] + pub fn new_bitfield_1( + interned: ::std::os::raw::c_uint, + kind: ::std::os::raw::c_uint, + compact: ::std::os::raw::c_uint, + ascii: ::std::os::raw::c_uint, + ready: ::std::os::raw::c_uint, + ) -> __BindgenBitfieldUnit<[u8; 4usize]> { + let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 4usize]> = Default::default(); + __bindgen_bitfield_unit.set(0usize, 2u8, { + let interned: u32 = unsafe { ::std::mem::transmute(interned) }; + interned as u64 + }); + __bindgen_bitfield_unit.set(2usize, 3u8, { + let kind: u32 = unsafe { ::std::mem::transmute(kind) }; + kind as u64 + }); + __bindgen_bitfield_unit.set(5usize, 1u8, { + let compact: u32 = unsafe { ::std::mem::transmute(compact) }; + compact as u64 + }); + __bindgen_bitfield_unit.set(6usize, 1u8, { + let ascii: u32 = unsafe { ::std::mem::transmute(ascii) }; + ascii as u64 + }); + __bindgen_bitfield_unit.set(7usize, 1u8, { + let ready: u32 = unsafe { ::std::mem::transmute(ready) }; + ready as u64 + }); + __bindgen_bitfield_unit + } +} +impl Default for PyASCIIObject { + fn default() -> Self { + let mut s = ::std::mem::MaybeUninit::::uninit(); + unsafe { + ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1); + s.assume_init() + } + } +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct PyCompactUnicodeObject { + pub _base: PyASCIIObject, + pub utf8_length: Py_ssize_t, + pub utf8: *mut ::std::os::raw::c_char, + pub wstr_length: Py_ssize_t, +} +impl Default for PyCompactUnicodeObject { + fn default() -> Self { + let mut s = ::std::mem::MaybeUninit::::uninit(); + unsafe { + ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1); + s.assume_init() + } + } +} +#[repr(C)] +#[derive(Copy, Clone)] +pub struct PyUnicodeObject { + pub _base: PyCompactUnicodeObject, + pub data: PyUnicodeObject__bindgen_ty_1, +} +#[repr(C)] +#[derive(Copy, Clone)] +pub union PyUnicodeObject__bindgen_ty_1 { + pub any: *mut ::std::os::raw::c_void, + pub latin1: *mut Py_UCS1, + pub ucs2: *mut Py_UCS2, + pub ucs4: *mut Py_UCS4, +} +impl Default for PyUnicodeObject__bindgen_ty_1 { + fn default() -> Self { + let mut s = ::std::mem::MaybeUninit::::uninit(); + unsafe { + ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1); + s.assume_init() + } + } +} +impl Default for PyUnicodeObject { + fn default() -> Self { + let mut s = ::std::mem::MaybeUninit::::uninit(); + unsafe { + ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1); + s.assume_init() + } + } +} +pub type PyLongObject = _longobject; +pub type digit = u32; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct _longobject { + pub ob_base: PyVarObject, + pub ob_digit: [digit; 1usize], +} +impl Default for _longobject { + fn default() -> Self { + let mut s = ::std::mem::MaybeUninit::::uninit(); + unsafe { + ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1); + s.assume_init() + } + } +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct PyFloatObject { + pub ob_base: PyObject, + pub ob_fval: f64, +} +impl Default for PyFloatObject { + fn default() -> Self { + let mut s = ::std::mem::MaybeUninit::::uninit(); + unsafe { + ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1); + s.assume_init() + } + } +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct PyTupleObject { + pub ob_base: PyVarObject, + pub ob_item: [*mut PyObject; 1usize], +} +impl Default for PyTupleObject { + fn default() -> Self { + let mut s = ::std::mem::MaybeUninit::::uninit(); + unsafe { + ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1); + s.assume_init() + } + } +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct PyListObject { + pub ob_base: PyVarObject, + pub ob_item: *mut *mut PyObject, + pub allocated: Py_ssize_t, +} +impl Default for PyListObject { + fn default() -> Self { + let mut s = ::std::mem::MaybeUninit::::uninit(); + unsafe { + ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1); + s.assume_init() + } + } +} +pub type PyDictKeysObject = _dictkeysobject; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct PyDictObject { + pub ob_base: PyObject, + pub ma_used: Py_ssize_t, + pub ma_version_tag: u64, + pub ma_keys: *mut PyDictKeysObject, + pub ma_values: *mut *mut PyObject, +} +impl Default for PyDictObject { + fn default() -> Self { + let mut s = ::std::mem::MaybeUninit::::uninit(); + unsafe { + ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1); + s.assume_init() + } + } +} +pub type PyCFunction = ::std::option::Option< + unsafe extern "C" fn(arg1: *mut PyObject, arg2: *mut PyObject) -> *mut PyObject, +>; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct PyMethodDef { + pub ml_name: *const ::std::os::raw::c_char, + pub ml_meth: PyCFunction, + pub ml_flags: ::std::os::raw::c_int, + pub ml_doc: *const ::std::os::raw::c_char, +} +impl Default for PyMethodDef { + fn default() -> Self { + let mut s = ::std::mem::MaybeUninit::::uninit(); + unsafe { + ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1); + s.assume_init() + } + } +} +pub type _PyFrameEvalFunction = ::std::option::Option< + unsafe extern "C" fn(arg1: *mut _frame, arg2: ::std::os::raw::c_int) -> *mut PyObject, +>; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct _is { + pub next: *mut _is, + pub tstate_head: *mut _ts, + pub modules: *mut PyObject, + pub modules_by_index: *mut PyObject, + pub sysdict: *mut PyObject, + pub builtins: *mut PyObject, + pub importlib: *mut PyObject, + pub codec_search_path: *mut PyObject, + pub codec_search_cache: *mut PyObject, + pub codec_error_registry: *mut PyObject, + pub codecs_initialized: ::std::os::raw::c_int, + pub fscodec_initialized: ::std::os::raw::c_int, + pub dlopenflags: ::std::os::raw::c_int, + pub builtins_copy: *mut PyObject, + pub import_func: *mut PyObject, + pub eval_frame: _PyFrameEvalFunction, +} +impl Default for _is { + fn default() -> Self { + let mut s = ::std::mem::MaybeUninit::::uninit(); + unsafe { + ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1); + s.assume_init() + } + } +} +pub type PyInterpreterState = _is; +pub type Py_tracefunc = ::std::option::Option< + unsafe extern "C" fn( + arg1: *mut PyObject, + arg2: *mut _frame, + arg3: ::std::os::raw::c_int, + arg4: *mut PyObject, + ) -> ::std::os::raw::c_int, +>; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct _ts { + pub prev: *mut _ts, + pub next: *mut _ts, + pub interp: *mut PyInterpreterState, + pub frame: *mut _frame, + pub recursion_depth: ::std::os::raw::c_int, + pub overflowed: ::std::os::raw::c_char, + pub recursion_critical: ::std::os::raw::c_char, + pub tracing: ::std::os::raw::c_int, + pub use_tracing: ::std::os::raw::c_int, + pub c_profilefunc: Py_tracefunc, + pub c_tracefunc: Py_tracefunc, + pub c_profileobj: *mut PyObject, + pub c_traceobj: *mut PyObject, + pub curexc_type: *mut PyObject, + pub curexc_value: *mut PyObject, + pub curexc_traceback: *mut PyObject, + pub exc_type: *mut PyObject, + pub exc_value: *mut PyObject, + pub exc_traceback: *mut PyObject, + pub dict: *mut PyObject, + pub gilstate_counter: ::std::os::raw::c_int, + pub async_exc: *mut PyObject, + pub thread_id: ::std::os::raw::c_long, + pub trash_delete_nesting: ::std::os::raw::c_int, + pub trash_delete_later: *mut PyObject, + pub on_delete: ::std::option::Option, + pub on_delete_data: *mut ::std::os::raw::c_void, + pub coroutine_wrapper: *mut PyObject, + pub in_coroutine_wrapper: ::std::os::raw::c_int, + pub _preserve_36_ABI_1: Py_ssize_t, + pub _preserve_36_ABI_2: [freefunc; 255usize], + pub async_gen_firstiter: *mut PyObject, + pub async_gen_finalizer: *mut PyObject, +} +impl Default for _ts { + fn default() -> Self { + let mut s = ::std::mem::MaybeUninit::::uninit(); + unsafe { + ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1); + s.assume_init() + } + } +} +pub type PyThreadState = _ts; +pub type getter = ::std::option::Option< + unsafe extern "C" fn(arg1: *mut PyObject, arg2: *mut ::std::os::raw::c_void) -> *mut PyObject, +>; +pub type setter = ::std::option::Option< + unsafe extern "C" fn( + arg1: *mut PyObject, + arg2: *mut PyObject, + arg3: *mut ::std::os::raw::c_void, + ) -> ::std::os::raw::c_int, +>; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct PyGetSetDef { + pub name: *mut ::std::os::raw::c_char, + pub get: getter, + pub set: setter, + pub doc: *mut ::std::os::raw::c_char, + pub closure: *mut ::std::os::raw::c_void, +} +impl Default for PyGetSetDef { + fn default() -> Self { + let mut s = ::std::mem::MaybeUninit::::uninit(); + unsafe { + ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1); + s.assume_init() + } + } +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct PyMemberDef { + _unused: [u8; 0], +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct PyCodeObject { + pub ob_base: PyObject, + pub co_argcount: ::std::os::raw::c_int, + pub co_kwonlyargcount: ::std::os::raw::c_int, + pub co_nlocals: ::std::os::raw::c_int, + pub co_stacksize: ::std::os::raw::c_int, + pub co_flags: ::std::os::raw::c_int, + pub co_firstlineno: ::std::os::raw::c_int, + pub co_code: *mut PyObject, + pub co_consts: *mut PyObject, + pub co_names: *mut PyObject, + pub co_varnames: *mut PyObject, + pub co_freevars: *mut PyObject, + pub co_cellvars: *mut PyObject, + pub co_cell2arg: *mut ::std::os::raw::c_uchar, + pub co_filename: *mut PyObject, + pub co_name: *mut PyObject, + pub co_lnotab: *mut PyObject, + pub co_zombieframe: *mut ::std::os::raw::c_void, + pub co_weakreflist: *mut PyObject, + pub co_extra: *mut ::std::os::raw::c_void, +} +impl Default for PyCodeObject { + fn default() -> Self { + let mut s = ::std::mem::MaybeUninit::::uninit(); + unsafe { + ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1); + s.assume_init() + } + } +} +#[repr(C)] +#[derive(Debug, Default, Copy, Clone)] +pub struct PyTryBlock { + pub b_type: ::std::os::raw::c_int, + pub b_handler: ::std::os::raw::c_int, + pub b_level: ::std::os::raw::c_int, +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct _frame { + pub ob_base: PyVarObject, + pub f_back: *mut _frame, + pub f_code: *mut PyCodeObject, + pub f_builtins: *mut PyObject, + pub f_globals: *mut PyObject, + pub f_locals: *mut PyObject, + pub f_valuestack: *mut *mut PyObject, + pub f_stacktop: *mut *mut PyObject, + pub f_trace: *mut PyObject, + pub f_exc_type: *mut PyObject, + pub f_exc_value: *mut PyObject, + pub f_exc_traceback: *mut PyObject, + pub f_gen: *mut PyObject, + pub f_lasti: ::std::os::raw::c_int, + pub f_lineno: ::std::os::raw::c_int, + pub f_iblock: ::std::os::raw::c_int, + pub f_executing: ::std::os::raw::c_char, + pub f_blockstack: [PyTryBlock; 20usize], + pub f_localsplus: [*mut PyObject; 1usize], +} +impl Default for _frame { + fn default() -> Self { + let mut s = ::std::mem::MaybeUninit::::uninit(); + unsafe { + ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1); + s.assume_init() + } + } +} +pub type PyFrameObject = _frame; +#[repr(C)] +#[derive(Debug, Default, Copy, Clone)] +pub struct _dictkeysobject { + pub _address: u8, +} diff --git a/src/python_bindings/v3_7_15.rs b/src/python_bindings/v3_7_15.rs new file mode 100644 index 00000000..d45c2277 --- /dev/null +++ b/src/python_bindings/v3_7_15.rs @@ -0,0 +1,1185 @@ +// Generated bindings for python v3.7.15 +#![allow(dead_code)] +#![allow(non_upper_case_globals)] +#![allow(non_camel_case_types)] +#![allow(non_snake_case)] +#![allow(clippy::useless_transmute)] +#![allow(clippy::default_trait_access)] +#![allow(clippy::cast_lossless)] +#![allow(clippy::trivially_copy_pass_by_ref)] + +/* automatically generated by rust-bindgen 0.65.1 */ + +#[repr(C)] +#[derive(Copy, Clone, Debug, Default, Eq, Hash, Ord, PartialEq, PartialOrd)] +pub struct __BindgenBitfieldUnit { + storage: Storage, +} +impl __BindgenBitfieldUnit { + #[inline] + pub const fn new(storage: Storage) -> Self { + Self { storage } + } +} +impl __BindgenBitfieldUnit +where + Storage: AsRef<[u8]> + AsMut<[u8]>, +{ + #[inline] + pub fn get_bit(&self, index: usize) -> bool { + debug_assert!(index / 8 < self.storage.as_ref().len()); + let byte_index = index / 8; + let byte = self.storage.as_ref()[byte_index]; + let bit_index = if cfg!(target_endian = "big") { + 7 - (index % 8) + } else { + index % 8 + }; + let mask = 1 << bit_index; + byte & mask == mask + } + #[inline] + pub fn set_bit(&mut self, index: usize, val: bool) { + debug_assert!(index / 8 < self.storage.as_ref().len()); + let byte_index = index / 8; + let byte = &mut self.storage.as_mut()[byte_index]; + let bit_index = if cfg!(target_endian = "big") { + 7 - (index % 8) + } else { + index % 8 + }; + let mask = 1 << bit_index; + if val { + *byte |= mask; + } else { + *byte &= !mask; + } + } + #[inline] + pub fn get(&self, bit_offset: usize, bit_width: u8) -> u64 { + debug_assert!(bit_width <= 64); + debug_assert!(bit_offset / 8 < self.storage.as_ref().len()); + debug_assert!((bit_offset + (bit_width as usize)) / 8 <= self.storage.as_ref().len()); + let mut val = 0; + for i in 0..(bit_width as usize) { + if self.get_bit(i + bit_offset) { + let index = if cfg!(target_endian = "big") { + bit_width as usize - 1 - i + } else { + i + }; + val |= 1 << index; + } + } + val + } + #[inline] + pub fn set(&mut self, bit_offset: usize, bit_width: u8, val: u64) { + debug_assert!(bit_width <= 64); + debug_assert!(bit_offset / 8 < self.storage.as_ref().len()); + debug_assert!((bit_offset + (bit_width as usize)) / 8 <= self.storage.as_ref().len()); + for i in 0..(bit_width as usize) { + let mask = 1 << i; + let val_bit_is_set = val & mask == mask; + let index = if cfg!(target_endian = "big") { + bit_width as usize - 1 - i + } else { + i + }; + self.set_bit(index + bit_offset, val_bit_is_set); + } + } +} +#[repr(C)] +#[derive(Default)] +pub struct __IncompleteArrayField(::std::marker::PhantomData, [T; 0]); +impl __IncompleteArrayField { + #[inline] + pub const fn new() -> Self { + __IncompleteArrayField(::std::marker::PhantomData, []) + } + #[inline] + pub fn as_ptr(&self) -> *const T { + self as *const _ as *const T + } + #[inline] + pub fn as_mut_ptr(&mut self) -> *mut T { + self as *mut _ as *mut T + } + #[inline] + pub unsafe fn as_slice(&self, len: usize) -> &[T] { + ::std::slice::from_raw_parts(self.as_ptr(), len) + } + #[inline] + pub unsafe fn as_mut_slice(&mut self, len: usize) -> &mut [T] { + ::std::slice::from_raw_parts_mut(self.as_mut_ptr(), len) + } +} +impl ::std::fmt::Debug for __IncompleteArrayField { + fn fmt(&self, fmt: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result { + fmt.write_str("__IncompleteArrayField") + } +} +pub type __int64_t = ::std::os::raw::c_longlong; +pub type __darwin_wchar_t = ::std::os::raw::c_int; +pub type __darwin_off_t = __int64_t; +pub type fpos_t = __darwin_off_t; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct __sbuf { + pub _base: *mut ::std::os::raw::c_uchar, + pub _size: ::std::os::raw::c_int, +} +impl Default for __sbuf { + fn default() -> Self { + let mut s = ::std::mem::MaybeUninit::::uninit(); + unsafe { + ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1); + s.assume_init() + } + } +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct __sFILEX { + _unused: [u8; 0], +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct __sFILE { + pub _p: *mut ::std::os::raw::c_uchar, + pub _r: ::std::os::raw::c_int, + pub _w: ::std::os::raw::c_int, + pub _flags: ::std::os::raw::c_short, + pub _file: ::std::os::raw::c_short, + pub _bf: __sbuf, + pub _lbfsize: ::std::os::raw::c_int, + pub _cookie: *mut ::std::os::raw::c_void, + pub _close: ::std::option::Option< + unsafe extern "C" fn(arg1: *mut ::std::os::raw::c_void) -> ::std::os::raw::c_int, + >, + pub _read: ::std::option::Option< + unsafe extern "C" fn( + arg1: *mut ::std::os::raw::c_void, + arg2: *mut ::std::os::raw::c_char, + arg3: ::std::os::raw::c_int, + ) -> ::std::os::raw::c_int, + >, + pub _seek: ::std::option::Option< + unsafe extern "C" fn( + arg1: *mut ::std::os::raw::c_void, + arg2: fpos_t, + arg3: ::std::os::raw::c_int, + ) -> fpos_t, + >, + pub _write: ::std::option::Option< + unsafe extern "C" fn( + arg1: *mut ::std::os::raw::c_void, + arg2: *const ::std::os::raw::c_char, + arg3: ::std::os::raw::c_int, + ) -> ::std::os::raw::c_int, + >, + pub _ub: __sbuf, + pub _extra: *mut __sFILEX, + pub _ur: ::std::os::raw::c_int, + pub _ubuf: [::std::os::raw::c_uchar; 3usize], + pub _nbuf: [::std::os::raw::c_uchar; 1usize], + pub _lb: __sbuf, + pub _blksize: ::std::os::raw::c_int, + pub _offset: fpos_t, +} +impl Default for __sFILE { + fn default() -> Self { + let mut s = ::std::mem::MaybeUninit::::uninit(); + unsafe { + ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1); + s.assume_init() + } + } +} +pub type FILE = __sFILE; +pub type wchar_t = __darwin_wchar_t; +pub type Py_ssize_t = isize; +pub type Py_hash_t = Py_ssize_t; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct _object { + pub ob_refcnt: Py_ssize_t, + pub ob_type: *mut _typeobject, +} +impl Default for _object { + fn default() -> Self { + let mut s = ::std::mem::MaybeUninit::::uninit(); + unsafe { + ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1); + s.assume_init() + } + } +} +pub type PyObject = _object; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct PyVarObject { + pub ob_base: PyObject, + pub ob_size: Py_ssize_t, +} +impl Default for PyVarObject { + fn default() -> Self { + let mut s = ::std::mem::MaybeUninit::::uninit(); + unsafe { + ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1); + s.assume_init() + } + } +} +pub type unaryfunc = + ::std::option::Option *mut PyObject>; +pub type binaryfunc = ::std::option::Option< + unsafe extern "C" fn(arg1: *mut PyObject, arg2: *mut PyObject) -> *mut PyObject, +>; +pub type ternaryfunc = ::std::option::Option< + unsafe extern "C" fn( + arg1: *mut PyObject, + arg2: *mut PyObject, + arg3: *mut PyObject, + ) -> *mut PyObject, +>; +pub type inquiry = + ::std::option::Option ::std::os::raw::c_int>; +pub type lenfunc = ::std::option::Option Py_ssize_t>; +pub type ssizeargfunc = ::std::option::Option< + unsafe extern "C" fn(arg1: *mut PyObject, arg2: Py_ssize_t) -> *mut PyObject, +>; +pub type ssizeobjargproc = ::std::option::Option< + unsafe extern "C" fn( + arg1: *mut PyObject, + arg2: Py_ssize_t, + arg3: *mut PyObject, + ) -> ::std::os::raw::c_int, +>; +pub type objobjargproc = ::std::option::Option< + unsafe extern "C" fn( + arg1: *mut PyObject, + arg2: *mut PyObject, + arg3: *mut PyObject, + ) -> ::std::os::raw::c_int, +>; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct bufferinfo { + pub buf: *mut ::std::os::raw::c_void, + pub obj: *mut PyObject, + pub len: Py_ssize_t, + pub itemsize: Py_ssize_t, + pub readonly: ::std::os::raw::c_int, + pub ndim: ::std::os::raw::c_int, + pub format: *mut ::std::os::raw::c_char, + pub shape: *mut Py_ssize_t, + pub strides: *mut Py_ssize_t, + pub suboffsets: *mut Py_ssize_t, + pub internal: *mut ::std::os::raw::c_void, +} +impl Default for bufferinfo { + fn default() -> Self { + let mut s = ::std::mem::MaybeUninit::::uninit(); + unsafe { + ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1); + s.assume_init() + } + } +} +pub type Py_buffer = bufferinfo; +pub type getbufferproc = ::std::option::Option< + unsafe extern "C" fn( + arg1: *mut PyObject, + arg2: *mut Py_buffer, + arg3: ::std::os::raw::c_int, + ) -> ::std::os::raw::c_int, +>; +pub type releasebufferproc = + ::std::option::Option; +pub type objobjproc = ::std::option::Option< + unsafe extern "C" fn(arg1: *mut PyObject, arg2: *mut PyObject) -> ::std::os::raw::c_int, +>; +pub type visitproc = ::std::option::Option< + unsafe extern "C" fn( + arg1: *mut PyObject, + arg2: *mut ::std::os::raw::c_void, + ) -> ::std::os::raw::c_int, +>; +pub type traverseproc = ::std::option::Option< + unsafe extern "C" fn( + arg1: *mut PyObject, + arg2: visitproc, + arg3: *mut ::std::os::raw::c_void, + ) -> ::std::os::raw::c_int, +>; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct PyNumberMethods { + pub nb_add: binaryfunc, + pub nb_subtract: binaryfunc, + pub nb_multiply: binaryfunc, + pub nb_remainder: binaryfunc, + pub nb_divmod: binaryfunc, + pub nb_power: ternaryfunc, + pub nb_negative: unaryfunc, + pub nb_positive: unaryfunc, + pub nb_absolute: unaryfunc, + pub nb_bool: inquiry, + pub nb_invert: unaryfunc, + pub nb_lshift: binaryfunc, + pub nb_rshift: binaryfunc, + pub nb_and: binaryfunc, + pub nb_xor: binaryfunc, + pub nb_or: binaryfunc, + pub nb_int: unaryfunc, + pub nb_reserved: *mut ::std::os::raw::c_void, + pub nb_float: unaryfunc, + pub nb_inplace_add: binaryfunc, + pub nb_inplace_subtract: binaryfunc, + pub nb_inplace_multiply: binaryfunc, + pub nb_inplace_remainder: binaryfunc, + pub nb_inplace_power: ternaryfunc, + pub nb_inplace_lshift: binaryfunc, + pub nb_inplace_rshift: binaryfunc, + pub nb_inplace_and: binaryfunc, + pub nb_inplace_xor: binaryfunc, + pub nb_inplace_or: binaryfunc, + pub nb_floor_divide: binaryfunc, + pub nb_true_divide: binaryfunc, + pub nb_inplace_floor_divide: binaryfunc, + pub nb_inplace_true_divide: binaryfunc, + pub nb_index: unaryfunc, + pub nb_matrix_multiply: binaryfunc, + pub nb_inplace_matrix_multiply: binaryfunc, +} +impl Default for PyNumberMethods { + fn default() -> Self { + let mut s = ::std::mem::MaybeUninit::::uninit(); + unsafe { + ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1); + s.assume_init() + } + } +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct PySequenceMethods { + pub sq_length: lenfunc, + pub sq_concat: binaryfunc, + pub sq_repeat: ssizeargfunc, + pub sq_item: ssizeargfunc, + pub was_sq_slice: *mut ::std::os::raw::c_void, + pub sq_ass_item: ssizeobjargproc, + pub was_sq_ass_slice: *mut ::std::os::raw::c_void, + pub sq_contains: objobjproc, + pub sq_inplace_concat: binaryfunc, + pub sq_inplace_repeat: ssizeargfunc, +} +impl Default for PySequenceMethods { + fn default() -> Self { + let mut s = ::std::mem::MaybeUninit::::uninit(); + unsafe { + ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1); + s.assume_init() + } + } +} +#[repr(C)] +#[derive(Debug, Default, Copy, Clone)] +pub struct PyMappingMethods { + pub mp_length: lenfunc, + pub mp_subscript: binaryfunc, + pub mp_ass_subscript: objobjargproc, +} +#[repr(C)] +#[derive(Debug, Default, Copy, Clone)] +pub struct PyAsyncMethods { + pub am_await: unaryfunc, + pub am_aiter: unaryfunc, + pub am_anext: unaryfunc, +} +#[repr(C)] +#[derive(Debug, Default, Copy, Clone)] +pub struct PyBufferProcs { + pub bf_getbuffer: getbufferproc, + pub bf_releasebuffer: releasebufferproc, +} +pub type freefunc = ::std::option::Option; +pub type destructor = ::std::option::Option; +pub type printfunc = ::std::option::Option< + unsafe extern "C" fn( + arg1: *mut PyObject, + arg2: *mut FILE, + arg3: ::std::os::raw::c_int, + ) -> ::std::os::raw::c_int, +>; +pub type getattrfunc = ::std::option::Option< + unsafe extern "C" fn(arg1: *mut PyObject, arg2: *mut ::std::os::raw::c_char) -> *mut PyObject, +>; +pub type getattrofunc = ::std::option::Option< + unsafe extern "C" fn(arg1: *mut PyObject, arg2: *mut PyObject) -> *mut PyObject, +>; +pub type setattrfunc = ::std::option::Option< + unsafe extern "C" fn( + arg1: *mut PyObject, + arg2: *mut ::std::os::raw::c_char, + arg3: *mut PyObject, + ) -> ::std::os::raw::c_int, +>; +pub type setattrofunc = ::std::option::Option< + unsafe extern "C" fn( + arg1: *mut PyObject, + arg2: *mut PyObject, + arg3: *mut PyObject, + ) -> ::std::os::raw::c_int, +>; +pub type reprfunc = + ::std::option::Option *mut PyObject>; +pub type hashfunc = ::std::option::Option Py_hash_t>; +pub type richcmpfunc = ::std::option::Option< + unsafe extern "C" fn( + arg1: *mut PyObject, + arg2: *mut PyObject, + arg3: ::std::os::raw::c_int, + ) -> *mut PyObject, +>; +pub type getiterfunc = + ::std::option::Option *mut PyObject>; +pub type iternextfunc = + ::std::option::Option *mut PyObject>; +pub type descrgetfunc = ::std::option::Option< + unsafe extern "C" fn( + arg1: *mut PyObject, + arg2: *mut PyObject, + arg3: *mut PyObject, + ) -> *mut PyObject, +>; +pub type descrsetfunc = ::std::option::Option< + unsafe extern "C" fn( + arg1: *mut PyObject, + arg2: *mut PyObject, + arg3: *mut PyObject, + ) -> ::std::os::raw::c_int, +>; +pub type initproc = ::std::option::Option< + unsafe extern "C" fn( + arg1: *mut PyObject, + arg2: *mut PyObject, + arg3: *mut PyObject, + ) -> ::std::os::raw::c_int, +>; +pub type newfunc = ::std::option::Option< + unsafe extern "C" fn( + arg1: *mut _typeobject, + arg2: *mut PyObject, + arg3: *mut PyObject, + ) -> *mut PyObject, +>; +pub type allocfunc = ::std::option::Option< + unsafe extern "C" fn(arg1: *mut _typeobject, arg2: Py_ssize_t) -> *mut PyObject, +>; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct _typeobject { + pub ob_base: PyVarObject, + pub tp_name: *const ::std::os::raw::c_char, + pub tp_basicsize: Py_ssize_t, + pub tp_itemsize: Py_ssize_t, + pub tp_dealloc: destructor, + pub tp_print: printfunc, + pub tp_getattr: getattrfunc, + pub tp_setattr: setattrfunc, + pub tp_as_async: *mut PyAsyncMethods, + pub tp_repr: reprfunc, + pub tp_as_number: *mut PyNumberMethods, + pub tp_as_sequence: *mut PySequenceMethods, + pub tp_as_mapping: *mut PyMappingMethods, + pub tp_hash: hashfunc, + pub tp_call: ternaryfunc, + pub tp_str: reprfunc, + pub tp_getattro: getattrofunc, + pub tp_setattro: setattrofunc, + pub tp_as_buffer: *mut PyBufferProcs, + pub tp_flags: ::std::os::raw::c_ulong, + pub tp_doc: *const ::std::os::raw::c_char, + pub tp_traverse: traverseproc, + pub tp_clear: inquiry, + pub tp_richcompare: richcmpfunc, + pub tp_weaklistoffset: Py_ssize_t, + pub tp_iter: getiterfunc, + pub tp_iternext: iternextfunc, + pub tp_methods: *mut PyMethodDef, + pub tp_members: *mut PyMemberDef, + pub tp_getset: *mut PyGetSetDef, + pub tp_base: *mut _typeobject, + pub tp_dict: *mut PyObject, + pub tp_descr_get: descrgetfunc, + pub tp_descr_set: descrsetfunc, + pub tp_dictoffset: Py_ssize_t, + pub tp_init: initproc, + pub tp_alloc: allocfunc, + pub tp_new: newfunc, + pub tp_free: freefunc, + pub tp_is_gc: inquiry, + pub tp_bases: *mut PyObject, + pub tp_mro: *mut PyObject, + pub tp_cache: *mut PyObject, + pub tp_subclasses: *mut PyObject, + pub tp_weaklist: *mut PyObject, + pub tp_del: destructor, + pub tp_version_tag: ::std::os::raw::c_uint, + pub tp_finalize: destructor, +} +impl Default for _typeobject { + fn default() -> Self { + let mut s = ::std::mem::MaybeUninit::::uninit(); + unsafe { + ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1); + s.assume_init() + } + } +} +pub type PyTypeObject = _typeobject; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct _heaptypeobject { + pub ht_type: PyTypeObject, + pub as_async: PyAsyncMethods, + pub as_number: PyNumberMethods, + pub as_mapping: PyMappingMethods, + pub as_sequence: PySequenceMethods, + pub as_buffer: PyBufferProcs, + pub ht_name: *mut PyObject, + pub ht_slots: *mut PyObject, + pub ht_qualname: *mut PyObject, + pub ht_cached_keys: *mut _dictkeysobject, +} +impl Default for _heaptypeobject { + fn default() -> Self { + let mut s = ::std::mem::MaybeUninit::::uninit(); + unsafe { + ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1); + s.assume_init() + } + } +} +pub type PyHeapTypeObject = _heaptypeobject; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct PyBytesObject { + pub ob_base: PyVarObject, + pub ob_shash: Py_hash_t, + pub ob_sval: [::std::os::raw::c_char; 1usize], +} +impl Default for PyBytesObject { + fn default() -> Self { + let mut s = ::std::mem::MaybeUninit::::uninit(); + unsafe { + ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1); + s.assume_init() + } + } +} +pub type Py_UCS4 = u32; +pub type Py_UCS2 = u16; +pub type Py_UCS1 = u8; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct PyASCIIObject { + pub ob_base: PyObject, + pub length: Py_ssize_t, + pub hash: Py_hash_t, + pub state: PyASCIIObject__bindgen_ty_1, + pub wstr: *mut wchar_t, +} +#[repr(C)] +#[repr(align(4))] +#[derive(Debug, Default, Copy, Clone)] +pub struct PyASCIIObject__bindgen_ty_1 { + pub _bitfield_align_1: [u8; 0], + pub _bitfield_1: __BindgenBitfieldUnit<[u8; 4usize]>, +} +impl PyASCIIObject__bindgen_ty_1 { + #[inline] + pub fn interned(&self) -> ::std::os::raw::c_uint { + unsafe { ::std::mem::transmute(self._bitfield_1.get(0usize, 2u8) as u32) } + } + #[inline] + pub fn set_interned(&mut self, val: ::std::os::raw::c_uint) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + self._bitfield_1.set(0usize, 2u8, val as u64) + } + } + #[inline] + pub fn kind(&self) -> ::std::os::raw::c_uint { + unsafe { ::std::mem::transmute(self._bitfield_1.get(2usize, 3u8) as u32) } + } + #[inline] + pub fn set_kind(&mut self, val: ::std::os::raw::c_uint) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + self._bitfield_1.set(2usize, 3u8, val as u64) + } + } + #[inline] + pub fn compact(&self) -> ::std::os::raw::c_uint { + unsafe { ::std::mem::transmute(self._bitfield_1.get(5usize, 1u8) as u32) } + } + #[inline] + pub fn set_compact(&mut self, val: ::std::os::raw::c_uint) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + self._bitfield_1.set(5usize, 1u8, val as u64) + } + } + #[inline] + pub fn ascii(&self) -> ::std::os::raw::c_uint { + unsafe { ::std::mem::transmute(self._bitfield_1.get(6usize, 1u8) as u32) } + } + #[inline] + pub fn set_ascii(&mut self, val: ::std::os::raw::c_uint) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + self._bitfield_1.set(6usize, 1u8, val as u64) + } + } + #[inline] + pub fn ready(&self) -> ::std::os::raw::c_uint { + unsafe { ::std::mem::transmute(self._bitfield_1.get(7usize, 1u8) as u32) } + } + #[inline] + pub fn set_ready(&mut self, val: ::std::os::raw::c_uint) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + self._bitfield_1.set(7usize, 1u8, val as u64) + } + } + #[inline] + pub fn new_bitfield_1( + interned: ::std::os::raw::c_uint, + kind: ::std::os::raw::c_uint, + compact: ::std::os::raw::c_uint, + ascii: ::std::os::raw::c_uint, + ready: ::std::os::raw::c_uint, + ) -> __BindgenBitfieldUnit<[u8; 4usize]> { + let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 4usize]> = Default::default(); + __bindgen_bitfield_unit.set(0usize, 2u8, { + let interned: u32 = unsafe { ::std::mem::transmute(interned) }; + interned as u64 + }); + __bindgen_bitfield_unit.set(2usize, 3u8, { + let kind: u32 = unsafe { ::std::mem::transmute(kind) }; + kind as u64 + }); + __bindgen_bitfield_unit.set(5usize, 1u8, { + let compact: u32 = unsafe { ::std::mem::transmute(compact) }; + compact as u64 + }); + __bindgen_bitfield_unit.set(6usize, 1u8, { + let ascii: u32 = unsafe { ::std::mem::transmute(ascii) }; + ascii as u64 + }); + __bindgen_bitfield_unit.set(7usize, 1u8, { + let ready: u32 = unsafe { ::std::mem::transmute(ready) }; + ready as u64 + }); + __bindgen_bitfield_unit + } +} +impl Default for PyASCIIObject { + fn default() -> Self { + let mut s = ::std::mem::MaybeUninit::::uninit(); + unsafe { + ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1); + s.assume_init() + } + } +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct PyCompactUnicodeObject { + pub _base: PyASCIIObject, + pub utf8_length: Py_ssize_t, + pub utf8: *mut ::std::os::raw::c_char, + pub wstr_length: Py_ssize_t, +} +impl Default for PyCompactUnicodeObject { + fn default() -> Self { + let mut s = ::std::mem::MaybeUninit::::uninit(); + unsafe { + ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1); + s.assume_init() + } + } +} +#[repr(C)] +#[derive(Copy, Clone)] +pub struct PyUnicodeObject { + pub _base: PyCompactUnicodeObject, + pub data: PyUnicodeObject__bindgen_ty_1, +} +#[repr(C)] +#[derive(Copy, Clone)] +pub union PyUnicodeObject__bindgen_ty_1 { + pub any: *mut ::std::os::raw::c_void, + pub latin1: *mut Py_UCS1, + pub ucs2: *mut Py_UCS2, + pub ucs4: *mut Py_UCS4, +} +impl Default for PyUnicodeObject__bindgen_ty_1 { + fn default() -> Self { + let mut s = ::std::mem::MaybeUninit::::uninit(); + unsafe { + ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1); + s.assume_init() + } + } +} +impl Default for PyUnicodeObject { + fn default() -> Self { + let mut s = ::std::mem::MaybeUninit::::uninit(); + unsafe { + ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1); + s.assume_init() + } + } +} +pub type PyLongObject = _longobject; +pub type digit = u32; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct _longobject { + pub ob_base: PyVarObject, + pub ob_digit: [digit; 1usize], +} +impl Default for _longobject { + fn default() -> Self { + let mut s = ::std::mem::MaybeUninit::::uninit(); + unsafe { + ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1); + s.assume_init() + } + } +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct PyFloatObject { + pub ob_base: PyObject, + pub ob_fval: f64, +} +impl Default for PyFloatObject { + fn default() -> Self { + let mut s = ::std::mem::MaybeUninit::::uninit(); + unsafe { + ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1); + s.assume_init() + } + } +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct PyTupleObject { + pub ob_base: PyVarObject, + pub ob_item: [*mut PyObject; 1usize], +} +impl Default for PyTupleObject { + fn default() -> Self { + let mut s = ::std::mem::MaybeUninit::::uninit(); + unsafe { + ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1); + s.assume_init() + } + } +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct PyListObject { + pub ob_base: PyVarObject, + pub ob_item: *mut *mut PyObject, + pub allocated: Py_ssize_t, +} +impl Default for PyListObject { + fn default() -> Self { + let mut s = ::std::mem::MaybeUninit::::uninit(); + unsafe { + ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1); + s.assume_init() + } + } +} +pub type PyDictKeysObject = _dictkeysobject; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct PyDictObject { + pub ob_base: PyObject, + pub ma_used: Py_ssize_t, + pub ma_version_tag: u64, + pub ma_keys: *mut PyDictKeysObject, + pub ma_values: *mut *mut PyObject, +} +impl Default for PyDictObject { + fn default() -> Self { + let mut s = ::std::mem::MaybeUninit::::uninit(); + unsafe { + ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1); + s.assume_init() + } + } +} +pub type PyCFunction = ::std::option::Option< + unsafe extern "C" fn(arg1: *mut PyObject, arg2: *mut PyObject) -> *mut PyObject, +>; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct PyMethodDef { + pub ml_name: *const ::std::os::raw::c_char, + pub ml_meth: PyCFunction, + pub ml_flags: ::std::os::raw::c_int, + pub ml_doc: *const ::std::os::raw::c_char, +} +impl Default for PyMethodDef { + fn default() -> Self { + let mut s = ::std::mem::MaybeUninit::::uninit(); + unsafe { + ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1); + s.assume_init() + } + } +} +pub type PyThread_type_lock = *mut ::std::os::raw::c_void; +pub type _PyFrameEvalFunction = ::std::option::Option< + unsafe extern "C" fn(arg1: *mut _frame, arg2: ::std::os::raw::c_int) -> *mut PyObject, +>; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct _PyCoreConfig { + pub install_signal_handlers: ::std::os::raw::c_int, + pub ignore_environment: ::std::os::raw::c_int, + pub use_hash_seed: ::std::os::raw::c_int, + pub hash_seed: ::std::os::raw::c_ulong, + pub allocator: *const ::std::os::raw::c_char, + pub dev_mode: ::std::os::raw::c_int, + pub faulthandler: ::std::os::raw::c_int, + pub tracemalloc: ::std::os::raw::c_int, + pub import_time: ::std::os::raw::c_int, + pub show_ref_count: ::std::os::raw::c_int, + pub show_alloc_count: ::std::os::raw::c_int, + pub dump_refs: ::std::os::raw::c_int, + pub malloc_stats: ::std::os::raw::c_int, + pub coerce_c_locale: ::std::os::raw::c_int, + pub coerce_c_locale_warn: ::std::os::raw::c_int, + pub utf8_mode: ::std::os::raw::c_int, + pub program_name: *mut wchar_t, + pub argc: ::std::os::raw::c_int, + pub argv: *mut *mut wchar_t, + pub program: *mut wchar_t, + pub nxoption: ::std::os::raw::c_int, + pub xoptions: *mut *mut wchar_t, + pub nwarnoption: ::std::os::raw::c_int, + pub warnoptions: *mut *mut wchar_t, + pub module_search_path_env: *mut wchar_t, + pub home: *mut wchar_t, + pub nmodule_search_path: ::std::os::raw::c_int, + pub module_search_paths: *mut *mut wchar_t, + pub executable: *mut wchar_t, + pub prefix: *mut wchar_t, + pub base_prefix: *mut wchar_t, + pub exec_prefix: *mut wchar_t, + pub base_exec_prefix: *mut wchar_t, + pub _disable_importlib: ::std::os::raw::c_int, +} +impl Default for _PyCoreConfig { + fn default() -> Self { + let mut s = ::std::mem::MaybeUninit::::uninit(); + unsafe { + ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1); + s.assume_init() + } + } +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct _PyMainInterpreterConfig { + pub install_signal_handlers: ::std::os::raw::c_int, + pub argv: *mut PyObject, + pub executable: *mut PyObject, + pub prefix: *mut PyObject, + pub base_prefix: *mut PyObject, + pub exec_prefix: *mut PyObject, + pub base_exec_prefix: *mut PyObject, + pub warnoptions: *mut PyObject, + pub xoptions: *mut PyObject, + pub module_search_path: *mut PyObject, +} +impl Default for _PyMainInterpreterConfig { + fn default() -> Self { + let mut s = ::std::mem::MaybeUninit::::uninit(); + unsafe { + ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1); + s.assume_init() + } + } +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct _is { + pub next: *mut _is, + pub tstate_head: *mut _ts, + pub id: i64, + pub id_refcount: i64, + pub id_mutex: PyThread_type_lock, + pub modules: *mut PyObject, + pub modules_by_index: *mut PyObject, + pub sysdict: *mut PyObject, + pub builtins: *mut PyObject, + pub importlib: *mut PyObject, + pub check_interval: ::std::os::raw::c_int, + pub num_threads: ::std::os::raw::c_long, + pub pythread_stacksize: usize, + pub codec_search_path: *mut PyObject, + pub codec_search_cache: *mut PyObject, + pub codec_error_registry: *mut PyObject, + pub codecs_initialized: ::std::os::raw::c_int, + pub fscodec_initialized: ::std::os::raw::c_int, + pub core_config: _PyCoreConfig, + pub config: _PyMainInterpreterConfig, + pub dlopenflags: ::std::os::raw::c_int, + pub builtins_copy: *mut PyObject, + pub import_func: *mut PyObject, + pub eval_frame: _PyFrameEvalFunction, + pub co_extra_user_count: Py_ssize_t, + pub co_extra_freefuncs: [freefunc; 255usize], + pub before_forkers: *mut PyObject, + pub after_forkers_parent: *mut PyObject, + pub after_forkers_child: *mut PyObject, + pub pyexitfunc: ::std::option::Option, + pub pyexitmodule: *mut PyObject, + pub tstate_next_unique_id: u64, +} +impl Default for _is { + fn default() -> Self { + let mut s = ::std::mem::MaybeUninit::::uninit(); + unsafe { + ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1); + s.assume_init() + } + } +} +pub type PyInterpreterState = _is; +pub type Py_tracefunc = ::std::option::Option< + unsafe extern "C" fn( + arg1: *mut PyObject, + arg2: *mut _frame, + arg3: ::std::os::raw::c_int, + arg4: *mut PyObject, + ) -> ::std::os::raw::c_int, +>; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct _err_stackitem { + pub exc_type: *mut PyObject, + pub exc_value: *mut PyObject, + pub exc_traceback: *mut PyObject, + pub previous_item: *mut _err_stackitem, +} +impl Default for _err_stackitem { + fn default() -> Self { + let mut s = ::std::mem::MaybeUninit::::uninit(); + unsafe { + ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1); + s.assume_init() + } + } +} +pub type _PyErr_StackItem = _err_stackitem; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct _ts { + pub prev: *mut _ts, + pub next: *mut _ts, + pub interp: *mut PyInterpreterState, + pub frame: *mut _frame, + pub recursion_depth: ::std::os::raw::c_int, + pub overflowed: ::std::os::raw::c_char, + pub recursion_critical: ::std::os::raw::c_char, + pub stackcheck_counter: ::std::os::raw::c_int, + pub tracing: ::std::os::raw::c_int, + pub use_tracing: ::std::os::raw::c_int, + pub c_profilefunc: Py_tracefunc, + pub c_tracefunc: Py_tracefunc, + pub c_profileobj: *mut PyObject, + pub c_traceobj: *mut PyObject, + pub curexc_type: *mut PyObject, + pub curexc_value: *mut PyObject, + pub curexc_traceback: *mut PyObject, + pub exc_state: _PyErr_StackItem, + pub exc_info: *mut _PyErr_StackItem, + pub dict: *mut PyObject, + pub gilstate_counter: ::std::os::raw::c_int, + pub async_exc: *mut PyObject, + pub thread_id: ::std::os::raw::c_ulong, + pub trash_delete_nesting: ::std::os::raw::c_int, + pub trash_delete_later: *mut PyObject, + pub on_delete: ::std::option::Option, + pub on_delete_data: *mut ::std::os::raw::c_void, + pub coroutine_origin_tracking_depth: ::std::os::raw::c_int, + pub coroutine_wrapper: *mut PyObject, + pub in_coroutine_wrapper: ::std::os::raw::c_int, + pub async_gen_firstiter: *mut PyObject, + pub async_gen_finalizer: *mut PyObject, + pub context: *mut PyObject, + pub context_ver: u64, + pub id: u64, +} +impl Default for _ts { + fn default() -> Self { + let mut s = ::std::mem::MaybeUninit::::uninit(); + unsafe { + ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1); + s.assume_init() + } + } +} +pub type PyThreadState = _ts; +pub type getter = ::std::option::Option< + unsafe extern "C" fn(arg1: *mut PyObject, arg2: *mut ::std::os::raw::c_void) -> *mut PyObject, +>; +pub type setter = ::std::option::Option< + unsafe extern "C" fn( + arg1: *mut PyObject, + arg2: *mut PyObject, + arg3: *mut ::std::os::raw::c_void, + ) -> ::std::os::raw::c_int, +>; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct PyGetSetDef { + pub name: *const ::std::os::raw::c_char, + pub get: getter, + pub set: setter, + pub doc: *const ::std::os::raw::c_char, + pub closure: *mut ::std::os::raw::c_void, +} +impl Default for PyGetSetDef { + fn default() -> Self { + let mut s = ::std::mem::MaybeUninit::::uninit(); + unsafe { + ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1); + s.assume_init() + } + } +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct PyMemberDef { + _unused: [u8; 0], +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct PyCodeObject { + pub ob_base: PyObject, + pub co_argcount: ::std::os::raw::c_int, + pub co_kwonlyargcount: ::std::os::raw::c_int, + pub co_nlocals: ::std::os::raw::c_int, + pub co_stacksize: ::std::os::raw::c_int, + pub co_flags: ::std::os::raw::c_int, + pub co_firstlineno: ::std::os::raw::c_int, + pub co_code: *mut PyObject, + pub co_consts: *mut PyObject, + pub co_names: *mut PyObject, + pub co_varnames: *mut PyObject, + pub co_freevars: *mut PyObject, + pub co_cellvars: *mut PyObject, + pub co_cell2arg: *mut Py_ssize_t, + pub co_filename: *mut PyObject, + pub co_name: *mut PyObject, + pub co_lnotab: *mut PyObject, + pub co_zombieframe: *mut ::std::os::raw::c_void, + pub co_weakreflist: *mut PyObject, + pub co_extra: *mut ::std::os::raw::c_void, +} +impl Default for PyCodeObject { + fn default() -> Self { + let mut s = ::std::mem::MaybeUninit::::uninit(); + unsafe { + ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1); + s.assume_init() + } + } +} +#[repr(C)] +#[derive(Debug, Default, Copy, Clone)] +pub struct PyTryBlock { + pub b_type: ::std::os::raw::c_int, + pub b_handler: ::std::os::raw::c_int, + pub b_level: ::std::os::raw::c_int, +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct _frame { + pub ob_base: PyVarObject, + pub f_back: *mut _frame, + pub f_code: *mut PyCodeObject, + pub f_builtins: *mut PyObject, + pub f_globals: *mut PyObject, + pub f_locals: *mut PyObject, + pub f_valuestack: *mut *mut PyObject, + pub f_stacktop: *mut *mut PyObject, + pub f_trace: *mut PyObject, + pub f_trace_lines: ::std::os::raw::c_char, + pub f_trace_opcodes: ::std::os::raw::c_char, + pub f_gen: *mut PyObject, + pub f_lasti: ::std::os::raw::c_int, + pub f_lineno: ::std::os::raw::c_int, + pub f_iblock: ::std::os::raw::c_int, + pub f_executing: ::std::os::raw::c_char, + pub f_blockstack: [PyTryBlock; 20usize], + pub f_localsplus: [*mut PyObject; 1usize], +} +impl Default for _frame { + fn default() -> Self { + let mut s = ::std::mem::MaybeUninit::::uninit(); + unsafe { + ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1); + s.assume_init() + } + } +} +pub type PyFrameObject = _frame; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct PyDictKeyEntry { + pub me_hash: Py_hash_t, + pub me_key: *mut PyObject, + pub me_value: *mut PyObject, +} +impl Default for PyDictKeyEntry { + fn default() -> Self { + let mut s = ::std::mem::MaybeUninit::::uninit(); + unsafe { + ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1); + s.assume_init() + } + } +} +pub type dict_lookup_func = ::std::option::Option< + unsafe extern "C" fn( + mp: *mut PyDictObject, + key: *mut PyObject, + hash: Py_hash_t, + value_addr: *mut *mut PyObject, + ) -> Py_ssize_t, +>; +#[repr(C)] +#[derive(Debug, Default)] +pub struct _dictkeysobject { + pub dk_refcnt: Py_ssize_t, + pub dk_size: Py_ssize_t, + pub dk_lookup: dict_lookup_func, + pub dk_usable: Py_ssize_t, + pub dk_nentries: Py_ssize_t, + pub dk_indices: __IncompleteArrayField<::std::os::raw::c_char>, +} diff --git a/src/python_bindings/v3_8_15.rs b/src/python_bindings/v3_8_15.rs new file mode 100644 index 00000000..2ab5d546 --- /dev/null +++ b/src/python_bindings/v3_8_15.rs @@ -0,0 +1,1203 @@ +// Generated bindings for python v3.8.15 +#![allow(dead_code)] +#![allow(non_upper_case_globals)] +#![allow(non_camel_case_types)] +#![allow(non_snake_case)] +#![allow(clippy::useless_transmute)] +#![allow(clippy::default_trait_access)] +#![allow(clippy::cast_lossless)] +#![allow(clippy::trivially_copy_pass_by_ref)] + +/* automatically generated by rust-bindgen 0.65.1 */ + +#[repr(C)] +#[derive(Copy, Clone, Debug, Default, Eq, Hash, Ord, PartialEq, PartialOrd)] +pub struct __BindgenBitfieldUnit { + storage: Storage, +} +impl __BindgenBitfieldUnit { + #[inline] + pub const fn new(storage: Storage) -> Self { + Self { storage } + } +} +impl __BindgenBitfieldUnit +where + Storage: AsRef<[u8]> + AsMut<[u8]>, +{ + #[inline] + pub fn get_bit(&self, index: usize) -> bool { + debug_assert!(index / 8 < self.storage.as_ref().len()); + let byte_index = index / 8; + let byte = self.storage.as_ref()[byte_index]; + let bit_index = if cfg!(target_endian = "big") { + 7 - (index % 8) + } else { + index % 8 + }; + let mask = 1 << bit_index; + byte & mask == mask + } + #[inline] + pub fn set_bit(&mut self, index: usize, val: bool) { + debug_assert!(index / 8 < self.storage.as_ref().len()); + let byte_index = index / 8; + let byte = &mut self.storage.as_mut()[byte_index]; + let bit_index = if cfg!(target_endian = "big") { + 7 - (index % 8) + } else { + index % 8 + }; + let mask = 1 << bit_index; + if val { + *byte |= mask; + } else { + *byte &= !mask; + } + } + #[inline] + pub fn get(&self, bit_offset: usize, bit_width: u8) -> u64 { + debug_assert!(bit_width <= 64); + debug_assert!(bit_offset / 8 < self.storage.as_ref().len()); + debug_assert!((bit_offset + (bit_width as usize)) / 8 <= self.storage.as_ref().len()); + let mut val = 0; + for i in 0..(bit_width as usize) { + if self.get_bit(i + bit_offset) { + let index = if cfg!(target_endian = "big") { + bit_width as usize - 1 - i + } else { + i + }; + val |= 1 << index; + } + } + val + } + #[inline] + pub fn set(&mut self, bit_offset: usize, bit_width: u8, val: u64) { + debug_assert!(bit_width <= 64); + debug_assert!(bit_offset / 8 < self.storage.as_ref().len()); + debug_assert!((bit_offset + (bit_width as usize)) / 8 <= self.storage.as_ref().len()); + for i in 0..(bit_width as usize) { + let mask = 1 << i; + let val_bit_is_set = val & mask == mask; + let index = if cfg!(target_endian = "big") { + bit_width as usize - 1 - i + } else { + i + }; + self.set_bit(index + bit_offset, val_bit_is_set); + } + } +} +pub type __int64_t = ::std::os::raw::c_longlong; +pub type __darwin_wchar_t = ::std::os::raw::c_int; +pub type __darwin_off_t = __int64_t; +pub type fpos_t = __darwin_off_t; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct __sbuf { + pub _base: *mut ::std::os::raw::c_uchar, + pub _size: ::std::os::raw::c_int, +} +impl Default for __sbuf { + fn default() -> Self { + let mut s = ::std::mem::MaybeUninit::::uninit(); + unsafe { + ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1); + s.assume_init() + } + } +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct __sFILEX { + _unused: [u8; 0], +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct __sFILE { + pub _p: *mut ::std::os::raw::c_uchar, + pub _r: ::std::os::raw::c_int, + pub _w: ::std::os::raw::c_int, + pub _flags: ::std::os::raw::c_short, + pub _file: ::std::os::raw::c_short, + pub _bf: __sbuf, + pub _lbfsize: ::std::os::raw::c_int, + pub _cookie: *mut ::std::os::raw::c_void, + pub _close: ::std::option::Option< + unsafe extern "C" fn(arg1: *mut ::std::os::raw::c_void) -> ::std::os::raw::c_int, + >, + pub _read: ::std::option::Option< + unsafe extern "C" fn( + arg1: *mut ::std::os::raw::c_void, + arg2: *mut ::std::os::raw::c_char, + arg3: ::std::os::raw::c_int, + ) -> ::std::os::raw::c_int, + >, + pub _seek: ::std::option::Option< + unsafe extern "C" fn( + arg1: *mut ::std::os::raw::c_void, + arg2: fpos_t, + arg3: ::std::os::raw::c_int, + ) -> fpos_t, + >, + pub _write: ::std::option::Option< + unsafe extern "C" fn( + arg1: *mut ::std::os::raw::c_void, + arg2: *const ::std::os::raw::c_char, + arg3: ::std::os::raw::c_int, + ) -> ::std::os::raw::c_int, + >, + pub _ub: __sbuf, + pub _extra: *mut __sFILEX, + pub _ur: ::std::os::raw::c_int, + pub _ubuf: [::std::os::raw::c_uchar; 3usize], + pub _nbuf: [::std::os::raw::c_uchar; 1usize], + pub _lb: __sbuf, + pub _blksize: ::std::os::raw::c_int, + pub _offset: fpos_t, +} +impl Default for __sFILE { + fn default() -> Self { + let mut s = ::std::mem::MaybeUninit::::uninit(); + unsafe { + ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1); + s.assume_init() + } + } +} +pub type FILE = __sFILE; +pub type wchar_t = __darwin_wchar_t; +pub type Py_ssize_t = isize; +pub type Py_hash_t = Py_ssize_t; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct _object { + pub ob_refcnt: Py_ssize_t, + pub ob_type: *mut _typeobject, +} +impl Default for _object { + fn default() -> Self { + let mut s = ::std::mem::MaybeUninit::::uninit(); + unsafe { + ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1); + s.assume_init() + } + } +} +pub type PyObject = _object; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct PyVarObject { + pub ob_base: PyObject, + pub ob_size: Py_ssize_t, +} +impl Default for PyVarObject { + fn default() -> Self { + let mut s = ::std::mem::MaybeUninit::::uninit(); + unsafe { + ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1); + s.assume_init() + } + } +} +pub type unaryfunc = + ::std::option::Option *mut PyObject>; +pub type binaryfunc = ::std::option::Option< + unsafe extern "C" fn(arg1: *mut PyObject, arg2: *mut PyObject) -> *mut PyObject, +>; +pub type ternaryfunc = ::std::option::Option< + unsafe extern "C" fn( + arg1: *mut PyObject, + arg2: *mut PyObject, + arg3: *mut PyObject, + ) -> *mut PyObject, +>; +pub type inquiry = + ::std::option::Option ::std::os::raw::c_int>; +pub type lenfunc = ::std::option::Option Py_ssize_t>; +pub type ssizeargfunc = ::std::option::Option< + unsafe extern "C" fn(arg1: *mut PyObject, arg2: Py_ssize_t) -> *mut PyObject, +>; +pub type ssizeobjargproc = ::std::option::Option< + unsafe extern "C" fn( + arg1: *mut PyObject, + arg2: Py_ssize_t, + arg3: *mut PyObject, + ) -> ::std::os::raw::c_int, +>; +pub type objobjargproc = ::std::option::Option< + unsafe extern "C" fn( + arg1: *mut PyObject, + arg2: *mut PyObject, + arg3: *mut PyObject, + ) -> ::std::os::raw::c_int, +>; +pub type objobjproc = ::std::option::Option< + unsafe extern "C" fn(arg1: *mut PyObject, arg2: *mut PyObject) -> ::std::os::raw::c_int, +>; +pub type visitproc = ::std::option::Option< + unsafe extern "C" fn( + arg1: *mut PyObject, + arg2: *mut ::std::os::raw::c_void, + ) -> ::std::os::raw::c_int, +>; +pub type traverseproc = ::std::option::Option< + unsafe extern "C" fn( + arg1: *mut PyObject, + arg2: visitproc, + arg3: *mut ::std::os::raw::c_void, + ) -> ::std::os::raw::c_int, +>; +pub type freefunc = ::std::option::Option; +pub type destructor = ::std::option::Option; +pub type getattrfunc = ::std::option::Option< + unsafe extern "C" fn(arg1: *mut PyObject, arg2: *mut ::std::os::raw::c_char) -> *mut PyObject, +>; +pub type getattrofunc = ::std::option::Option< + unsafe extern "C" fn(arg1: *mut PyObject, arg2: *mut PyObject) -> *mut PyObject, +>; +pub type setattrfunc = ::std::option::Option< + unsafe extern "C" fn( + arg1: *mut PyObject, + arg2: *mut ::std::os::raw::c_char, + arg3: *mut PyObject, + ) -> ::std::os::raw::c_int, +>; +pub type setattrofunc = ::std::option::Option< + unsafe extern "C" fn( + arg1: *mut PyObject, + arg2: *mut PyObject, + arg3: *mut PyObject, + ) -> ::std::os::raw::c_int, +>; +pub type reprfunc = + ::std::option::Option *mut PyObject>; +pub type hashfunc = ::std::option::Option Py_hash_t>; +pub type richcmpfunc = ::std::option::Option< + unsafe extern "C" fn( + arg1: *mut PyObject, + arg2: *mut PyObject, + arg3: ::std::os::raw::c_int, + ) -> *mut PyObject, +>; +pub type getiterfunc = + ::std::option::Option *mut PyObject>; +pub type iternextfunc = + ::std::option::Option *mut PyObject>; +pub type descrgetfunc = ::std::option::Option< + unsafe extern "C" fn( + arg1: *mut PyObject, + arg2: *mut PyObject, + arg3: *mut PyObject, + ) -> *mut PyObject, +>; +pub type descrsetfunc = ::std::option::Option< + unsafe extern "C" fn( + arg1: *mut PyObject, + arg2: *mut PyObject, + arg3: *mut PyObject, + ) -> ::std::os::raw::c_int, +>; +pub type initproc = ::std::option::Option< + unsafe extern "C" fn( + arg1: *mut PyObject, + arg2: *mut PyObject, + arg3: *mut PyObject, + ) -> ::std::os::raw::c_int, +>; +pub type newfunc = ::std::option::Option< + unsafe extern "C" fn( + arg1: *mut _typeobject, + arg2: *mut PyObject, + arg3: *mut PyObject, + ) -> *mut PyObject, +>; +pub type allocfunc = ::std::option::Option< + unsafe extern "C" fn(arg1: *mut _typeobject, arg2: Py_ssize_t) -> *mut PyObject, +>; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct _typeobject { + pub ob_base: PyVarObject, + pub tp_name: *const ::std::os::raw::c_char, + pub tp_basicsize: Py_ssize_t, + pub tp_itemsize: Py_ssize_t, + pub tp_dealloc: destructor, + pub tp_vectorcall_offset: Py_ssize_t, + pub tp_getattr: getattrfunc, + pub tp_setattr: setattrfunc, + pub tp_as_async: *mut PyAsyncMethods, + pub tp_repr: reprfunc, + pub tp_as_number: *mut PyNumberMethods, + pub tp_as_sequence: *mut PySequenceMethods, + pub tp_as_mapping: *mut PyMappingMethods, + pub tp_hash: hashfunc, + pub tp_call: ternaryfunc, + pub tp_str: reprfunc, + pub tp_getattro: getattrofunc, + pub tp_setattro: setattrofunc, + pub tp_as_buffer: *mut PyBufferProcs, + pub tp_flags: ::std::os::raw::c_ulong, + pub tp_doc: *const ::std::os::raw::c_char, + pub tp_traverse: traverseproc, + pub tp_clear: inquiry, + pub tp_richcompare: richcmpfunc, + pub tp_weaklistoffset: Py_ssize_t, + pub tp_iter: getiterfunc, + pub tp_iternext: iternextfunc, + pub tp_methods: *mut PyMethodDef, + pub tp_members: *mut PyMemberDef, + pub tp_getset: *mut PyGetSetDef, + pub tp_base: *mut _typeobject, + pub tp_dict: *mut PyObject, + pub tp_descr_get: descrgetfunc, + pub tp_descr_set: descrsetfunc, + pub tp_dictoffset: Py_ssize_t, + pub tp_init: initproc, + pub tp_alloc: allocfunc, + pub tp_new: newfunc, + pub tp_free: freefunc, + pub tp_is_gc: inquiry, + pub tp_bases: *mut PyObject, + pub tp_mro: *mut PyObject, + pub tp_cache: *mut PyObject, + pub tp_subclasses: *mut PyObject, + pub tp_weaklist: *mut PyObject, + pub tp_del: destructor, + pub tp_version_tag: ::std::os::raw::c_uint, + pub tp_finalize: destructor, + pub tp_vectorcall: vectorcallfunc, + pub tp_print: ::std::option::Option< + unsafe extern "C" fn( + arg1: *mut PyObject, + arg2: *mut FILE, + arg3: ::std::os::raw::c_int, + ) -> ::std::os::raw::c_int, + >, +} +impl Default for _typeobject { + fn default() -> Self { + let mut s = ::std::mem::MaybeUninit::::uninit(); + unsafe { + ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1); + s.assume_init() + } + } +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct bufferinfo { + pub buf: *mut ::std::os::raw::c_void, + pub obj: *mut PyObject, + pub len: Py_ssize_t, + pub itemsize: Py_ssize_t, + pub readonly: ::std::os::raw::c_int, + pub ndim: ::std::os::raw::c_int, + pub format: *mut ::std::os::raw::c_char, + pub shape: *mut Py_ssize_t, + pub strides: *mut Py_ssize_t, + pub suboffsets: *mut Py_ssize_t, + pub internal: *mut ::std::os::raw::c_void, +} +impl Default for bufferinfo { + fn default() -> Self { + let mut s = ::std::mem::MaybeUninit::::uninit(); + unsafe { + ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1); + s.assume_init() + } + } +} +pub type Py_buffer = bufferinfo; +pub type getbufferproc = ::std::option::Option< + unsafe extern "C" fn( + arg1: *mut PyObject, + arg2: *mut Py_buffer, + arg3: ::std::os::raw::c_int, + ) -> ::std::os::raw::c_int, +>; +pub type releasebufferproc = + ::std::option::Option; +pub type vectorcallfunc = ::std::option::Option< + unsafe extern "C" fn( + callable: *mut PyObject, + args: *const *mut PyObject, + nargsf: usize, + kwnames: *mut PyObject, + ) -> *mut PyObject, +>; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct PyNumberMethods { + pub nb_add: binaryfunc, + pub nb_subtract: binaryfunc, + pub nb_multiply: binaryfunc, + pub nb_remainder: binaryfunc, + pub nb_divmod: binaryfunc, + pub nb_power: ternaryfunc, + pub nb_negative: unaryfunc, + pub nb_positive: unaryfunc, + pub nb_absolute: unaryfunc, + pub nb_bool: inquiry, + pub nb_invert: unaryfunc, + pub nb_lshift: binaryfunc, + pub nb_rshift: binaryfunc, + pub nb_and: binaryfunc, + pub nb_xor: binaryfunc, + pub nb_or: binaryfunc, + pub nb_int: unaryfunc, + pub nb_reserved: *mut ::std::os::raw::c_void, + pub nb_float: unaryfunc, + pub nb_inplace_add: binaryfunc, + pub nb_inplace_subtract: binaryfunc, + pub nb_inplace_multiply: binaryfunc, + pub nb_inplace_remainder: binaryfunc, + pub nb_inplace_power: ternaryfunc, + pub nb_inplace_lshift: binaryfunc, + pub nb_inplace_rshift: binaryfunc, + pub nb_inplace_and: binaryfunc, + pub nb_inplace_xor: binaryfunc, + pub nb_inplace_or: binaryfunc, + pub nb_floor_divide: binaryfunc, + pub nb_true_divide: binaryfunc, + pub nb_inplace_floor_divide: binaryfunc, + pub nb_inplace_true_divide: binaryfunc, + pub nb_index: unaryfunc, + pub nb_matrix_multiply: binaryfunc, + pub nb_inplace_matrix_multiply: binaryfunc, +} +impl Default for PyNumberMethods { + fn default() -> Self { + let mut s = ::std::mem::MaybeUninit::::uninit(); + unsafe { + ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1); + s.assume_init() + } + } +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct PySequenceMethods { + pub sq_length: lenfunc, + pub sq_concat: binaryfunc, + pub sq_repeat: ssizeargfunc, + pub sq_item: ssizeargfunc, + pub was_sq_slice: *mut ::std::os::raw::c_void, + pub sq_ass_item: ssizeobjargproc, + pub was_sq_ass_slice: *mut ::std::os::raw::c_void, + pub sq_contains: objobjproc, + pub sq_inplace_concat: binaryfunc, + pub sq_inplace_repeat: ssizeargfunc, +} +impl Default for PySequenceMethods { + fn default() -> Self { + let mut s = ::std::mem::MaybeUninit::::uninit(); + unsafe { + ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1); + s.assume_init() + } + } +} +#[repr(C)] +#[derive(Debug, Default, Copy, Clone)] +pub struct PyMappingMethods { + pub mp_length: lenfunc, + pub mp_subscript: binaryfunc, + pub mp_ass_subscript: objobjargproc, +} +#[repr(C)] +#[derive(Debug, Default, Copy, Clone)] +pub struct PyAsyncMethods { + pub am_await: unaryfunc, + pub am_aiter: unaryfunc, + pub am_anext: unaryfunc, +} +#[repr(C)] +#[derive(Debug, Default, Copy, Clone)] +pub struct PyBufferProcs { + pub bf_getbuffer: getbufferproc, + pub bf_releasebuffer: releasebufferproc, +} +pub type PyTypeObject = _typeobject; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct _heaptypeobject { + pub ht_type: PyTypeObject, + pub as_async: PyAsyncMethods, + pub as_number: PyNumberMethods, + pub as_mapping: PyMappingMethods, + pub as_sequence: PySequenceMethods, + pub as_buffer: PyBufferProcs, + pub ht_name: *mut PyObject, + pub ht_slots: *mut PyObject, + pub ht_qualname: *mut PyObject, + pub ht_cached_keys: *mut _dictkeysobject, +} +impl Default for _heaptypeobject { + fn default() -> Self { + let mut s = ::std::mem::MaybeUninit::::uninit(); + unsafe { + ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1); + s.assume_init() + } + } +} +pub type PyHeapTypeObject = _heaptypeobject; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct PyBytesObject { + pub ob_base: PyVarObject, + pub ob_shash: Py_hash_t, + pub ob_sval: [::std::os::raw::c_char; 1usize], +} +impl Default for PyBytesObject { + fn default() -> Self { + let mut s = ::std::mem::MaybeUninit::::uninit(); + unsafe { + ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1); + s.assume_init() + } + } +} +pub type Py_UCS4 = u32; +pub type Py_UCS2 = u16; +pub type Py_UCS1 = u8; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct PyASCIIObject { + pub ob_base: PyObject, + pub length: Py_ssize_t, + pub hash: Py_hash_t, + pub state: PyASCIIObject__bindgen_ty_1, + pub wstr: *mut wchar_t, +} +#[repr(C)] +#[repr(align(4))] +#[derive(Debug, Default, Copy, Clone)] +pub struct PyASCIIObject__bindgen_ty_1 { + pub _bitfield_align_1: [u8; 0], + pub _bitfield_1: __BindgenBitfieldUnit<[u8; 4usize]>, +} +impl PyASCIIObject__bindgen_ty_1 { + #[inline] + pub fn interned(&self) -> ::std::os::raw::c_uint { + unsafe { ::std::mem::transmute(self._bitfield_1.get(0usize, 2u8) as u32) } + } + #[inline] + pub fn set_interned(&mut self, val: ::std::os::raw::c_uint) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + self._bitfield_1.set(0usize, 2u8, val as u64) + } + } + #[inline] + pub fn kind(&self) -> ::std::os::raw::c_uint { + unsafe { ::std::mem::transmute(self._bitfield_1.get(2usize, 3u8) as u32) } + } + #[inline] + pub fn set_kind(&mut self, val: ::std::os::raw::c_uint) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + self._bitfield_1.set(2usize, 3u8, val as u64) + } + } + #[inline] + pub fn compact(&self) -> ::std::os::raw::c_uint { + unsafe { ::std::mem::transmute(self._bitfield_1.get(5usize, 1u8) as u32) } + } + #[inline] + pub fn set_compact(&mut self, val: ::std::os::raw::c_uint) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + self._bitfield_1.set(5usize, 1u8, val as u64) + } + } + #[inline] + pub fn ascii(&self) -> ::std::os::raw::c_uint { + unsafe { ::std::mem::transmute(self._bitfield_1.get(6usize, 1u8) as u32) } + } + #[inline] + pub fn set_ascii(&mut self, val: ::std::os::raw::c_uint) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + self._bitfield_1.set(6usize, 1u8, val as u64) + } + } + #[inline] + pub fn ready(&self) -> ::std::os::raw::c_uint { + unsafe { ::std::mem::transmute(self._bitfield_1.get(7usize, 1u8) as u32) } + } + #[inline] + pub fn set_ready(&mut self, val: ::std::os::raw::c_uint) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + self._bitfield_1.set(7usize, 1u8, val as u64) + } + } + #[inline] + pub fn new_bitfield_1( + interned: ::std::os::raw::c_uint, + kind: ::std::os::raw::c_uint, + compact: ::std::os::raw::c_uint, + ascii: ::std::os::raw::c_uint, + ready: ::std::os::raw::c_uint, + ) -> __BindgenBitfieldUnit<[u8; 4usize]> { + let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 4usize]> = Default::default(); + __bindgen_bitfield_unit.set(0usize, 2u8, { + let interned: u32 = unsafe { ::std::mem::transmute(interned) }; + interned as u64 + }); + __bindgen_bitfield_unit.set(2usize, 3u8, { + let kind: u32 = unsafe { ::std::mem::transmute(kind) }; + kind as u64 + }); + __bindgen_bitfield_unit.set(5usize, 1u8, { + let compact: u32 = unsafe { ::std::mem::transmute(compact) }; + compact as u64 + }); + __bindgen_bitfield_unit.set(6usize, 1u8, { + let ascii: u32 = unsafe { ::std::mem::transmute(ascii) }; + ascii as u64 + }); + __bindgen_bitfield_unit.set(7usize, 1u8, { + let ready: u32 = unsafe { ::std::mem::transmute(ready) }; + ready as u64 + }); + __bindgen_bitfield_unit + } +} +impl Default for PyASCIIObject { + fn default() -> Self { + let mut s = ::std::mem::MaybeUninit::::uninit(); + unsafe { + ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1); + s.assume_init() + } + } +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct PyCompactUnicodeObject { + pub _base: PyASCIIObject, + pub utf8_length: Py_ssize_t, + pub utf8: *mut ::std::os::raw::c_char, + pub wstr_length: Py_ssize_t, +} +impl Default for PyCompactUnicodeObject { + fn default() -> Self { + let mut s = ::std::mem::MaybeUninit::::uninit(); + unsafe { + ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1); + s.assume_init() + } + } +} +#[repr(C)] +#[derive(Copy, Clone)] +pub struct PyUnicodeObject { + pub _base: PyCompactUnicodeObject, + pub data: PyUnicodeObject__bindgen_ty_1, +} +#[repr(C)] +#[derive(Copy, Clone)] +pub union PyUnicodeObject__bindgen_ty_1 { + pub any: *mut ::std::os::raw::c_void, + pub latin1: *mut Py_UCS1, + pub ucs2: *mut Py_UCS2, + pub ucs4: *mut Py_UCS4, +} +impl Default for PyUnicodeObject__bindgen_ty_1 { + fn default() -> Self { + let mut s = ::std::mem::MaybeUninit::::uninit(); + unsafe { + ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1); + s.assume_init() + } + } +} +impl Default for PyUnicodeObject { + fn default() -> Self { + let mut s = ::std::mem::MaybeUninit::::uninit(); + unsafe { + ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1); + s.assume_init() + } + } +} +pub type PyLongObject = _longobject; +pub type digit = u32; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct _longobject { + pub ob_base: PyVarObject, + pub ob_digit: [digit; 1usize], +} +impl Default for _longobject { + fn default() -> Self { + let mut s = ::std::mem::MaybeUninit::::uninit(); + unsafe { + ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1); + s.assume_init() + } + } +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct PyFloatObject { + pub ob_base: PyObject, + pub ob_fval: f64, +} +impl Default for PyFloatObject { + fn default() -> Self { + let mut s = ::std::mem::MaybeUninit::::uninit(); + unsafe { + ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1); + s.assume_init() + } + } +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct PyTupleObject { + pub ob_base: PyVarObject, + pub ob_item: [*mut PyObject; 1usize], +} +impl Default for PyTupleObject { + fn default() -> Self { + let mut s = ::std::mem::MaybeUninit::::uninit(); + unsafe { + ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1); + s.assume_init() + } + } +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct PyListObject { + pub ob_base: PyVarObject, + pub ob_item: *mut *mut PyObject, + pub allocated: Py_ssize_t, +} +impl Default for PyListObject { + fn default() -> Self { + let mut s = ::std::mem::MaybeUninit::::uninit(); + unsafe { + ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1); + s.assume_init() + } + } +} +pub type PyDictKeysObject = _dictkeysobject; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct PyDictObject { + pub ob_base: PyObject, + pub ma_used: Py_ssize_t, + pub ma_version_tag: u64, + pub ma_keys: *mut PyDictKeysObject, + pub ma_values: *mut *mut PyObject, +} +impl Default for PyDictObject { + fn default() -> Self { + let mut s = ::std::mem::MaybeUninit::::uninit(); + unsafe { + ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1); + s.assume_init() + } + } +} +pub type PyCFunction = ::std::option::Option< + unsafe extern "C" fn(arg1: *mut PyObject, arg2: *mut PyObject) -> *mut PyObject, +>; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct PyMethodDef { + pub ml_name: *const ::std::os::raw::c_char, + pub ml_meth: PyCFunction, + pub ml_flags: ::std::os::raw::c_int, + pub ml_doc: *const ::std::os::raw::c_char, +} +impl Default for PyMethodDef { + fn default() -> Self { + let mut s = ::std::mem::MaybeUninit::::uninit(); + unsafe { + ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1); + s.assume_init() + } + } +} +pub type PyThread_type_lock = *mut ::std::os::raw::c_void; +pub type PyThreadState = _ts; +pub type PyInterpreterState = _is; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct PyWideStringList { + pub length: Py_ssize_t, + pub items: *mut *mut wchar_t, +} +impl Default for PyWideStringList { + fn default() -> Self { + let mut s = ::std::mem::MaybeUninit::::uninit(); + unsafe { + ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1); + s.assume_init() + } + } +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct PyConfig { + pub _config_init: ::std::os::raw::c_int, + pub isolated: ::std::os::raw::c_int, + pub use_environment: ::std::os::raw::c_int, + pub dev_mode: ::std::os::raw::c_int, + pub install_signal_handlers: ::std::os::raw::c_int, + pub use_hash_seed: ::std::os::raw::c_int, + pub hash_seed: ::std::os::raw::c_ulong, + pub faulthandler: ::std::os::raw::c_int, + pub tracemalloc: ::std::os::raw::c_int, + pub import_time: ::std::os::raw::c_int, + pub show_ref_count: ::std::os::raw::c_int, + pub show_alloc_count: ::std::os::raw::c_int, + pub dump_refs: ::std::os::raw::c_int, + pub malloc_stats: ::std::os::raw::c_int, + pub filesystem_encoding: *mut wchar_t, + pub filesystem_errors: *mut wchar_t, + pub pycache_prefix: *mut wchar_t, + pub parse_argv: ::std::os::raw::c_int, + pub argv: PyWideStringList, + pub program_name: *mut wchar_t, + pub xoptions: PyWideStringList, + pub warnoptions: PyWideStringList, + pub site_import: ::std::os::raw::c_int, + pub bytes_warning: ::std::os::raw::c_int, + pub inspect: ::std::os::raw::c_int, + pub interactive: ::std::os::raw::c_int, + pub optimization_level: ::std::os::raw::c_int, + pub parser_debug: ::std::os::raw::c_int, + pub write_bytecode: ::std::os::raw::c_int, + pub verbose: ::std::os::raw::c_int, + pub quiet: ::std::os::raw::c_int, + pub user_site_directory: ::std::os::raw::c_int, + pub configure_c_stdio: ::std::os::raw::c_int, + pub buffered_stdio: ::std::os::raw::c_int, + pub stdio_encoding: *mut wchar_t, + pub stdio_errors: *mut wchar_t, + pub check_hash_pycs_mode: *mut wchar_t, + pub pathconfig_warnings: ::std::os::raw::c_int, + pub pythonpath_env: *mut wchar_t, + pub home: *mut wchar_t, + pub module_search_paths_set: ::std::os::raw::c_int, + pub module_search_paths: PyWideStringList, + pub executable: *mut wchar_t, + pub base_executable: *mut wchar_t, + pub prefix: *mut wchar_t, + pub base_prefix: *mut wchar_t, + pub exec_prefix: *mut wchar_t, + pub base_exec_prefix: *mut wchar_t, + pub skip_source_first_line: ::std::os::raw::c_int, + pub run_command: *mut wchar_t, + pub run_module: *mut wchar_t, + pub run_filename: *mut wchar_t, + pub _install_importlib: ::std::os::raw::c_int, + pub _init_main: ::std::os::raw::c_int, +} +impl Default for PyConfig { + fn default() -> Self { + let mut s = ::std::mem::MaybeUninit::::uninit(); + unsafe { + ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1); + s.assume_init() + } + } +} +pub type Py_tracefunc = ::std::option::Option< + unsafe extern "C" fn( + arg1: *mut PyObject, + arg2: *mut _frame, + arg3: ::std::os::raw::c_int, + arg4: *mut PyObject, + ) -> ::std::os::raw::c_int, +>; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct _err_stackitem { + pub exc_type: *mut PyObject, + pub exc_value: *mut PyObject, + pub exc_traceback: *mut PyObject, + pub previous_item: *mut _err_stackitem, +} +impl Default for _err_stackitem { + fn default() -> Self { + let mut s = ::std::mem::MaybeUninit::::uninit(); + unsafe { + ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1); + s.assume_init() + } + } +} +pub type _PyErr_StackItem = _err_stackitem; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct _ts { + pub prev: *mut _ts, + pub next: *mut _ts, + pub interp: *mut PyInterpreterState, + pub frame: *mut _frame, + pub recursion_depth: ::std::os::raw::c_int, + pub overflowed: ::std::os::raw::c_char, + pub recursion_critical: ::std::os::raw::c_char, + pub stackcheck_counter: ::std::os::raw::c_int, + pub tracing: ::std::os::raw::c_int, + pub use_tracing: ::std::os::raw::c_int, + pub c_profilefunc: Py_tracefunc, + pub c_tracefunc: Py_tracefunc, + pub c_profileobj: *mut PyObject, + pub c_traceobj: *mut PyObject, + pub curexc_type: *mut PyObject, + pub curexc_value: *mut PyObject, + pub curexc_traceback: *mut PyObject, + pub exc_state: _PyErr_StackItem, + pub exc_info: *mut _PyErr_StackItem, + pub dict: *mut PyObject, + pub gilstate_counter: ::std::os::raw::c_int, + pub async_exc: *mut PyObject, + pub thread_id: ::std::os::raw::c_ulong, + pub trash_delete_nesting: ::std::os::raw::c_int, + pub trash_delete_later: *mut PyObject, + pub on_delete: ::std::option::Option, + pub on_delete_data: *mut ::std::os::raw::c_void, + pub coroutine_origin_tracking_depth: ::std::os::raw::c_int, + pub async_gen_firstiter: *mut PyObject, + pub async_gen_finalizer: *mut PyObject, + pub context: *mut PyObject, + pub context_ver: u64, + pub id: u64, +} +impl Default for _ts { + fn default() -> Self { + let mut s = ::std::mem::MaybeUninit::::uninit(); + unsafe { + ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1); + s.assume_init() + } + } +} +pub type getter = ::std::option::Option< + unsafe extern "C" fn(arg1: *mut PyObject, arg2: *mut ::std::os::raw::c_void) -> *mut PyObject, +>; +pub type setter = ::std::option::Option< + unsafe extern "C" fn( + arg1: *mut PyObject, + arg2: *mut PyObject, + arg3: *mut ::std::os::raw::c_void, + ) -> ::std::os::raw::c_int, +>; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct PyGetSetDef { + pub name: *const ::std::os::raw::c_char, + pub get: getter, + pub set: setter, + pub doc: *const ::std::os::raw::c_char, + pub closure: *mut ::std::os::raw::c_void, +} +impl Default for PyGetSetDef { + fn default() -> Self { + let mut s = ::std::mem::MaybeUninit::::uninit(); + unsafe { + ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1); + s.assume_init() + } + } +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct PyMemberDef { + _unused: [u8; 0], +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct _PyOpcache { + _unused: [u8; 0], +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct PyCodeObject { + pub ob_base: PyObject, + pub co_argcount: ::std::os::raw::c_int, + pub co_posonlyargcount: ::std::os::raw::c_int, + pub co_kwonlyargcount: ::std::os::raw::c_int, + pub co_nlocals: ::std::os::raw::c_int, + pub co_stacksize: ::std::os::raw::c_int, + pub co_flags: ::std::os::raw::c_int, + pub co_firstlineno: ::std::os::raw::c_int, + pub co_code: *mut PyObject, + pub co_consts: *mut PyObject, + pub co_names: *mut PyObject, + pub co_varnames: *mut PyObject, + pub co_freevars: *mut PyObject, + pub co_cellvars: *mut PyObject, + pub co_cell2arg: *mut Py_ssize_t, + pub co_filename: *mut PyObject, + pub co_name: *mut PyObject, + pub co_lnotab: *mut PyObject, + pub co_zombieframe: *mut ::std::os::raw::c_void, + pub co_weakreflist: *mut PyObject, + pub co_extra: *mut ::std::os::raw::c_void, + pub co_opcache_map: *mut ::std::os::raw::c_uchar, + pub co_opcache: *mut _PyOpcache, + pub co_opcache_flag: ::std::os::raw::c_int, + pub co_opcache_size: ::std::os::raw::c_uchar, +} +impl Default for PyCodeObject { + fn default() -> Self { + let mut s = ::std::mem::MaybeUninit::::uninit(); + unsafe { + ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1); + s.assume_init() + } + } +} +pub const _Py_error_handler__Py_ERROR_UNKNOWN: _Py_error_handler = 0; +pub const _Py_error_handler__Py_ERROR_STRICT: _Py_error_handler = 1; +pub const _Py_error_handler__Py_ERROR_SURROGATEESCAPE: _Py_error_handler = 2; +pub const _Py_error_handler__Py_ERROR_REPLACE: _Py_error_handler = 3; +pub const _Py_error_handler__Py_ERROR_IGNORE: _Py_error_handler = 4; +pub const _Py_error_handler__Py_ERROR_BACKSLASHREPLACE: _Py_error_handler = 5; +pub const _Py_error_handler__Py_ERROR_SURROGATEPASS: _Py_error_handler = 6; +pub const _Py_error_handler__Py_ERROR_XMLCHARREFREPLACE: _Py_error_handler = 7; +pub const _Py_error_handler__Py_ERROR_OTHER: _Py_error_handler = 8; +pub type _Py_error_handler = ::std::os::raw::c_uint; +#[repr(C)] +#[derive(Debug, Default, Copy, Clone)] +pub struct PyTryBlock { + pub b_type: ::std::os::raw::c_int, + pub b_handler: ::std::os::raw::c_int, + pub b_level: ::std::os::raw::c_int, +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct _frame { + pub ob_base: PyVarObject, + pub f_back: *mut _frame, + pub f_code: *mut PyCodeObject, + pub f_builtins: *mut PyObject, + pub f_globals: *mut PyObject, + pub f_locals: *mut PyObject, + pub f_valuestack: *mut *mut PyObject, + pub f_stacktop: *mut *mut PyObject, + pub f_trace: *mut PyObject, + pub f_trace_lines: ::std::os::raw::c_char, + pub f_trace_opcodes: ::std::os::raw::c_char, + pub f_gen: *mut PyObject, + pub f_lasti: ::std::os::raw::c_int, + pub f_lineno: ::std::os::raw::c_int, + pub f_iblock: ::std::os::raw::c_int, + pub f_executing: ::std::os::raw::c_char, + pub f_blockstack: [PyTryBlock; 20usize], + pub f_localsplus: [*mut PyObject; 1usize], +} +impl Default for _frame { + fn default() -> Self { + let mut s = ::std::mem::MaybeUninit::::uninit(); + unsafe { + ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1); + s.assume_init() + } + } +} +pub type PyFrameObject = _frame; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct _warnings_runtime_state { + pub filters: *mut PyObject, + pub once_registry: *mut PyObject, + pub default_action: *mut PyObject, + pub filters_version: ::std::os::raw::c_long, +} +impl Default for _warnings_runtime_state { + fn default() -> Self { + let mut s = ::std::mem::MaybeUninit::::uninit(); + unsafe { + ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1); + s.assume_init() + } + } +} +pub type _PyFrameEvalFunction = ::std::option::Option< + unsafe extern "C" fn(arg1: *mut _frame, arg2: ::std::os::raw::c_int) -> *mut PyObject, +>; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct _is { + pub next: *mut _is, + pub tstate_head: *mut _ts, + pub id: i64, + pub id_refcount: i64, + pub requires_idref: ::std::os::raw::c_int, + pub id_mutex: PyThread_type_lock, + pub finalizing: ::std::os::raw::c_int, + pub modules: *mut PyObject, + pub modules_by_index: *mut PyObject, + pub sysdict: *mut PyObject, + pub builtins: *mut PyObject, + pub importlib: *mut PyObject, + pub check_interval: ::std::os::raw::c_int, + pub num_threads: ::std::os::raw::c_long, + pub pythread_stacksize: usize, + pub codec_search_path: *mut PyObject, + pub codec_search_cache: *mut PyObject, + pub codec_error_registry: *mut PyObject, + pub codecs_initialized: ::std::os::raw::c_int, + pub fs_codec: _is__bindgen_ty_1, + pub config: PyConfig, + pub dlopenflags: ::std::os::raw::c_int, + pub dict: *mut PyObject, + pub builtins_copy: *mut PyObject, + pub import_func: *mut PyObject, + pub eval_frame: _PyFrameEvalFunction, + pub co_extra_user_count: Py_ssize_t, + pub co_extra_freefuncs: [freefunc; 255usize], + pub before_forkers: *mut PyObject, + pub after_forkers_parent: *mut PyObject, + pub after_forkers_child: *mut PyObject, + pub pyexitfunc: ::std::option::Option, + pub pyexitmodule: *mut PyObject, + pub tstate_next_unique_id: u64, + pub warnings: _warnings_runtime_state, + pub audit_hooks: *mut PyObject, + pub int_max_str_digits: ::std::os::raw::c_int, +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct _is__bindgen_ty_1 { + pub encoding: *mut ::std::os::raw::c_char, + pub errors: *mut ::std::os::raw::c_char, + pub error_handler: _Py_error_handler, +} +impl Default for _is__bindgen_ty_1 { + fn default() -> Self { + let mut s = ::std::mem::MaybeUninit::::uninit(); + unsafe { + ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1); + s.assume_init() + } + } +} +impl Default for _is { + fn default() -> Self { + let mut s = ::std::mem::MaybeUninit::::uninit(); + unsafe { + ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1); + s.assume_init() + } + } +} +#[repr(C)] +#[derive(Debug, Default, Copy, Clone)] +pub struct _dictkeysobject { + pub _address: u8, +} diff --git a/src/python_bindings/v3_9_15.rs b/src/python_bindings/v3_9_15.rs new file mode 100644 index 00000000..bfc14191 --- /dev/null +++ b/src/python_bindings/v3_9_15.rs @@ -0,0 +1,1503 @@ +// Generated bindings for python v3.9.15 +#![allow(dead_code)] +#![allow(non_upper_case_globals)] +#![allow(non_camel_case_types)] +#![allow(non_snake_case)] +#![allow(clippy::useless_transmute)] +#![allow(clippy::default_trait_access)] +#![allow(clippy::cast_lossless)] +#![allow(clippy::trivially_copy_pass_by_ref)] + +/* automatically generated by rust-bindgen 0.65.1 */ + +#[repr(C)] +#[derive(Copy, Clone, Debug, Default, Eq, Hash, Ord, PartialEq, PartialOrd)] +pub struct __BindgenBitfieldUnit { + storage: Storage, +} +impl __BindgenBitfieldUnit { + #[inline] + pub const fn new(storage: Storage) -> Self { + Self { storage } + } +} +impl __BindgenBitfieldUnit +where + Storage: AsRef<[u8]> + AsMut<[u8]>, +{ + #[inline] + pub fn get_bit(&self, index: usize) -> bool { + debug_assert!(index / 8 < self.storage.as_ref().len()); + let byte_index = index / 8; + let byte = self.storage.as_ref()[byte_index]; + let bit_index = if cfg!(target_endian = "big") { + 7 - (index % 8) + } else { + index % 8 + }; + let mask = 1 << bit_index; + byte & mask == mask + } + #[inline] + pub fn set_bit(&mut self, index: usize, val: bool) { + debug_assert!(index / 8 < self.storage.as_ref().len()); + let byte_index = index / 8; + let byte = &mut self.storage.as_mut()[byte_index]; + let bit_index = if cfg!(target_endian = "big") { + 7 - (index % 8) + } else { + index % 8 + }; + let mask = 1 << bit_index; + if val { + *byte |= mask; + } else { + *byte &= !mask; + } + } + #[inline] + pub fn get(&self, bit_offset: usize, bit_width: u8) -> u64 { + debug_assert!(bit_width <= 64); + debug_assert!(bit_offset / 8 < self.storage.as_ref().len()); + debug_assert!((bit_offset + (bit_width as usize)) / 8 <= self.storage.as_ref().len()); + let mut val = 0; + for i in 0..(bit_width as usize) { + if self.get_bit(i + bit_offset) { + let index = if cfg!(target_endian = "big") { + bit_width as usize - 1 - i + } else { + i + }; + val |= 1 << index; + } + } + val + } + #[inline] + pub fn set(&mut self, bit_offset: usize, bit_width: u8, val: u64) { + debug_assert!(bit_width <= 64); + debug_assert!(bit_offset / 8 < self.storage.as_ref().len()); + debug_assert!((bit_offset + (bit_width as usize)) / 8 <= self.storage.as_ref().len()); + for i in 0..(bit_width as usize) { + let mask = 1 << i; + let val_bit_is_set = val & mask == mask; + let index = if cfg!(target_endian = "big") { + bit_width as usize - 1 - i + } else { + i + }; + self.set_bit(index + bit_offset, val_bit_is_set); + } + } +} +pub type __darwin_wchar_t = ::std::os::raw::c_int; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct _opaque_pthread_cond_t { + pub __sig: ::std::os::raw::c_long, + pub __opaque: [::std::os::raw::c_char; 40usize], +} +impl Default for _opaque_pthread_cond_t { + fn default() -> Self { + let mut s = ::std::mem::MaybeUninit::::uninit(); + unsafe { + ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1); + s.assume_init() + } + } +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct _opaque_pthread_mutex_t { + pub __sig: ::std::os::raw::c_long, + pub __opaque: [::std::os::raw::c_char; 56usize], +} +impl Default for _opaque_pthread_mutex_t { + fn default() -> Self { + let mut s = ::std::mem::MaybeUninit::::uninit(); + unsafe { + ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1); + s.assume_init() + } + } +} +pub type __darwin_pthread_cond_t = _opaque_pthread_cond_t; +pub type __darwin_pthread_key_t = ::std::os::raw::c_ulong; +pub type __darwin_pthread_mutex_t = _opaque_pthread_mutex_t; +pub type wchar_t = __darwin_wchar_t; +pub type Py_ssize_t = isize; +pub type Py_hash_t = Py_ssize_t; +pub type PyTypeObject = _typeobject; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct _object { + pub ob_refcnt: Py_ssize_t, + pub ob_type: *mut PyTypeObject, +} +impl Default for _object { + fn default() -> Self { + let mut s = ::std::mem::MaybeUninit::::uninit(); + unsafe { + ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1); + s.assume_init() + } + } +} +pub type PyObject = _object; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct PyVarObject { + pub ob_base: PyObject, + pub ob_size: Py_ssize_t, +} +impl Default for PyVarObject { + fn default() -> Self { + let mut s = ::std::mem::MaybeUninit::::uninit(); + unsafe { + ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1); + s.assume_init() + } + } +} +pub type unaryfunc = + ::std::option::Option *mut PyObject>; +pub type binaryfunc = ::std::option::Option< + unsafe extern "C" fn(arg1: *mut PyObject, arg2: *mut PyObject) -> *mut PyObject, +>; +pub type ternaryfunc = ::std::option::Option< + unsafe extern "C" fn( + arg1: *mut PyObject, + arg2: *mut PyObject, + arg3: *mut PyObject, + ) -> *mut PyObject, +>; +pub type inquiry = + ::std::option::Option ::std::os::raw::c_int>; +pub type lenfunc = ::std::option::Option Py_ssize_t>; +pub type ssizeargfunc = ::std::option::Option< + unsafe extern "C" fn(arg1: *mut PyObject, arg2: Py_ssize_t) -> *mut PyObject, +>; +pub type ssizeobjargproc = ::std::option::Option< + unsafe extern "C" fn( + arg1: *mut PyObject, + arg2: Py_ssize_t, + arg3: *mut PyObject, + ) -> ::std::os::raw::c_int, +>; +pub type objobjargproc = ::std::option::Option< + unsafe extern "C" fn( + arg1: *mut PyObject, + arg2: *mut PyObject, + arg3: *mut PyObject, + ) -> ::std::os::raw::c_int, +>; +pub type objobjproc = ::std::option::Option< + unsafe extern "C" fn(arg1: *mut PyObject, arg2: *mut PyObject) -> ::std::os::raw::c_int, +>; +pub type visitproc = ::std::option::Option< + unsafe extern "C" fn( + arg1: *mut PyObject, + arg2: *mut ::std::os::raw::c_void, + ) -> ::std::os::raw::c_int, +>; +pub type traverseproc = ::std::option::Option< + unsafe extern "C" fn( + arg1: *mut PyObject, + arg2: visitproc, + arg3: *mut ::std::os::raw::c_void, + ) -> ::std::os::raw::c_int, +>; +pub type freefunc = ::std::option::Option; +pub type destructor = ::std::option::Option; +pub type getattrfunc = ::std::option::Option< + unsafe extern "C" fn(arg1: *mut PyObject, arg2: *mut ::std::os::raw::c_char) -> *mut PyObject, +>; +pub type getattrofunc = ::std::option::Option< + unsafe extern "C" fn(arg1: *mut PyObject, arg2: *mut PyObject) -> *mut PyObject, +>; +pub type setattrfunc = ::std::option::Option< + unsafe extern "C" fn( + arg1: *mut PyObject, + arg2: *mut ::std::os::raw::c_char, + arg3: *mut PyObject, + ) -> ::std::os::raw::c_int, +>; +pub type setattrofunc = ::std::option::Option< + unsafe extern "C" fn( + arg1: *mut PyObject, + arg2: *mut PyObject, + arg3: *mut PyObject, + ) -> ::std::os::raw::c_int, +>; +pub type reprfunc = + ::std::option::Option *mut PyObject>; +pub type hashfunc = ::std::option::Option Py_hash_t>; +pub type richcmpfunc = ::std::option::Option< + unsafe extern "C" fn( + arg1: *mut PyObject, + arg2: *mut PyObject, + arg3: ::std::os::raw::c_int, + ) -> *mut PyObject, +>; +pub type getiterfunc = + ::std::option::Option *mut PyObject>; +pub type iternextfunc = + ::std::option::Option *mut PyObject>; +pub type descrgetfunc = ::std::option::Option< + unsafe extern "C" fn( + arg1: *mut PyObject, + arg2: *mut PyObject, + arg3: *mut PyObject, + ) -> *mut PyObject, +>; +pub type descrsetfunc = ::std::option::Option< + unsafe extern "C" fn( + arg1: *mut PyObject, + arg2: *mut PyObject, + arg3: *mut PyObject, + ) -> ::std::os::raw::c_int, +>; +pub type initproc = ::std::option::Option< + unsafe extern "C" fn( + arg1: *mut PyObject, + arg2: *mut PyObject, + arg3: *mut PyObject, + ) -> ::std::os::raw::c_int, +>; +pub type newfunc = ::std::option::Option< + unsafe extern "C" fn( + arg1: *mut PyTypeObject, + arg2: *mut PyObject, + arg3: *mut PyObject, + ) -> *mut PyObject, +>; +pub type allocfunc = ::std::option::Option< + unsafe extern "C" fn(arg1: *mut PyTypeObject, arg2: Py_ssize_t) -> *mut PyObject, +>; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct bufferinfo { + pub buf: *mut ::std::os::raw::c_void, + pub obj: *mut PyObject, + pub len: Py_ssize_t, + pub itemsize: Py_ssize_t, + pub readonly: ::std::os::raw::c_int, + pub ndim: ::std::os::raw::c_int, + pub format: *mut ::std::os::raw::c_char, + pub shape: *mut Py_ssize_t, + pub strides: *mut Py_ssize_t, + pub suboffsets: *mut Py_ssize_t, + pub internal: *mut ::std::os::raw::c_void, +} +impl Default for bufferinfo { + fn default() -> Self { + let mut s = ::std::mem::MaybeUninit::::uninit(); + unsafe { + ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1); + s.assume_init() + } + } +} +pub type Py_buffer = bufferinfo; +pub type getbufferproc = ::std::option::Option< + unsafe extern "C" fn( + arg1: *mut PyObject, + arg2: *mut Py_buffer, + arg3: ::std::os::raw::c_int, + ) -> ::std::os::raw::c_int, +>; +pub type releasebufferproc = + ::std::option::Option; +pub type vectorcallfunc = ::std::option::Option< + unsafe extern "C" fn( + callable: *mut PyObject, + args: *const *mut PyObject, + nargsf: usize, + kwnames: *mut PyObject, + ) -> *mut PyObject, +>; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct PyNumberMethods { + pub nb_add: binaryfunc, + pub nb_subtract: binaryfunc, + pub nb_multiply: binaryfunc, + pub nb_remainder: binaryfunc, + pub nb_divmod: binaryfunc, + pub nb_power: ternaryfunc, + pub nb_negative: unaryfunc, + pub nb_positive: unaryfunc, + pub nb_absolute: unaryfunc, + pub nb_bool: inquiry, + pub nb_invert: unaryfunc, + pub nb_lshift: binaryfunc, + pub nb_rshift: binaryfunc, + pub nb_and: binaryfunc, + pub nb_xor: binaryfunc, + pub nb_or: binaryfunc, + pub nb_int: unaryfunc, + pub nb_reserved: *mut ::std::os::raw::c_void, + pub nb_float: unaryfunc, + pub nb_inplace_add: binaryfunc, + pub nb_inplace_subtract: binaryfunc, + pub nb_inplace_multiply: binaryfunc, + pub nb_inplace_remainder: binaryfunc, + pub nb_inplace_power: ternaryfunc, + pub nb_inplace_lshift: binaryfunc, + pub nb_inplace_rshift: binaryfunc, + pub nb_inplace_and: binaryfunc, + pub nb_inplace_xor: binaryfunc, + pub nb_inplace_or: binaryfunc, + pub nb_floor_divide: binaryfunc, + pub nb_true_divide: binaryfunc, + pub nb_inplace_floor_divide: binaryfunc, + pub nb_inplace_true_divide: binaryfunc, + pub nb_index: unaryfunc, + pub nb_matrix_multiply: binaryfunc, + pub nb_inplace_matrix_multiply: binaryfunc, +} +impl Default for PyNumberMethods { + fn default() -> Self { + let mut s = ::std::mem::MaybeUninit::::uninit(); + unsafe { + ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1); + s.assume_init() + } + } +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct PySequenceMethods { + pub sq_length: lenfunc, + pub sq_concat: binaryfunc, + pub sq_repeat: ssizeargfunc, + pub sq_item: ssizeargfunc, + pub was_sq_slice: *mut ::std::os::raw::c_void, + pub sq_ass_item: ssizeobjargproc, + pub was_sq_ass_slice: *mut ::std::os::raw::c_void, + pub sq_contains: objobjproc, + pub sq_inplace_concat: binaryfunc, + pub sq_inplace_repeat: ssizeargfunc, +} +impl Default for PySequenceMethods { + fn default() -> Self { + let mut s = ::std::mem::MaybeUninit::::uninit(); + unsafe { + ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1); + s.assume_init() + } + } +} +#[repr(C)] +#[derive(Debug, Default, Copy, Clone)] +pub struct PyMappingMethods { + pub mp_length: lenfunc, + pub mp_subscript: binaryfunc, + pub mp_ass_subscript: objobjargproc, +} +#[repr(C)] +#[derive(Debug, Default, Copy, Clone)] +pub struct PyAsyncMethods { + pub am_await: unaryfunc, + pub am_aiter: unaryfunc, + pub am_anext: unaryfunc, +} +#[repr(C)] +#[derive(Debug, Default, Copy, Clone)] +pub struct PyBufferProcs { + pub bf_getbuffer: getbufferproc, + pub bf_releasebuffer: releasebufferproc, +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct _typeobject { + pub ob_base: PyVarObject, + pub tp_name: *const ::std::os::raw::c_char, + pub tp_basicsize: Py_ssize_t, + pub tp_itemsize: Py_ssize_t, + pub tp_dealloc: destructor, + pub tp_vectorcall_offset: Py_ssize_t, + pub tp_getattr: getattrfunc, + pub tp_setattr: setattrfunc, + pub tp_as_async: *mut PyAsyncMethods, + pub tp_repr: reprfunc, + pub tp_as_number: *mut PyNumberMethods, + pub tp_as_sequence: *mut PySequenceMethods, + pub tp_as_mapping: *mut PyMappingMethods, + pub tp_hash: hashfunc, + pub tp_call: ternaryfunc, + pub tp_str: reprfunc, + pub tp_getattro: getattrofunc, + pub tp_setattro: setattrofunc, + pub tp_as_buffer: *mut PyBufferProcs, + pub tp_flags: ::std::os::raw::c_ulong, + pub tp_doc: *const ::std::os::raw::c_char, + pub tp_traverse: traverseproc, + pub tp_clear: inquiry, + pub tp_richcompare: richcmpfunc, + pub tp_weaklistoffset: Py_ssize_t, + pub tp_iter: getiterfunc, + pub tp_iternext: iternextfunc, + pub tp_methods: *mut PyMethodDef, + pub tp_members: *mut PyMemberDef, + pub tp_getset: *mut PyGetSetDef, + pub tp_base: *mut _typeobject, + pub tp_dict: *mut PyObject, + pub tp_descr_get: descrgetfunc, + pub tp_descr_set: descrsetfunc, + pub tp_dictoffset: Py_ssize_t, + pub tp_init: initproc, + pub tp_alloc: allocfunc, + pub tp_new: newfunc, + pub tp_free: freefunc, + pub tp_is_gc: inquiry, + pub tp_bases: *mut PyObject, + pub tp_mro: *mut PyObject, + pub tp_cache: *mut PyObject, + pub tp_subclasses: *mut PyObject, + pub tp_weaklist: *mut PyObject, + pub tp_del: destructor, + pub tp_version_tag: ::std::os::raw::c_uint, + pub tp_finalize: destructor, + pub tp_vectorcall: vectorcallfunc, +} +impl Default for _typeobject { + fn default() -> Self { + let mut s = ::std::mem::MaybeUninit::::uninit(); + unsafe { + ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1); + s.assume_init() + } + } +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct _heaptypeobject { + pub ht_type: PyTypeObject, + pub as_async: PyAsyncMethods, + pub as_number: PyNumberMethods, + pub as_mapping: PyMappingMethods, + pub as_sequence: PySequenceMethods, + pub as_buffer: PyBufferProcs, + pub ht_name: *mut PyObject, + pub ht_slots: *mut PyObject, + pub ht_qualname: *mut PyObject, + pub ht_cached_keys: *mut _dictkeysobject, + pub ht_module: *mut PyObject, +} +impl Default for _heaptypeobject { + fn default() -> Self { + let mut s = ::std::mem::MaybeUninit::::uninit(); + unsafe { + ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1); + s.assume_init() + } + } +} +pub type PyHeapTypeObject = _heaptypeobject; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct PyBytesObject { + pub ob_base: PyVarObject, + pub ob_shash: Py_hash_t, + pub ob_sval: [::std::os::raw::c_char; 1usize], +} +impl Default for PyBytesObject { + fn default() -> Self { + let mut s = ::std::mem::MaybeUninit::::uninit(); + unsafe { + ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1); + s.assume_init() + } + } +} +pub type Py_UCS4 = u32; +pub type Py_UCS2 = u16; +pub type Py_UCS1 = u8; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct PyASCIIObject { + pub ob_base: PyObject, + pub length: Py_ssize_t, + pub hash: Py_hash_t, + pub state: PyASCIIObject__bindgen_ty_1, + pub wstr: *mut wchar_t, +} +#[repr(C)] +#[repr(align(4))] +#[derive(Debug, Default, Copy, Clone)] +pub struct PyASCIIObject__bindgen_ty_1 { + pub _bitfield_align_1: [u8; 0], + pub _bitfield_1: __BindgenBitfieldUnit<[u8; 4usize]>, +} +impl PyASCIIObject__bindgen_ty_1 { + #[inline] + pub fn interned(&self) -> ::std::os::raw::c_uint { + unsafe { ::std::mem::transmute(self._bitfield_1.get(0usize, 2u8) as u32) } + } + #[inline] + pub fn set_interned(&mut self, val: ::std::os::raw::c_uint) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + self._bitfield_1.set(0usize, 2u8, val as u64) + } + } + #[inline] + pub fn kind(&self) -> ::std::os::raw::c_uint { + unsafe { ::std::mem::transmute(self._bitfield_1.get(2usize, 3u8) as u32) } + } + #[inline] + pub fn set_kind(&mut self, val: ::std::os::raw::c_uint) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + self._bitfield_1.set(2usize, 3u8, val as u64) + } + } + #[inline] + pub fn compact(&self) -> ::std::os::raw::c_uint { + unsafe { ::std::mem::transmute(self._bitfield_1.get(5usize, 1u8) as u32) } + } + #[inline] + pub fn set_compact(&mut self, val: ::std::os::raw::c_uint) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + self._bitfield_1.set(5usize, 1u8, val as u64) + } + } + #[inline] + pub fn ascii(&self) -> ::std::os::raw::c_uint { + unsafe { ::std::mem::transmute(self._bitfield_1.get(6usize, 1u8) as u32) } + } + #[inline] + pub fn set_ascii(&mut self, val: ::std::os::raw::c_uint) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + self._bitfield_1.set(6usize, 1u8, val as u64) + } + } + #[inline] + pub fn ready(&self) -> ::std::os::raw::c_uint { + unsafe { ::std::mem::transmute(self._bitfield_1.get(7usize, 1u8) as u32) } + } + #[inline] + pub fn set_ready(&mut self, val: ::std::os::raw::c_uint) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + self._bitfield_1.set(7usize, 1u8, val as u64) + } + } + #[inline] + pub fn new_bitfield_1( + interned: ::std::os::raw::c_uint, + kind: ::std::os::raw::c_uint, + compact: ::std::os::raw::c_uint, + ascii: ::std::os::raw::c_uint, + ready: ::std::os::raw::c_uint, + ) -> __BindgenBitfieldUnit<[u8; 4usize]> { + let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 4usize]> = Default::default(); + __bindgen_bitfield_unit.set(0usize, 2u8, { + let interned: u32 = unsafe { ::std::mem::transmute(interned) }; + interned as u64 + }); + __bindgen_bitfield_unit.set(2usize, 3u8, { + let kind: u32 = unsafe { ::std::mem::transmute(kind) }; + kind as u64 + }); + __bindgen_bitfield_unit.set(5usize, 1u8, { + let compact: u32 = unsafe { ::std::mem::transmute(compact) }; + compact as u64 + }); + __bindgen_bitfield_unit.set(6usize, 1u8, { + let ascii: u32 = unsafe { ::std::mem::transmute(ascii) }; + ascii as u64 + }); + __bindgen_bitfield_unit.set(7usize, 1u8, { + let ready: u32 = unsafe { ::std::mem::transmute(ready) }; + ready as u64 + }); + __bindgen_bitfield_unit + } +} +impl Default for PyASCIIObject { + fn default() -> Self { + let mut s = ::std::mem::MaybeUninit::::uninit(); + unsafe { + ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1); + s.assume_init() + } + } +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct PyCompactUnicodeObject { + pub _base: PyASCIIObject, + pub utf8_length: Py_ssize_t, + pub utf8: *mut ::std::os::raw::c_char, + pub wstr_length: Py_ssize_t, +} +impl Default for PyCompactUnicodeObject { + fn default() -> Self { + let mut s = ::std::mem::MaybeUninit::::uninit(); + unsafe { + ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1); + s.assume_init() + } + } +} +#[repr(C)] +#[derive(Copy, Clone)] +pub struct PyUnicodeObject { + pub _base: PyCompactUnicodeObject, + pub data: PyUnicodeObject__bindgen_ty_1, +} +#[repr(C)] +#[derive(Copy, Clone)] +pub union PyUnicodeObject__bindgen_ty_1 { + pub any: *mut ::std::os::raw::c_void, + pub latin1: *mut Py_UCS1, + pub ucs2: *mut Py_UCS2, + pub ucs4: *mut Py_UCS4, +} +impl Default for PyUnicodeObject__bindgen_ty_1 { + fn default() -> Self { + let mut s = ::std::mem::MaybeUninit::::uninit(); + unsafe { + ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1); + s.assume_init() + } + } +} +impl Default for PyUnicodeObject { + fn default() -> Self { + let mut s = ::std::mem::MaybeUninit::::uninit(); + unsafe { + ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1); + s.assume_init() + } + } +} +pub type PyLongObject = _longobject; +pub type digit = u32; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct _longobject { + pub ob_base: PyVarObject, + pub ob_digit: [digit; 1usize], +} +impl Default for _longobject { + fn default() -> Self { + let mut s = ::std::mem::MaybeUninit::::uninit(); + unsafe { + ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1); + s.assume_init() + } + } +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct PyFloatObject { + pub ob_base: PyObject, + pub ob_fval: f64, +} +impl Default for PyFloatObject { + fn default() -> Self { + let mut s = ::std::mem::MaybeUninit::::uninit(); + unsafe { + ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1); + s.assume_init() + } + } +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct PyTupleObject { + pub ob_base: PyVarObject, + pub ob_item: [*mut PyObject; 1usize], +} +impl Default for PyTupleObject { + fn default() -> Self { + let mut s = ::std::mem::MaybeUninit::::uninit(); + unsafe { + ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1); + s.assume_init() + } + } +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct PyListObject { + pub ob_base: PyVarObject, + pub ob_item: *mut *mut PyObject, + pub allocated: Py_ssize_t, +} +impl Default for PyListObject { + fn default() -> Self { + let mut s = ::std::mem::MaybeUninit::::uninit(); + unsafe { + ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1); + s.assume_init() + } + } +} +pub type PyDictKeysObject = _dictkeysobject; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct PyDictObject { + pub ob_base: PyObject, + pub ma_used: Py_ssize_t, + pub ma_version_tag: u64, + pub ma_keys: *mut PyDictKeysObject, + pub ma_values: *mut *mut PyObject, +} +impl Default for PyDictObject { + fn default() -> Self { + let mut s = ::std::mem::MaybeUninit::::uninit(); + unsafe { + ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1); + s.assume_init() + } + } +} +pub type PyCFunction = ::std::option::Option< + unsafe extern "C" fn(arg1: *mut PyObject, arg2: *mut PyObject) -> *mut PyObject, +>; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct PyMethodDef { + pub ml_name: *const ::std::os::raw::c_char, + pub ml_meth: PyCFunction, + pub ml_flags: ::std::os::raw::c_int, + pub ml_doc: *const ::std::os::raw::c_char, +} +impl Default for PyMethodDef { + fn default() -> Self { + let mut s = ::std::mem::MaybeUninit::::uninit(); + unsafe { + ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1); + s.assume_init() + } + } +} +pub type Py_OpenCodeHookFunction = ::std::option::Option< + unsafe extern "C" fn(arg1: *mut PyObject, arg2: *mut ::std::os::raw::c_void) -> *mut PyObject, +>; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct _PyOpcache { + _unused: [u8; 0], +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct PyCodeObject { + pub ob_base: PyObject, + pub co_argcount: ::std::os::raw::c_int, + pub co_posonlyargcount: ::std::os::raw::c_int, + pub co_kwonlyargcount: ::std::os::raw::c_int, + pub co_nlocals: ::std::os::raw::c_int, + pub co_stacksize: ::std::os::raw::c_int, + pub co_flags: ::std::os::raw::c_int, + pub co_firstlineno: ::std::os::raw::c_int, + pub co_code: *mut PyObject, + pub co_consts: *mut PyObject, + pub co_names: *mut PyObject, + pub co_varnames: *mut PyObject, + pub co_freevars: *mut PyObject, + pub co_cellvars: *mut PyObject, + pub co_cell2arg: *mut Py_ssize_t, + pub co_filename: *mut PyObject, + pub co_name: *mut PyObject, + pub co_lnotab: *mut PyObject, + pub co_zombieframe: *mut ::std::os::raw::c_void, + pub co_weakreflist: *mut PyObject, + pub co_extra: *mut ::std::os::raw::c_void, + pub co_opcache_map: *mut ::std::os::raw::c_uchar, + pub co_opcache: *mut _PyOpcache, + pub co_opcache_flag: ::std::os::raw::c_int, + pub co_opcache_size: ::std::os::raw::c_uchar, +} +impl Default for PyCodeObject { + fn default() -> Self { + let mut s = ::std::mem::MaybeUninit::::uninit(); + unsafe { + ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1); + s.assume_init() + } + } +} +pub type PyFrameObject = _frame; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct PyWideStringList { + pub length: Py_ssize_t, + pub items: *mut *mut wchar_t, +} +impl Default for PyWideStringList { + fn default() -> Self { + let mut s = ::std::mem::MaybeUninit::::uninit(); + unsafe { + ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1); + s.assume_init() + } + } +} +#[repr(C)] +#[derive(Debug, Default, Copy, Clone)] +pub struct PyPreConfig { + pub _config_init: ::std::os::raw::c_int, + pub parse_argv: ::std::os::raw::c_int, + pub isolated: ::std::os::raw::c_int, + pub use_environment: ::std::os::raw::c_int, + pub configure_locale: ::std::os::raw::c_int, + pub coerce_c_locale: ::std::os::raw::c_int, + pub coerce_c_locale_warn: ::std::os::raw::c_int, + pub utf8_mode: ::std::os::raw::c_int, + pub dev_mode: ::std::os::raw::c_int, + pub allocator: ::std::os::raw::c_int, +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct PyConfig { + pub _config_init: ::std::os::raw::c_int, + pub isolated: ::std::os::raw::c_int, + pub use_environment: ::std::os::raw::c_int, + pub dev_mode: ::std::os::raw::c_int, + pub install_signal_handlers: ::std::os::raw::c_int, + pub use_hash_seed: ::std::os::raw::c_int, + pub hash_seed: ::std::os::raw::c_ulong, + pub faulthandler: ::std::os::raw::c_int, + pub _use_peg_parser: ::std::os::raw::c_int, + pub tracemalloc: ::std::os::raw::c_int, + pub import_time: ::std::os::raw::c_int, + pub show_ref_count: ::std::os::raw::c_int, + pub dump_refs: ::std::os::raw::c_int, + pub malloc_stats: ::std::os::raw::c_int, + pub filesystem_encoding: *mut wchar_t, + pub filesystem_errors: *mut wchar_t, + pub pycache_prefix: *mut wchar_t, + pub parse_argv: ::std::os::raw::c_int, + pub argv: PyWideStringList, + pub program_name: *mut wchar_t, + pub xoptions: PyWideStringList, + pub warnoptions: PyWideStringList, + pub site_import: ::std::os::raw::c_int, + pub bytes_warning: ::std::os::raw::c_int, + pub inspect: ::std::os::raw::c_int, + pub interactive: ::std::os::raw::c_int, + pub optimization_level: ::std::os::raw::c_int, + pub parser_debug: ::std::os::raw::c_int, + pub write_bytecode: ::std::os::raw::c_int, + pub verbose: ::std::os::raw::c_int, + pub quiet: ::std::os::raw::c_int, + pub user_site_directory: ::std::os::raw::c_int, + pub configure_c_stdio: ::std::os::raw::c_int, + pub buffered_stdio: ::std::os::raw::c_int, + pub stdio_encoding: *mut wchar_t, + pub stdio_errors: *mut wchar_t, + pub check_hash_pycs_mode: *mut wchar_t, + pub pathconfig_warnings: ::std::os::raw::c_int, + pub pythonpath_env: *mut wchar_t, + pub home: *mut wchar_t, + pub module_search_paths_set: ::std::os::raw::c_int, + pub module_search_paths: PyWideStringList, + pub executable: *mut wchar_t, + pub base_executable: *mut wchar_t, + pub prefix: *mut wchar_t, + pub base_prefix: *mut wchar_t, + pub exec_prefix: *mut wchar_t, + pub base_exec_prefix: *mut wchar_t, + pub platlibdir: *mut wchar_t, + pub skip_source_first_line: ::std::os::raw::c_int, + pub run_command: *mut wchar_t, + pub run_module: *mut wchar_t, + pub run_filename: *mut wchar_t, + pub _install_importlib: ::std::os::raw::c_int, + pub _init_main: ::std::os::raw::c_int, + pub _isolated_interpreter: ::std::os::raw::c_int, + pub _orig_argv: PyWideStringList, +} +impl Default for PyConfig { + fn default() -> Self { + let mut s = ::std::mem::MaybeUninit::::uninit(); + unsafe { + ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1); + s.assume_init() + } + } +} +pub type PyThreadState = _ts; +pub type PyInterpreterState = _is; +pub type Py_tracefunc = ::std::option::Option< + unsafe extern "C" fn( + arg1: *mut PyObject, + arg2: *mut PyFrameObject, + arg3: ::std::os::raw::c_int, + arg4: *mut PyObject, + ) -> ::std::os::raw::c_int, +>; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct _err_stackitem { + pub exc_type: *mut PyObject, + pub exc_value: *mut PyObject, + pub exc_traceback: *mut PyObject, + pub previous_item: *mut _err_stackitem, +} +impl Default for _err_stackitem { + fn default() -> Self { + let mut s = ::std::mem::MaybeUninit::::uninit(); + unsafe { + ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1); + s.assume_init() + } + } +} +pub type _PyErr_StackItem = _err_stackitem; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct _ts { + pub prev: *mut _ts, + pub next: *mut _ts, + pub interp: *mut PyInterpreterState, + pub frame: *mut PyFrameObject, + pub recursion_depth: ::std::os::raw::c_int, + pub overflowed: ::std::os::raw::c_char, + pub recursion_critical: ::std::os::raw::c_char, + pub stackcheck_counter: ::std::os::raw::c_int, + pub tracing: ::std::os::raw::c_int, + pub use_tracing: ::std::os::raw::c_int, + pub c_profilefunc: Py_tracefunc, + pub c_tracefunc: Py_tracefunc, + pub c_profileobj: *mut PyObject, + pub c_traceobj: *mut PyObject, + pub curexc_type: *mut PyObject, + pub curexc_value: *mut PyObject, + pub curexc_traceback: *mut PyObject, + pub exc_state: _PyErr_StackItem, + pub exc_info: *mut _PyErr_StackItem, + pub dict: *mut PyObject, + pub gilstate_counter: ::std::os::raw::c_int, + pub async_exc: *mut PyObject, + pub thread_id: ::std::os::raw::c_ulong, + pub trash_delete_nesting: ::std::os::raw::c_int, + pub trash_delete_later: *mut PyObject, + pub on_delete: ::std::option::Option, + pub on_delete_data: *mut ::std::os::raw::c_void, + pub coroutine_origin_tracking_depth: ::std::os::raw::c_int, + pub async_gen_firstiter: *mut PyObject, + pub async_gen_finalizer: *mut PyObject, + pub context: *mut PyObject, + pub context_ver: u64, + pub id: u64, +} +impl Default for _ts { + fn default() -> Self { + let mut s = ::std::mem::MaybeUninit::::uninit(); + unsafe { + ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1); + s.assume_init() + } + } +} +pub type _PyFrameEvalFunction = ::std::option::Option< + unsafe extern "C" fn( + tstate: *mut PyThreadState, + arg1: *mut PyFrameObject, + arg2: ::std::os::raw::c_int, + ) -> *mut PyObject, +>; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct _xid { + pub data: *mut ::std::os::raw::c_void, + pub obj: *mut PyObject, + pub interp: i64, + pub new_object: ::std::option::Option *mut PyObject>, + pub free: ::std::option::Option, +} +impl Default for _xid { + fn default() -> Self { + let mut s = ::std::mem::MaybeUninit::::uninit(); + unsafe { + ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1); + s.assume_init() + } + } +} +pub type crossinterpdatafunc = ::std::option::Option< + unsafe extern "C" fn(arg1: *mut PyObject, arg2: *mut _xid) -> ::std::os::raw::c_int, +>; +pub type getter = ::std::option::Option< + unsafe extern "C" fn(arg1: *mut PyObject, arg2: *mut ::std::os::raw::c_void) -> *mut PyObject, +>; +pub type setter = ::std::option::Option< + unsafe extern "C" fn( + arg1: *mut PyObject, + arg2: *mut PyObject, + arg3: *mut ::std::os::raw::c_void, + ) -> ::std::os::raw::c_int, +>; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct PyGetSetDef { + pub name: *const ::std::os::raw::c_char, + pub get: getter, + pub set: setter, + pub doc: *const ::std::os::raw::c_char, + pub closure: *mut ::std::os::raw::c_void, +} +impl Default for PyGetSetDef { + fn default() -> Self { + let mut s = ::std::mem::MaybeUninit::::uninit(); + unsafe { + ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1); + s.assume_init() + } + } +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct PyMemberDef { + _unused: [u8; 0], +} +pub type PyThread_type_lock = *mut ::std::os::raw::c_void; +pub type Py_tss_t = _Py_tss_t; +pub type pthread_cond_t = __darwin_pthread_cond_t; +pub type pthread_key_t = __darwin_pthread_key_t; +pub type pthread_mutex_t = __darwin_pthread_mutex_t; +#[repr(C)] +#[derive(Debug, Default, Copy, Clone)] +pub struct _Py_tss_t { + pub _is_initialized: ::std::os::raw::c_int, + pub _key: pthread_key_t, +} +pub type Py_AuditHookFunction = ::std::option::Option< + unsafe extern "C" fn( + arg1: *const ::std::os::raw::c_char, + arg2: *mut PyObject, + arg3: *mut ::std::os::raw::c_void, + ) -> ::std::os::raw::c_int, +>; +pub const _Py_error_handler__Py_ERROR_UNKNOWN: _Py_error_handler = 0; +pub const _Py_error_handler__Py_ERROR_STRICT: _Py_error_handler = 1; +pub const _Py_error_handler__Py_ERROR_SURROGATEESCAPE: _Py_error_handler = 2; +pub const _Py_error_handler__Py_ERROR_REPLACE: _Py_error_handler = 3; +pub const _Py_error_handler__Py_ERROR_IGNORE: _Py_error_handler = 4; +pub const _Py_error_handler__Py_ERROR_BACKSLASHREPLACE: _Py_error_handler = 5; +pub const _Py_error_handler__Py_ERROR_SURROGATEPASS: _Py_error_handler = 6; +pub const _Py_error_handler__Py_ERROR_XMLCHARREFREPLACE: _Py_error_handler = 7; +pub const _Py_error_handler__Py_ERROR_OTHER: _Py_error_handler = 8; +pub type _Py_error_handler = ::std::os::raw::c_uint; +#[repr(C)] +#[derive(Debug, Default, Copy, Clone)] +pub struct PyTryBlock { + pub b_type: ::std::os::raw::c_int, + pub b_handler: ::std::os::raw::c_int, + pub b_level: ::std::os::raw::c_int, +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct _frame { + pub ob_base: PyVarObject, + pub f_back: *mut _frame, + pub f_code: *mut PyCodeObject, + pub f_builtins: *mut PyObject, + pub f_globals: *mut PyObject, + pub f_locals: *mut PyObject, + pub f_valuestack: *mut *mut PyObject, + pub f_stacktop: *mut *mut PyObject, + pub f_trace: *mut PyObject, + pub f_trace_lines: ::std::os::raw::c_char, + pub f_trace_opcodes: ::std::os::raw::c_char, + pub f_gen: *mut PyObject, + pub f_lasti: ::std::os::raw::c_int, + pub f_lineno: ::std::os::raw::c_int, + pub f_iblock: ::std::os::raw::c_int, + pub f_executing: ::std::os::raw::c_char, + pub f_blockstack: [PyTryBlock; 20usize], + pub f_localsplus: [*mut PyObject; 1usize], +} +impl Default for _frame { + fn default() -> Self { + let mut s = ::std::mem::MaybeUninit::::uninit(); + unsafe { + ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1); + s.assume_init() + } + } +} +pub type atomic_int = u32; +pub type atomic_uintptr_t = u64; +#[repr(C)] +#[derive(Debug, Default, Copy, Clone)] +pub struct _Py_atomic_address { + pub _value: atomic_uintptr_t, +} +#[repr(C)] +#[derive(Debug, Default, Copy, Clone)] +pub struct _Py_atomic_int { + pub _value: atomic_int, +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct _gil_runtime_state { + pub interval: ::std::os::raw::c_ulong, + pub last_holder: _Py_atomic_address, + pub locked: _Py_atomic_int, + pub switch_number: ::std::os::raw::c_ulong, + pub cond: pthread_cond_t, + pub mutex: pthread_mutex_t, + pub switch_cond: pthread_cond_t, + pub switch_mutex: pthread_mutex_t, +} +impl Default for _gil_runtime_state { + fn default() -> Self { + let mut s = ::std::mem::MaybeUninit::::uninit(); + unsafe { + ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1); + s.assume_init() + } + } +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct _ceval_runtime_state { + pub signals_pending: _Py_atomic_int, + pub gil: _gil_runtime_state, +} +impl Default for _ceval_runtime_state { + fn default() -> Self { + let mut s = ::std::mem::MaybeUninit::::uninit(); + unsafe { + ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1); + s.assume_init() + } + } +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct _gilstate_runtime_state { + pub check_enabled: ::std::os::raw::c_int, + pub tstate_current: _Py_atomic_address, + pub autoInterpreterState: *mut PyInterpreterState, + pub autoTSSkey: Py_tss_t, +} +impl Default for _gilstate_runtime_state { + fn default() -> Self { + let mut s = ::std::mem::MaybeUninit::::uninit(); + unsafe { + ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1); + s.assume_init() + } + } +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct _Py_AuditHookEntry { + pub next: *mut _Py_AuditHookEntry, + pub hookCFunction: Py_AuditHookFunction, + pub userData: *mut ::std::os::raw::c_void, +} +impl Default for _Py_AuditHookEntry { + fn default() -> Self { + let mut s = ::std::mem::MaybeUninit::::uninit(); + unsafe { + ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1); + s.assume_init() + } + } +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct pyruntimestate { + pub preinitializing: ::std::os::raw::c_int, + pub preinitialized: ::std::os::raw::c_int, + pub core_initialized: ::std::os::raw::c_int, + pub initialized: ::std::os::raw::c_int, + pub _finalizing: _Py_atomic_address, + pub interpreters: pyruntimestate_pyinterpreters, + pub xidregistry: pyruntimestate__xidregistry, + pub main_thread: ::std::os::raw::c_ulong, + pub exitfuncs: [::std::option::Option; 32usize], + pub nexitfuncs: ::std::os::raw::c_int, + pub ceval: _ceval_runtime_state, + pub gilstate: _gilstate_runtime_state, + pub preconfig: PyPreConfig, + pub open_code_hook: Py_OpenCodeHookFunction, + pub open_code_userdata: *mut ::std::os::raw::c_void, + pub audit_hook_head: *mut _Py_AuditHookEntry, +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct pyruntimestate_pyinterpreters { + pub mutex: PyThread_type_lock, + pub head: *mut PyInterpreterState, + pub main: *mut PyInterpreterState, + pub next_id: i64, +} +impl Default for pyruntimestate_pyinterpreters { + fn default() -> Self { + let mut s = ::std::mem::MaybeUninit::::uninit(); + unsafe { + ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1); + s.assume_init() + } + } +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct pyruntimestate__xidregistry { + pub mutex: PyThread_type_lock, + pub head: *mut _xidregitem, +} +impl Default for pyruntimestate__xidregistry { + fn default() -> Self { + let mut s = ::std::mem::MaybeUninit::::uninit(); + unsafe { + ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1); + s.assume_init() + } + } +} +impl Default for pyruntimestate { + fn default() -> Self { + let mut s = ::std::mem::MaybeUninit::::uninit(); + unsafe { + ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1); + s.assume_init() + } + } +} +#[repr(C)] +#[derive(Debug, Default, Copy, Clone)] +pub struct PyGC_Head { + pub _gc_next: usize, + pub _gc_prev: usize, +} +#[repr(C)] +#[derive(Debug, Default, Copy, Clone)] +pub struct gc_generation { + pub head: PyGC_Head, + pub threshold: ::std::os::raw::c_int, + pub count: ::std::os::raw::c_int, +} +#[repr(C)] +#[derive(Debug, Default, Copy, Clone)] +pub struct gc_generation_stats { + pub collections: Py_ssize_t, + pub collected: Py_ssize_t, + pub uncollectable: Py_ssize_t, +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct _gc_runtime_state { + pub trash_delete_later: *mut PyObject, + pub trash_delete_nesting: ::std::os::raw::c_int, + pub enabled: ::std::os::raw::c_int, + pub debug: ::std::os::raw::c_int, + pub generations: [gc_generation; 3usize], + pub generation0: *mut PyGC_Head, + pub permanent_generation: gc_generation, + pub generation_stats: [gc_generation_stats; 3usize], + pub collecting: ::std::os::raw::c_int, + pub garbage: *mut PyObject, + pub callbacks: *mut PyObject, + pub long_lived_total: Py_ssize_t, + pub long_lived_pending: Py_ssize_t, +} +impl Default for _gc_runtime_state { + fn default() -> Self { + let mut s = ::std::mem::MaybeUninit::::uninit(); + unsafe { + ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1); + s.assume_init() + } + } +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct _warnings_runtime_state { + pub filters: *mut PyObject, + pub once_registry: *mut PyObject, + pub default_action: *mut PyObject, + pub filters_version: ::std::os::raw::c_long, +} +impl Default for _warnings_runtime_state { + fn default() -> Self { + let mut s = ::std::mem::MaybeUninit::::uninit(); + unsafe { + ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1); + s.assume_init() + } + } +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct _pending_calls { + pub lock: PyThread_type_lock, + pub calls_to_do: _Py_atomic_int, + pub async_exc: ::std::os::raw::c_int, + pub calls: [_pending_calls__bindgen_ty_1; 32usize], + pub first: ::std::os::raw::c_int, + pub last: ::std::os::raw::c_int, +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct _pending_calls__bindgen_ty_1 { + pub func: ::std::option::Option< + unsafe extern "C" fn(arg1: *mut ::std::os::raw::c_void) -> ::std::os::raw::c_int, + >, + pub arg: *mut ::std::os::raw::c_void, +} +impl Default for _pending_calls__bindgen_ty_1 { + fn default() -> Self { + let mut s = ::std::mem::MaybeUninit::::uninit(); + unsafe { + ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1); + s.assume_init() + } + } +} +impl Default for _pending_calls { + fn default() -> Self { + let mut s = ::std::mem::MaybeUninit::::uninit(); + unsafe { + ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1); + s.assume_init() + } + } +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct _ceval_state { + pub recursion_limit: ::std::os::raw::c_int, + pub tracing_possible: ::std::os::raw::c_int, + pub eval_breaker: _Py_atomic_int, + pub gil_drop_request: _Py_atomic_int, + pub pending: _pending_calls, +} +impl Default for _ceval_state { + fn default() -> Self { + let mut s = ::std::mem::MaybeUninit::::uninit(); + unsafe { + ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1); + s.assume_init() + } + } +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct _Py_unicode_fs_codec { + pub encoding: *mut ::std::os::raw::c_char, + pub utf8: ::std::os::raw::c_int, + pub errors: *mut ::std::os::raw::c_char, + pub error_handler: _Py_error_handler, +} +impl Default for _Py_unicode_fs_codec { + fn default() -> Self { + let mut s = ::std::mem::MaybeUninit::::uninit(); + unsafe { + ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1); + s.assume_init() + } + } +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct _Py_unicode_state { + pub fs_codec: _Py_unicode_fs_codec, +} +impl Default for _Py_unicode_state { + fn default() -> Self { + let mut s = ::std::mem::MaybeUninit::::uninit(); + unsafe { + ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1); + s.assume_init() + } + } +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct _is { + pub next: *mut _is, + pub tstate_head: *mut _ts, + pub runtime: *mut pyruntimestate, + pub id: i64, + pub id_refcount: i64, + pub requires_idref: ::std::os::raw::c_int, + pub id_mutex: PyThread_type_lock, + pub finalizing: ::std::os::raw::c_int, + pub ceval: _ceval_state, + pub gc: _gc_runtime_state, + pub modules: *mut PyObject, + pub modules_by_index: *mut PyObject, + pub sysdict: *mut PyObject, + pub builtins: *mut PyObject, + pub importlib: *mut PyObject, + pub num_threads: ::std::os::raw::c_long, + pub pythread_stacksize: usize, + pub codec_search_path: *mut PyObject, + pub codec_search_cache: *mut PyObject, + pub codec_error_registry: *mut PyObject, + pub codecs_initialized: ::std::os::raw::c_int, + pub unicode: _Py_unicode_state, + pub config: PyConfig, + pub dlopenflags: ::std::os::raw::c_int, + pub dict: *mut PyObject, + pub builtins_copy: *mut PyObject, + pub import_func: *mut PyObject, + pub eval_frame: _PyFrameEvalFunction, + pub co_extra_user_count: Py_ssize_t, + pub co_extra_freefuncs: [freefunc; 255usize], + pub before_forkers: *mut PyObject, + pub after_forkers_parent: *mut PyObject, + pub after_forkers_child: *mut PyObject, + pub pyexitfunc: ::std::option::Option, + pub pyexitmodule: *mut PyObject, + pub tstate_next_unique_id: u64, + pub warnings: _warnings_runtime_state, + pub audit_hooks: *mut PyObject, + pub parser: _is__bindgen_ty_1, + pub small_ints: [*mut PyLongObject; 262usize], + pub int_max_str_digits: ::std::os::raw::c_int, +} +#[repr(C)] +#[derive(Debug, Default, Copy, Clone)] +pub struct _is__bindgen_ty_1 { + pub listnode: _is__bindgen_ty_1__bindgen_ty_1, +} +#[repr(C)] +#[derive(Debug, Default, Copy, Clone)] +pub struct _is__bindgen_ty_1__bindgen_ty_1 { + pub level: ::std::os::raw::c_int, + pub atbol: ::std::os::raw::c_int, +} +impl Default for _is { + fn default() -> Self { + let mut s = ::std::mem::MaybeUninit::::uninit(); + unsafe { + ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1); + s.assume_init() + } + } +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct _xidregitem { + pub cls: *mut PyTypeObject, + pub getdata: crossinterpdatafunc, + pub next: *mut _xidregitem, +} +impl Default for _xidregitem { + fn default() -> Self { + let mut s = ::std::mem::MaybeUninit::::uninit(); + unsafe { + ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1); + s.assume_init() + } + } +} +#[repr(C)] +#[derive(Debug, Default, Copy, Clone)] +pub struct _dictkeysobject { + pub _address: u8, +} diff --git a/src/python_data_access.rs b/src/python_data_access.rs index 08428fc0..cf30303a 100644 --- a/src/python_data_access.rs +++ b/src/python_data_access.rs @@ -63,7 +63,7 @@ pub fn copy_long(process: &P, addr: usize) -> Result<(i64, boo // this is PyLongObject for a specific version of python, but this works since it's binary compatible // layout across versions we're targeting let value = - process.copy_pointer(addr as *const crate::python_bindings::v3_7_0::PyLongObject)?; + process.copy_pointer(addr as *const crate::python_bindings::v3_7_15::PyLongObject)?; let negative: i64 = if value.ob_base.ob_size < 0 { -1 } else { 1 }; let size = value.ob_base.ob_size * (negative as isize); match size { @@ -172,7 +172,7 @@ impl<'a, P: ProcessMemory> DictIterator<'a, P> { }) } _ => { - let dict: crate::python_bindings::v3_7_0::PyDictObject = + let dict: crate::python_bindings::v3_7_15::PyDictObject = process.copy_struct(addr)?; // Getting this going generically is tricky: there is a lot of variation on how dictionaries are handled // instead this just focuses on a single version, which works for python @@ -216,11 +216,11 @@ impl<'a, P: ProcessMemory> Iterator for DictIterator<'a, P> { let entry = match self.kind { 0 => { let addr = index - * std::mem::size_of::() + * std::mem::size_of::() + self.entries_addr; let ret = self .process - .copy_struct::(addr); + .copy_struct::(addr); ret.map(|entry| (entry.me_key as usize, entry.me_value as usize)) } _ => { @@ -245,7 +245,7 @@ impl<'a, P: ProcessMemory> Iterator for DictIterator<'a, P> { let value = if self.values != 0 { let valueaddr = self.values + index - * std::mem::size_of::<*mut crate::python_bindings::v3_7_0::PyObject>( + * std::mem::size_of::<*mut crate::python_bindings::v3_7_15::PyObject>( ); match self.process.copy_struct(valueaddr) { Ok(addr) => addr, @@ -394,7 +394,7 @@ where format!("({})", values.join(", ")) } else if value_type_name == "float" { let value = - process.copy_pointer(addr as *const crate::python_bindings::v3_7_0::PyFloatObject)?; + process.copy_pointer(addr as *const crate::python_bindings::v3_7_15::PyFloatObject)?; format!("{}", value.ob_fval) } else if value_type_name == "NoneType" { "None".to_owned() @@ -410,7 +410,7 @@ pub mod tests { // the idea here is to create various cpython interpretator structs locally // and then test out that the above code handles appropriately use super::*; - use crate::python_bindings::v3_7_0::{ + use crate::python_bindings::v3_7_15::{ PyASCIIObject, PyBytesObject, PyUnicodeObject, PyVarObject, }; use remoteprocess::LocalProcess; @@ -478,7 +478,7 @@ pub mod tests { #[test] fn test_copy_string() { let original = "function_name"; - let obj = to_asciiobject(original); + let obj: AllocatedPyASCIIObject = to_asciiobject(original); let unicode: &PyUnicodeObject = unsafe { std::mem::transmute(&obj.base) }; let copied = copy_string(unicode, &LocalProcess).unwrap(); diff --git a/src/python_interpreters.rs b/src/python_interpreters.rs index 111a2eed..3b3c2bc9 100644 --- a/src/python_interpreters.rs +++ b/src/python_interpreters.rs @@ -10,7 +10,7 @@ This means we can't dereference them directly. // these bindings are automatically generated by rust bindgen // using the generate_bindings.py script use crate::python_bindings::{ - v2_7_15, v3_10_0, v3_11_0, v3_3_7, v3_5_5, v3_6_6, v3_7_0, v3_8_0, v3_9_5, + v2_7_15, v3_10_9, v3_11_0, v3_3_7, v3_5_5, v3_6_15, v3_7_15, v3_8_15, v3_9_15, }; use std; @@ -477,13 +477,13 @@ impl CodeObject for v3_11_0::PyCodeObject { } // Python 3.10 -Python3Impl!(v3_10_0); -PythonCommonImpl!(v3_10_0, PyUnicodeObject); +Python3Impl!(v3_10_9); +PythonCommonImpl!(v3_10_9, PyUnicodeObject); -impl CodeObject for v3_10_0::PyCodeObject { - type BytesObject = v3_10_0::PyBytesObject; - type StringObject = v3_10_0::PyUnicodeObject; - type TupleObject = v3_10_0::PyTupleObject; +impl CodeObject for v3_10_9::PyCodeObject { + type BytesObject = v3_10_9::PyBytesObject; + type StringObject = v3_10_9::PyUnicodeObject; + type TupleObject = v3_10_9::PyTupleObject; fn name(&self) -> *mut Self::StringObject { self.co_name as *mut Self::StringObject @@ -540,24 +540,24 @@ impl CodeObject for v3_10_0::PyCodeObject { } // Python 3.9 -PythonCommonImpl!(v3_9_5, PyUnicodeObject); -PythonCodeObjectImpl!(v3_9_5, PyBytesObject, PyUnicodeObject); -Python3Impl!(v3_9_5); +PythonCommonImpl!(v3_9_15, PyUnicodeObject); +PythonCodeObjectImpl!(v3_9_15, PyBytesObject, PyUnicodeObject); +Python3Impl!(v3_9_15); // Python 3.8 -PythonCommonImpl!(v3_8_0, PyUnicodeObject); -PythonCodeObjectImpl!(v3_8_0, PyBytesObject, PyUnicodeObject); -Python3Impl!(v3_8_0); +PythonCommonImpl!(v3_8_15, PyUnicodeObject); +PythonCodeObjectImpl!(v3_8_15, PyBytesObject, PyUnicodeObject); +Python3Impl!(v3_8_15); // Python 3.7 -PythonCommonImpl!(v3_7_0, PyUnicodeObject); -PythonCodeObjectImpl!(v3_7_0, PyBytesObject, PyUnicodeObject); -Python3Impl!(v3_7_0); +PythonCommonImpl!(v3_7_15, PyUnicodeObject); +PythonCodeObjectImpl!(v3_7_15, PyBytesObject, PyUnicodeObject); +Python3Impl!(v3_7_15); // Python 3.6 -PythonCommonImpl!(v3_6_6, PyUnicodeObject); -PythonCodeObjectImpl!(v3_6_6, PyBytesObject, PyUnicodeObject); -Python3Impl!(v3_6_6); +PythonCommonImpl!(v3_6_15, PyUnicodeObject); +PythonCodeObjectImpl!(v3_6_15, PyBytesObject, PyUnicodeObject); +Python3Impl!(v3_6_15); // python 3.5 and python 3.4 PythonCommonImpl!(v3_5_5, PyUnicodeObject); diff --git a/src/python_process_info.rs b/src/python_process_info.rs index 11b217d8..179cdab7 100644 --- a/src/python_process_info.rs +++ b/src/python_process_info.rs @@ -11,12 +11,15 @@ use std::slice; use anyhow::{Context, Error, Result}; use lazy_static::lazy_static; use proc_maps::{get_process_maps, MapRange}; -use remoteprocess::{Pid, ProcessMemory}; +use remoteprocess::ProcessMemory; + +#[cfg(not(target_os = "macos"))] +use remoteprocess::Pid; use crate::binary_parser::{parse_binary, BinaryInfo}; use crate::config::Config; use crate::python_bindings::{ - pyruntime, v2_7_15, v3_10_0, v3_11_0, v3_3_7, v3_5_5, v3_6_6, v3_7_0, v3_8_0, v3_9_5, + pyruntime, v2_7_15, v3_10_9, v3_11_0, v3_3_7, v3_5_5, v3_6_15, v3_7_15, v3_8_15, v3_9_15, }; use crate::python_interpreters::{InterpreterState, ThreadState}; use crate::stack_trace::get_stack_traces; @@ -492,30 +495,30 @@ where } => check::(addrs, maps, process), Version { major: 3, minor: 6, .. - } => check::(addrs, maps, process), + } => check::(addrs, maps, process), Version { major: 3, minor: 7, .. - } => check::(addrs, maps, process), + } => check::(addrs, maps, process), Version { major: 3, minor: 8, patch: 0, .. } => match version.release_flags.as_ref() { - "a1" | "a2" | "a3" => check::(addrs, maps, process), - _ => check::(addrs, maps, process), + "a1" | "a2" | "a3" => check::(addrs, maps, process), + _ => check::(addrs, maps, process), }, Version { major: 3, minor: 8, .. - } => check::(addrs, maps, process), + } => check::(addrs, maps, process), Version { major: 3, minor: 9, .. - } => check::(addrs, maps, process), + } => check::(addrs, maps, process), Version { major: 3, minor: 10, .. - } => check::(addrs, maps, process), + } => check::(addrs, maps, process), Version { major: 3, minor: 11, diff --git a/src/python_spy.rs b/src/python_spy.rs index 51c8c471..88671a50 100644 --- a/src/python_spy.rs +++ b/src/python_spy.rs @@ -1,5 +1,4 @@ #[cfg(windows)] -use regex::RegexBuilder; use std; use std::collections::HashMap; #[cfg(all(target_os = "linux", unwind))] @@ -15,7 +14,7 @@ use crate::config::{Config, LockingStrategy}; #[cfg(unwind)] use crate::native_stack_trace::NativeStack; use crate::python_bindings::{ - v2_7_15, v3_10_0, v3_11_0, v3_3_7, v3_5_5, v3_6_6, v3_7_0, v3_8_0, v3_9_5, + v2_7_15, v3_10_9, v3_11_0, v3_3_7, v3_5_5, v3_6_15, v3_7_15, v3_8_15, v3_9_15, }; use crate::python_data_access::format_variable; use crate::python_interpreters::{InterpreterState, ThreadState}; @@ -149,10 +148,10 @@ impl PythonSpy { } => self._get_stack_traces::(), Version { major: 3, minor: 6, .. - } => self._get_stack_traces::(), + } => self._get_stack_traces::(), Version { major: 3, minor: 7, .. - } => self._get_stack_traces::(), + } => self._get_stack_traces::(), // v3.8.0a1 to v3.8.0a3 is compatible with 3.7 ABI, but later versions of 3.8.0 aren't Version { major: 3, @@ -160,20 +159,20 @@ impl PythonSpy { patch: 0, .. } => match self.version.release_flags.as_ref() { - "a1" | "a2" | "a3" => self._get_stack_traces::(), - _ => self._get_stack_traces::(), + "a1" | "a2" | "a3" => self._get_stack_traces::(), + _ => self._get_stack_traces::(), }, Version { major: 3, minor: 8, .. - } => self._get_stack_traces::(), + } => self._get_stack_traces::(), Version { major: 3, minor: 9, .. - } => self._get_stack_traces::(), + } => self._get_stack_traces::(), Version { major: 3, minor: 10, .. - } => self._get_stack_traces::(), + } => self._get_stack_traces::(), Version { major: 3, minor: 11, diff --git a/src/python_threading.rs b/src/python_threading.rs index ea5ed89b..1cfcc0b2 100644 --- a/src/python_threading.rs +++ b/src/python_threading.rs @@ -2,7 +2,7 @@ use std::collections::HashMap; use anyhow::Error; -use crate::python_bindings::{v3_10_0, v3_11_0, v3_6_6, v3_7_0, v3_8_0, v3_9_5}; +use crate::python_bindings::{v3_10_9, v3_11_0, v3_6_15, v3_7_15, v3_8_15, v3_9_15}; use crate::python_data_access::{copy_long, copy_string, DictIterator, PY_TPFLAGS_MANAGED_DICT}; use crate::python_interpreters::{InterpreterState, Object, TypeObject}; use crate::python_spy::PythonSpy; @@ -93,21 +93,21 @@ pub fn thread_name_lookup(process: &PythonSpy) -> Option> { let err = match process.version { Version { major: 3, minor: 6, .. - } => _thread_name_lookup::(&process), + } => _thread_name_lookup::(&process), Version { major: 3, minor: 7, .. - } => _thread_name_lookup::(&process), + } => _thread_name_lookup::(&process), Version { major: 3, minor: 8, .. - } => _thread_name_lookup::(&process), + } => _thread_name_lookup::(&process), Version { major: 3, minor: 9, .. - } => _thread_name_lookup::(&process), + } => _thread_name_lookup::(&process), Version { major: 3, minor: 10, .. - } => _thread_name_lookup::(&process), + } => _thread_name_lookup::(&process), Version { major: 3, minor: 11, diff --git a/src/stack_trace.rs b/src/stack_trace.rs index 213a6131..2c31ec59 100644 --- a/src/stack_trace.rs +++ b/src/stack_trace.rs @@ -286,7 +286,7 @@ impl ProcessInfo { #[cfg(test)] mod tests { use super::*; - use crate::python_bindings::v3_7_0::PyCodeObject; + use crate::python_bindings::v3_7_15::PyCodeObject; use crate::python_data_access::tests::to_byteobject; use remoteprocess::LocalProcess;