]> git.ipfire.org Git - thirdparty/bind9.git/commit
Refactor and simplify isc_symtab
authoralessio <alessio@isc.org>
Fri, 29 Nov 2024 09:02:13 +0000 (10:02 +0100)
committeralessio <alessio@isc.org>
Mon, 17 Feb 2025 10:43:19 +0000 (11:43 +0100)
commit53991ecc144d1a53181c4dee53643b6eb9a4dfe0
tree37316ccd1a0d3737f414a1ca82f99951ea1bf03e
parentebf1606f3822f004d443ba5e9c8a5300d12e326e
Refactor and simplify isc_symtab

This commit does several changes to isc_symtab:

1. Rewrite the isc_symtab to internally use isc_hashmap instead of
   hand-stiched hashtable.

2. Create a new isc_symtab_define_and_return() api, which returns
   the already defined symvalue on ISC_R_EXISTS; this allows users
   of the API to skip the isc_symtab_lookup()+isc_symtab_define()
   calls and directly call isc_symtab_define_and_return().

3. Merge isccc_symtab into isc_symtab - the only missing function
   was isccc_symtab_foreach() that was merged into isc_symtab API.

4. Add full set of unit tests for the isc_symtab API.
12 files changed:
bin/check/check-tool.c
bin/named/controlconf.c
lib/isc/include/isc/symtab.h
lib/isc/symtab.c
lib/isccc/Makefile.am
lib/isccc/cc.c
lib/isccc/include/isccc/cc.h
lib/isccc/include/isccc/symtab.h [deleted file]
lib/isccc/include/isccc/types.h
lib/isccfg/check.c
lib/isccfg/parser.c
tests/isc/symtab_test.c