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:
parent
02254398e8
commit
1492845c12
4 changed files with 20 additions and 23 deletions
|
@ -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[] = {
|
||||
/*
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue