Skip to content

Commit 730867c

Browse files
committed
ffi: add two datetime-metadata-related structs
1 parent 7d913d6 commit 730867c

File tree

1 file changed

+14
-0
lines changed

1 file changed

+14
-0
lines changed

src/npyffi/objects.rs

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -398,3 +398,17 @@ pub struct NpyAuxData {
398398

399399
pub type NpyAuxData_FreeFunc = Option<unsafe extern "C" fn(*mut NpyAuxData)>;
400400
pub type NpyAuxData_CloneFunc = Option<unsafe extern "C" fn(*mut NpyAuxData) -> *mut NpyAuxData>;
401+
402+
#[repr(C)]
403+
#[derive(Clone, Copy)]
404+
pub struct PyArray_DatetimeMetaData {
405+
pub base: NPY_DATETIMEUNIT,
406+
pub num: c_int,
407+
}
408+
409+
#[repr(C)]
410+
#[derive(Clone, Copy)]
411+
pub struct PyArray_DatetimeDTypeMetaData {
412+
pub base: NpyAuxData,
413+
pub meta: PyArray_DatetimeMetaData,
414+
}

0 commit comments

Comments
 (0)