Skip to content

Commit f8b23b3

Browse files
committed
CLN: move assignment from header into cython
1 parent 7cad3f1 commit f8b23b3

File tree

2 files changed

+2
-6
lines changed

2 files changed

+2
-6
lines changed

pandas/src/datetime_helper.h

-5
Original file line numberDiff line numberDiff line change
@@ -7,11 +7,6 @@
77
#define PyInt_AS_LONG PyLong_AsLong
88
#endif
99

10-
void mangle_nat(PyObject *val) {
11-
PyDateTime_GET_MONTH(val) = -1;
12-
PyDateTime_GET_DAY(val) = -1;
13-
}
14-
1510
npy_int64 get_long_attr(PyObject *o, const char *attr) {
1611
npy_int64 long_val;
1712
PyObject *value = PyObject_GetAttrString(o, attr);

pandas/tslib.pyx

+2-1
Original file line numberDiff line numberDiff line change
@@ -738,7 +738,8 @@ class NaTType(_NaT):
738738
cdef _NaT base
739739

740740
base = _NaT.__new__(cls, 1, 1, 1)
741-
mangle_nat(base)
741+
base._day = -1
742+
base._month = -1
742743
base.value = NPY_NAT
743744

744745
return base

0 commit comments

Comments
 (0)