File tree Expand file tree Collapse file tree 2 files changed +18
-0
lines changed
Expand file tree Collapse file tree 2 files changed +18
-0
lines changed Original file line number Diff line number Diff line change 11# Changelog
2+
3+ - Unreleased
4+ - Fix PyArray_DTypeMeta definition when Py_LIMITED_API is disabled (#532 )
5+
26- v0.28.0
37 - Fix mismatched behavior between ` PyArrayLike1 ` and ` PyArrayLike2 ` when used with floats ([ #520 ] ( https://github.com/PyO3/rust-numpy/pull/520 ) )
48 - Add ownership-moving conversions into ` PyReadonlyArray ` and ` PyReadwriteArray ` ([ #524 ] ( https://github.com/PyO3/rust-numpy/pull/524 ) )
Original file line number Diff line number Diff line change @@ -549,6 +549,20 @@ pub struct PyArray_DatetimeDTypeMetaData {
549549// https://github.com/rust-lang/rust/issues/43467
550550pub type npy_packed_static_string = c_void ;
551551pub type npy_string_allocator = c_void ;
552+
553+ #[ cfg( not( Py_LIMITED_API ) ) ]
554+ #[ repr( C ) ]
555+ pub struct PyArray_DTypeMeta {
556+ pub superclass : PyHeapTypeObject ,
557+ pub singleton : * mut PyArray_Descr ,
558+ pub type_num : c_int ,
559+ pub scalar_type : * mut PyTypeObject ,
560+ pub flags : npy_uint64 ,
561+ pub dt_slots : * mut c_void ,
562+ pub reserved : [ * mut c_void ; 3 ] ,
563+ }
564+
565+ #[ cfg( Py_LIMITED_API ) ]
552566pub type PyArray_DTypeMeta = PyTypeObject ;
553567
554568#[ repr( C ) ]
You can’t perform that action at this time.
0 commit comments