Skip to content

Commit 8d3cd5a

Browse files
committed
added comments
1 parent 7e98949 commit 8d3cd5a

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

src/auto_map.c

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -685,6 +685,9 @@ lookup_hash_obj(FAMObject *self, PyObject *key, Py_hash_t hash)
685685
int result = -1;
686686
Py_hash_t h = 0;
687687

688+
// AK_DEBUG_MSG_OBJ("lookup_hash_obj", key);
689+
// TODO: if key is a dt64, we need to get the units and compare to units before doing PyObject_RichCompareBool
690+
688691
while (1) {
689692
for (Py_ssize_t i = 0; i < SCAN; i++) {
690693
h = table[table_pos].hash;
@@ -1027,14 +1030,15 @@ lookup_datetime(FAMObject *self, PyObject* key) {
10271030
if (PyArray_IsScalar(key, Datetime)) {
10281031
v = (npy_int64)PyArrayScalar_VAL(key, Datetime);
10291032
// if we observe a NAT, we skip unit checks
1033+
// AK_DEBUG_MSG_OBJ("dt64 value", PyLong_FromLongLong(v));
1034+
10301035
if (v != NPY_DATETIME_NAT) {
10311036
NPY_DATETIMEUNIT key_unit = dt_unit_from_scalar(
10321037
(PyDatetimeScalarObject *)key);
10331038
if (!kat_is_datetime_unit(self->keys_array_type, key_unit)) {
10341039
return -1;
10351040
}
10361041
}
1037-
// DEBUG_MSG_OBJ("dt64 value", PyLong_FromLongLong(v));
10381042
}
10391043
else {
10401044
return -1;

0 commit comments

Comments
 (0)