Clean up maintenance of config table sentinels

Xundump had special hackery to maintain configuration tables'
sentinels: xubody() and getobj() added a sentinel element when
initializing or growing a table, which xubody() stripped off again
before returning.  The latter was an unclean hack.

Replace this by building knowledge of sentinels into struct empfile:
new flag EFF_SENTINEL, set for the appropriate members of empfile[],
obeyed by ef_extend() and ef_truncate().
This commit is contained in:
Markus Armbruster 2008-09-01 09:20:08 -04:00
parent 02254398e8
commit 1492845c12
4 changed files with 20 additions and 23 deletions

View file

@ -86,7 +86,7 @@
SZ((array)), 0, SZ((array)) - 1, SZ((array)) - 1, -1, NULL, NULL
/* Common configuration table flags */
#define EFF_CFG (EFF_PRIVATE | EFF_MEM | EFF_STATIC)
#define EFF_CFG (EFF_PRIVATE | EFF_MEM | EFF_STATIC | EFF_SENTINEL)
struct empfile empfile[] = {
/*