8000 MAINT: As discussed make it two NULL fields at the end of dtype · numpy/numpy@4c38ec2 · GitHub
[go: up one dir, main page]

Skip to content

Commit 4c38ec2

Browse files
committed
MAINT: As discussed make it two NULL fields at the end of dtype
2 should work (unless I miscounted badly).
1 parent 9cb60ed commit 4c38ec2

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

doc/source/reference/c-api/types-and-structures.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -290,7 +290,7 @@ PyArrayDescr_Type and PyArray_Descr
290290
npy_intp alignment;
291291
NpyAuxData *c_metadata;
292292
npy_hash_t hash;
293-
void *reserved_null; // unused field, must be NULL.
293+
void *reserved_null[2]; // unused field, must be NULLed.
294294
} PyArray_Descr;
295295
296296
Some dtypes have additional members which are accessible through

numpy/_core/include/numpy/ndarraytypes.h

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -610,7 +610,7 @@ typedef struct _PyArray_Descr {
610610
/* Cached hash value (-1 if not yet computed). */
611611
npy_hash_t hash;
612612
/* Unused slot (must be initialized to NULL) for future use */
613-
void *reserved_null;
613+
void *reserved_null[2];
614614
} PyArray_Descr;
615615

616616
#else /* 1.x and 2.x compatible version (only shared fields): */
@@ -639,7 +639,7 @@ typedef struct {
639639
npy_intp alignment;
640640
PyObject *metadata;
641641
npy_hash_t hash;
642-
void *reserved_null;
642+
void *reserved_null[2];
643643
} _PyArray_DescrNumPy2;
644644

645645
#endif /* 1.x and 2.x compatible version */
@@ -662,7 +662,7 @@ typedef struct {
662662
npy_intp alignment;
663663
PyObject *metadata;
664664
npy_hash_t hash;
665-
void *reserved_null;
665+
void *reserved_null[2];
666666
struct _arr_descr *subarray;
667667
PyObject *fields;
668668
PyObj 38F4 ect *names;

0 commit comments

Comments
 (0)
0