
Hi Travis,
Could you remove this macro? It isn't py3k compliant because of the PyCobject and we have too many public macros already. Please make it part of the interface if it needs to be exposed, otherwise make it an inline function somewhere.
#define PyDataType_GetDatetimeMetaData(descr) \ ((descr->metadata == NULL) ? NULL : \ ((PyArray_DatetimeMetaData *)(PyCObject_AsVoidPtr( \ PyDict_GetItemString(descr->metadata, NPY_METADATA_DTSTR)))))
Chuck

Perhaps as part of the refactoring. But I am not sure how to quantify too many public macros. This macro may need to be exposed.
-- (mobile phone of) Travis Oliphant Enthought, Inc. 1-512-536-1057 http://www.enthought.com
On May 3, 2010, at 1:22 AM, Charles R Harris charlesr.harris@gmail.com wrote:
Hi Travis,
Could you remove this macro? It isn't py3k compliant because of the PyCobject and we have too many public macros already. Please make it part of the interface if it needs to be exposed, otherwise make it an inline function somewhere.
#define PyDataType_GetDatetimeMetaData (descr) \ ((descr->metadata == NULL) ? NULL : \ ((PyArray_DatetimeMetaData *)(PyCObject_AsVoidPtr ( \ PyDict_GetItemString(descr->metadata, NPY_METADATA_DTSTR)))))
Chuck
NumPy-Discussion mailing list NumPy-Discussion@scipy.org http://mail.scipy.org/mailman/listinfo/numpy-discussion

On Mon, May 3, 2010 at 9:23 AM, Travis Oliphant oliphant@enthought.comwrote:
Perhaps as part of the refactoring. But I am not sure how to quantify too many public macros. This macro may need to be exposed.
It doesn't check for errors and the original was all on a single line, way over the limit. It needs to be a function. If *you* don't know if it needs be exposed it probably shouldn't be exposed.
<snip>
Chuck
participants (2)
-
Charles R Harris
-
Travis Oliphant