Move hyperlink hashmap to verstable

Also speedup getting url for hyperlink id by using a second hash map for
it. Change behavior when there are too many hyperlinks to discard new
hyperlinks instead of remapping old hyperlink id and making some old
hyperlink wrong.
This commit is contained in:
Kovid Goyal
2024-07-09 15:11:54 +05:30
parent 9727ea1cac
commit 2955c3f7a7
4 changed files with 116 additions and 128 deletions

View File

@@ -12,6 +12,5 @@ HYPERLINK_POOL_HANDLE alloc_hyperlink_pool(void);
void free_hyperlink_pool(HYPERLINK_POOL_HANDLE);
void clear_hyperlink_pool(HYPERLINK_POOL_HANDLE);
hyperlink_id_type get_id_for_hyperlink(Screen*, const char*, const char*);
hyperlink_id_type remap_hyperlink_ids(Screen *self, hyperlink_id_type *map);
PyObject* screen_hyperlinks_as_list(Screen *screen);
PyObject* screen_hyperlinks_as_set(Screen *screen);
void screen_garbage_collect_hyperlink_pool(Screen *screen);