aboutsummaryrefslogtreecommitdiffstats
path: root/erts/emulator/beam/erl_db_tree.c
diff options
context:
space:
mode:
authorGuilherme Andrade <[email protected]>2017-01-29 20:20:34 +0000
committerGuilherme Andrade <[email protected]>2017-03-22 23:57:54 +0000
commit3323f01156a698e2d21c2bb1c51b58cf47444aa0 (patch)
tree9315b202458d44d85df4678beb1bc944e7e1effa /erts/emulator/beam/erl_db_tree.c
parente15319fcdb5c99514cd63d7a02d04c97587e8853 (diff)
downloadotp-3323f01156a698e2d21c2bb1c51b58cf47444aa0.tar.gz
otp-3323f01156a698e2d21c2bb1c51b58cf47444aa0.tar.bz2
otp-3323f01156a698e2d21c2bb1c51b58cf47444aa0.zip
Deduplicate select* code on ETS hash tables
Refactor existing solution into a common iteration loop parameterized using stateful callbacks.
Diffstat (limited to 'erts/emulator/beam/erl_db_tree.c')
-rw-r--r--erts/emulator/beam/erl_db_tree.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/erts/emulator/beam/erl_db_tree.c b/erts/emulator/beam/erl_db_tree.c
index af1296367a..83cbf059c5 100644
--- a/erts/emulator/beam/erl_db_tree.c
+++ b/erts/emulator/beam/erl_db_tree.c
@@ -1843,6 +1843,7 @@ static int db_select_replace_tree(Process *p, DbTable *tbl,
Eterm pattern, Eterm *ret)
{
DbTableTree *tb = &tbl->tree;
+ Eterm tid = NIL; // TODO
DbTreeStack* stack;
struct select_replace_context sc;
struct mp_info mpi;
@@ -1937,7 +1938,7 @@ static int db_select_replace_tree(Process *p, DbTable *tbl,
continuation = TUPLE5
(hp,
- tb->common.id,
+ tid,
key,
sc.end_condition, /* From the match program, needn't be copied */
mpb,