Skip to content

Commit c23cca6

Browse files
Update pyo3
1 parent 2755f1b commit c23cca6

2 files changed

Lines changed: 19 additions & 11 deletions

File tree

‎Cargo.lock‎

Lines changed: 10 additions & 10 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

‎crates/capi/src/object/pytype.rs‎

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -323,6 +323,14 @@ pub unsafe extern "C" fn PyObject_GetTypeData(
323323
}
324324
}
325325

326+
#[unsafe(no_mangle)]
327+
pub unsafe extern "C" fn PyObject_GetTypeData_DuringGC(
328+
obj: *mut PyObject,
329+
cls: *mut PyTypeObject,
330+
) -> *mut c_void {
331+
unsafe { PyObject_GetTypeData(obj, cls) }
332+
}
333+
326334
#[unsafe(no_mangle)]
327335
pub extern "C" fn PyType_Freeze(_ty: *mut PyTypeObject) -> c_int {
328336
0
@@ -332,7 +340,7 @@ pub extern "C" fn PyType_Freeze(_ty: *mut PyTypeObject) -> c_int {
332340
mod tests {
333341
use pyo3::IntoPyObjectExt;
334342
use pyo3::prelude::*;
335-
use pyo3::types::{PyDict, PyInt, PyString, PyType, PyTypeMethods};
343+
use pyo3::types::{PyDict, PyInt, PyList, PyString, PyType, PyTypeMethods};
336344

337345
#[test]
338346
fn type_name() {

0 commit comments

Comments
 (0)