parent
3408cc4200
commit
4a2e6bd51a
|
@ -1,6 +1,8 @@
|
|||
use crate::object::*;
|
||||
use crate::Py_ssize_t;
|
||||
use std::os::raw::{c_char, c_int};
|
||||
#[cfg(not(any(PyPy, Py_LIMITED_API)))]
|
||||
use std::os::raw::c_char;
|
||||
use std::os::raw::c_int;
|
||||
|
||||
#[cfg(not(any(PyPy, Py_LIMITED_API)))]
|
||||
#[repr(C)]
|
||||
|
|
|
@ -7,10 +7,8 @@ opaque_struct!(PyDictKeysObject);
|
|||
#[cfg(Py_3_11)]
|
||||
opaque_struct!(PyDictValues);
|
||||
|
||||
#[cfg(not(PyPy))]
|
||||
#[repr(C)]
|
||||
#[derive(Debug)]
|
||||
// Not moved because dict.rs uses PyDictObject extensively.
|
||||
pub struct PyDictObject {
|
||||
pub ob_base: PyObject,
|
||||
pub ma_used: Py_ssize_t,
|
||||
|
@ -22,15 +20,6 @@ pub struct PyDictObject {
|
|||
pub ma_values: *mut PyDictValues,
|
||||
}
|
||||
|
||||
#[cfg(PyPy)]
|
||||
#[repr(C)]
|
||||
#[derive(Debug)]
|
||||
pub struct PyDictObject {
|
||||
pub ob_base: PyObject,
|
||||
// a private place to put keys during PyDict_Next
|
||||
_tmpkeys: *mut PyObject,
|
||||
}
|
||||
|
||||
extern "C" {
|
||||
// skipped _PyDict_GetItem_KnownHash
|
||||
// skipped _PyDict_GetItemIdWithError
|
||||
|
|
|
@ -1,6 +1,5 @@
|
|||
pub(crate) mod abstract_;
|
||||
// skipped bytearrayobject.h
|
||||
#[cfg(not(PyPy))]
|
||||
pub(crate) mod bytesobject;
|
||||
#[cfg(not(PyPy))]
|
||||
pub(crate) mod ceval;
|
||||
|
@ -19,7 +18,6 @@ pub(crate) mod import;
|
|||
pub(crate) mod initconfig;
|
||||
// skipped interpreteridobject.h
|
||||
pub(crate) mod listobject;
|
||||
|
||||
#[cfg(all(Py_3_9, not(PyPy)))]
|
||||
pub(crate) mod methodobject;
|
||||
pub(crate) mod object;
|
||||
|
@ -36,7 +34,6 @@ pub(crate) mod unicodeobject;
|
|||
pub(crate) mod weakrefobject;
|
||||
|
||||
pub use self::abstract_::*;
|
||||
#[cfg(not(PyPy))]
|
||||
pub use self::bytesobject::*;
|
||||
#[cfg(not(PyPy))]
|
||||
pub use self::ceval::*;
|
||||
|
|
Loading…
Reference in New Issue