Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 0 additions & 3 deletions pandas/src/datetime.pxd
Original file line number Diff line number Diff line change
Expand Up @@ -42,9 +42,6 @@ cdef extern from "datetime.h":
object PyDateTime_FromDateAndTime(int year, int month, int day, int hour,
int minute, int second, int us)

cdef extern from "datetime_helper.h":
void mangle_nat(object o)

cdef extern from "numpy/ndarrayobject.h":

ctypedef int64_t npy_timedelta
Expand Down
5 changes: 0 additions & 5 deletions pandas/src/datetime_helper.h
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,6 @@
#define PyInt_AS_LONG PyLong_AsLong
#endif

void mangle_nat(PyObject *val) {
PyDateTime_GET_MONTH(val) = -1;
PyDateTime_GET_DAY(val) = -1;
}

npy_int64 get_long_attr(PyObject *o, const char *attr) {
Copy link
Contributor

@jreback jreback Nov 25, 2016

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this also has a reference in datetime.pxd (can remove this too)

npy_int64 long_val;
PyObject *value = PyObject_GetAttrString(o, attr);
Expand Down
3 changes: 2 additions & 1 deletion pandas/tslib.pyx
Original file line number Diff line number Diff line change
Expand Up @@ -738,7 +738,8 @@ class NaTType(_NaT):
cdef _NaT base

base = _NaT.__new__(cls, 1, 1, 1)
mangle_nat(base)
base._day = -1
base._month = -1
base.value = NPY_NAT

return base
Expand Down