Skip to content

Commit

Permalink
ENH: Change NPY_AUXDATA_FREE macro based on PR feedback
Browse files Browse the repository at this point in the history
  • Loading branch information
mwiebe authored and charris committed May 10, 2012
1 parent b7cb21a commit 9d63dae
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions numpy/core/include/numpy/ndarraytypes.h
Original file line number Diff line number Diff line change
Expand Up @@ -303,10 +303,11 @@ struct NpyAuxData_tag {

/* Macros to use for freeing and cloning auxiliary data */
#define NPY_AUXDATA_FREE(auxdata) \
if ((auxdata) == NULL) \
; \
else \
((auxdata)->free(auxdata))
do { \
if ((auxdata) != NULL) { \
(auxdata)->free(auxdata); \
} \
} while(0)
#define NPY_AUXDATA_CLONE(auxdata) \
((auxdata)->clone(auxdata))

Expand Down

0 comments on commit 9d63dae

Please sign in to comment.