Thanks to visit codestin.com
Credit goes to github.com

Skip to content
Merged
Changes from 1 commit
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
Next Next commit
BUG: fix datetime/timedelta hash memory leak
  • Loading branch information
kostayScr committed Jul 22, 2025
commit 0d65fa2a1c87bcd82b7a0ab0a522e3027963f9ab
4 changes: 3 additions & 1 deletion numpy/_core/src/multiarray/scalartypes.c.src
Original file line number Diff line number Diff line change
Expand Up @@ -3922,7 +3922,9 @@ static npy_hash_t
dtype = PyArray_DescrFromScalar(obj);
meta = get_datetime_metadata_from_dtype(dtype);

return @lname@_hash(meta, val);
npy_hash_t res = @lname@_hash(meta, val);
Py_DECREF(dtype);
return res;
}
/**end repeat**/

Expand Down
Loading