8000 MAINT: Add a `void *reserved_null` field to descr for possible future… · numpy/numpy@9cb60ed · GitHub
[go: up one dir, main page]

Skip to content 10000

Commit 9cb60ed

Browse files
committed
MAINT: Add a void *reserved_null field to descr for possible future use
1 parent 0412866 commit 9cb60ed

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

numpy/_core/include/numpy/ndarraytypes.h

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -609,6 +609,8 @@ typedef struct _PyArray_Descr {
609609
PyObject *metadata;
610610
/* Cached hash value (-1 if not yet computed). */
611611
npy_hash_t hash;
612+
/* Unused slot (must be initialized to NULL) for future use */
613+
void *reserved_null;
612614
} PyArray_Descr;
613615

614616
#else /* 1.x and 2.x compatible version (only shared fields): */
@@ -637,6 +639,7 @@ typedef struct {
637639
npy_intp alignment;
638640
PyObject *metadata;
639641
npy_hash_t hash;
642+
void *reserved_null;
640643
} _PyArray_DescrNumPy2;
641644

642645
#endif /* 1.x and 2.x compatible version */
@@ -659,6 +662,7 @@ typedef struct {
659662
npy_intp alignment;
660663
PyObject *metadata;
661664
npy_hash_t hash;
665+
void *reserved_null;
662666
struct _arr_descr *subarray;
663667
PyObject *fields;
664668
PyObject *names;

0 commit comments

Comments
 (0)
0