Permalink
Browse files

BUG: missing incref for metadata of datetime dtypes.

  • Loading branch information...
1 parent 5013093 commit 7953c010971fc091230833355d930ec4ebdd29a0 @thouis thouis committed Jun 8, 2012
Showing with 1 addition and 0 deletions.
  1. +1 −0 numpy/core/src/multiarray/descriptor.c
@@ -2536,6 +2536,7 @@ arraydescr_setstate(PyArray_Descr *self, PyObject *args)
/* The Python metadata */
self->metadata = PyTuple_GET_ITEM(metadata, 0);
+ Py_XINCREF(self->metadata);
/* The datetime metadata */
dt_data = &(((PyArray_DatetimeDTypeMetaData *)self->c_metadata)->meta);

0 comments on commit 7953c01

Please sign in to comment.