From 083384f0d9541e7b4ca152ffda11bf9d7952b712 Mon Sep 17 00:00:00 2001 From: hunt Date: Tue, 13 Dec 2005 21:47:52 +0000 Subject: [PATCH] 2005-12-13 Martin Hunt * map.c (_stp_map_sortn): Set a limit of 30 for n. Automatically call _stp_map_sort() if more is requested. --- runtime/ChangeLog | 5 +++++ runtime/map.c | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/runtime/ChangeLog b/runtime/ChangeLog index ee355cf55..189994399 100644 --- a/runtime/ChangeLog +++ b/runtime/ChangeLog @@ -1,3 +1,8 @@ +2005-12-13 Martin Hunt + + * map.c (_stp_map_sortn): Set a limit of 30 for n. Automatically + call _stp_map_sort() if more is requested. + 2005-12-08 Martin Hunt * map.c (_new_map_create): Only increment map size if a node diff --git a/runtime/map.c b/runtime/map.c index 19c02580b..1fa4a0e5a 100644 --- a/runtime/map.c +++ b/runtime/map.c @@ -564,7 +564,7 @@ void _stp_map_sort (MAP map, int keynum, int dir) */ void _stp_map_sortn(MAP map, int n, int keynum, int dir) { - if (n == 0) { + if (n == 0 || n > 30) { _stp_map_sort(map, keynum, dir); } else { struct list_head *head = &map->head; -- 2.43.5