Skip to content

Commit

Permalink
MAINT: support traversal loops without initializing the descriptor
Browse files Browse the repository at this point in the history
  • Loading branch information
ngoldbaum committed Apr 19, 2023
1 parent e533144 commit 4403c01
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion numpy/core/src/multiarray/dtype_traversal.h
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ NPY_traverse_info_init(NPY_traverse_info *cast_info)
{
cast_info->func = NULL; /* mark as uninitialized. */
cast_info->auxdata = NULL; /* allow leaving auxdata untouched */
cast_info->descr = NULL; /* mark as uninitialized. */
}


Expand All @@ -45,7 +46,7 @@ NPY_traverse_info_xfree(NPY_traverse_info *traverse_info)
}
traverse_info->func = NULL;
NPY_AUXDATA_FREE(traverse_info->auxdata);
Py_DECREF(traverse_info->descr);
Py_XDECREF(traverse_info->descr);
}


Expand Down

0 comments on commit 4403c01

Please sign in to comment.