The field orderings have completely changed in 3.11, so we seperate it out into a different type declaration the justification for the reordering was "optimization"
| 18 | // |
| 19 | // the justification for the reordering was "optimization" |
| 20 | pub struct PyCodeObject { |
| 21 | pub ob_base: PyVarObject, |
| 22 | pub co_consts: *mut PyObject, |
| 23 | pub co_names: *mut PyObject, |
| 24 | pub co_exceptiontable: *mut PyObject, |
| 25 | pub co_flags: c_int, |
| 26 | #[cfg(not(Py_3_12))] |
| 27 | pub co_warmup: c_short, |
| 28 | pub co_argcount: c_int, |
| 29 | pub co_posonlyargcount: c_int, |
| 30 | pub co_kwonlyargcount: c_int, |
| 31 | pub co_stacksize: c_int, |
| 32 | pub co_firstlineno: c_int, |
| 33 | pub co_nlocalsplus: c_int, |
| 34 | #[cfg(Py_3_12)] |
| 35 | pub co_framesize: c_int, |
| 36 | pub co_nlocals: c_int, |
| 37 | #[cfg(not(Py_3_12))] |
| 38 | pub co_nplaincellvars: c_int, |
| 39 | pub co_ncellvars: c_int, |
| 40 | pub co_nfreevars: c_int, |
| 41 | #[cfg(Py_3_12)] |
| 42 | pub co_version: u32, |
| 43 | pub co_localsplusnames: *mut PyObject, |
| 44 | pub co_localspluskinds: *mut PyObject, |
| 45 | pub co_filename: *mut PyObject, |
| 46 | pub co_name: *mut PyObject, |
| 47 | pub co_qualname: *mut PyObject, |
| 48 | pub co_linetable: *mut PyObject, |
| 49 | pub co_weakreflist: *mut PyObject, |
| 50 | // Intently omitting some internal fields at the end of this structure |
| 51 | } |
| 52 | |
| 53 | #[repr(C)] |
| 54 | #[derive(Copy)] |
nothing calls this directly
no outgoing calls
no test coverage detected