diff options
author | Anthony Ramine <[email protected]> | 2014-05-09 16:01:49 +0200 |
---|---|---|
committer | Zandra Hird <[email protected]> | 2015-03-12 10:15:14 +0100 |
commit | 0e464f7be1ae9b54d0fba748ab2dc7bd435ac118 (patch) | |
tree | 13ae71cc4a3b95fce407254783003d0d5d63c70a /erts/emulator/beam/erl_db_util.c | |
parent | 0ec91ff571518e199aac7a4da961a80c153483b9 (diff) | |
download | otp-0e464f7be1ae9b54d0fba748ab2dc7bd435ac118.tar.gz otp-0e464f7be1ae9b54d0fba748ab2dc7bd435ac118.tar.bz2 otp-0e464f7be1ae9b54d0fba748ab2dc7bd435ac118.zip |
Create new BIF ets:update_counter/4
Conflicts:
erts/emulator/beam/bif.tab
lib/stdlib/src/ets.erl
Diffstat (limited to 'erts/emulator/beam/erl_db_util.c')
-rw-r--r-- | erts/emulator/beam/erl_db_util.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/erts/emulator/beam/erl_db_util.c b/erts/emulator/beam/erl_db_util.c index 7eb80e3bb1..221f091396 100644 --- a/erts/emulator/beam/erl_db_util.c +++ b/erts/emulator/beam/erl_db_util.c @@ -2699,10 +2699,10 @@ Wterm db_do_read_element(DbUpdateHandle* handle, Sint position) } ASSERT(((DbTableCommon*)handle->tb)->compress); - ASSERT(!handle->mustResize); + ASSERT(!(handle->flags & DB_MUST_RESIZE)); handle->dbterm = db_alloc_tmp_uncompressed(&handle->tb->common, handle->dbterm); - handle->mustResize = 1; + handle->flags |= DB_MUST_RESIZE; return handle->dbterm->tpl[position]; } @@ -2735,11 +2735,11 @@ void db_do_update_element(DbUpdateHandle* handle, #endif return; } - if (!handle->mustResize) { + if (!(handle->flags & DB_MUST_RESIZE)) { if (handle->tb->common.compress) { handle->dbterm = db_alloc_tmp_uncompressed(&handle->tb->common, handle->dbterm); - handle->mustResize = 1; + handle->flags |= DB_MUST_RESIZE; oldval = handle->dbterm->tpl[position]; #if HALFWORD_HEAP old_base = NULL; @@ -2799,7 +2799,7 @@ both_size_set: /* write new value in old dbterm, finalize will make a flat copy */ handle->dbterm->tpl[position] = newval; - handle->mustResize = 1; + handle->flags |= DB_MUST_RESIZE; #if HALFWORD_HEAP if (old_base && newval_sz > 0) { |