Skip to content

Commit e8711b1

Browse files
committed
do not store result of kh_put* when it is not used
1 parent a123978 commit e8711b1

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

pandas/hashtable.pyx

+4-4
Original file line numberDiff line numberDiff line change
@@ -222,7 +222,7 @@ cdef class StringHashTable(HashTable):
222222
buf = util.get_c_string(val)
223223
k = kh_get_str(self.table, buf)
224224
if k == self.table.n_buckets:
225-
k = kh_put_str(self.table, buf, &ret)
225+
kh_put_str(self.table, buf, &ret)
226226
# print 'putting %s, %s' % (val, count)
227227
uniques.append(val)
228228

@@ -525,7 +525,7 @@ cdef class Int64HashTable: #(HashTable):
525525
val = values[i]
526526
k = kh_get_int64(self.table, val)
527527
if k == self.table.n_buckets:
528-
k = kh_put_int64(self.table, val, &ret)
528+
kh_put_int64(self.table, val, &ret)
529529
uniques.append(val)
530530

531531
result = uniques.to_array()
@@ -651,7 +651,7 @@ cdef class Float64HashTable(HashTable):
651651
if val == val:
652652
k = kh_get_float64(self.table, val)
653653
if k == self.table.n_buckets:
654-
k = kh_put_float64(self.table, val, &ret)
654+
kh_put_float64(self.table, val, &ret)
655655
uniques.append(val)
656656
elif not seen_na:
657657
seen_na = 1
@@ -792,7 +792,7 @@ cdef class PyObjectHashTable(HashTable):
792792
if not _checknan(val):
793793
k = kh_get_pymap(self.table, <PyObject*>val)
794794
if k == self.table.n_buckets:
795-
k = kh_put_pymap(self.table, <PyObject*>val, &ret)
795+
kh_put_pymap(self.table, <PyObject*>val, &ret)
796796
uniques.append(val)
797797
elif not seen_na:
798798
seen_na = 1

0 commit comments

Comments
 (0)