diff options
| author | Bruce Hill <bruce@bruce-hill.com> | 2025-04-07 15:35:13 -0400 |
|---|---|---|
| committer | Bruce Hill <bruce@bruce-hill.com> | 2025-04-07 15:35:13 -0400 |
| commit | 0d2060717a21653deb3db03ba5b3fe62aa4c098e (patch) | |
| tree | 9c0636930d5a358d8e654690cec69d7d3d7c19a4 /src/stdlib | |
| parent | d2bee9ce7401672cae5cf02cf15dfa0ee48c2352 (diff) | |
Remove table.bump()
Diffstat (limited to 'src/stdlib')
| -rw-r--r-- | src/stdlib/tables.h | 7 |
1 files changed, 0 insertions, 7 deletions
diff --git a/src/stdlib/tables.h b/src/stdlib/tables.h index 1557e429..ad6127c7 100644 --- a/src/stdlib/tables.h +++ b/src/stdlib/tables.h @@ -53,13 +53,6 @@ void *Table$reserve(Table_t *t, const void *key, const void *value, const TypeIn void Table$set(Table_t *t, const void *key, const void *value, const TypeInfo_t *type); #define Table$set_value(t, key_expr, value_expr, type) ({ __typeof(key_expr) k = key_expr; __typeof(value_expr) v = value_expr; \ Table$set(t, &k, &v, type); }) -#define Table$reserve_value(t, key_expr, type) ({ __typeof(key_expr) k = key_expr; Table$reserve(t, &k, NULL, type); }) -#define Table$bump(t_expr, key_expr, amount_expr, type) ({ __typeof(key_expr) key = key_expr; \ - Table_t *t = t_expr; \ - __typeof(amount_expr) *val = Table$get_raw(*t, &key, type); \ - if (val) *val += amount_expr; \ - else { __typeof(amount_expr) init = amount_expr; Table$set(t, &key, &init, type); } (void)0; }) - void Table$remove(Table_t *t, const void *key, const TypeInfo_t *type); #define Table$remove_value(t, key_expr, type) ({ __typeof(key_expr) k = key_expr; Table$remove(t, &k, type); }) |
