aboutsummaryrefslogtreecommitdiffstats
path: root/erts/emulator/beam/index.h
diff options
context:
space:
mode:
authorSverker Eriksson <[email protected]>2012-01-23 16:46:53 +0100
committerSverker Eriksson <[email protected]>2012-02-21 12:23:01 +0100
commit48e662a63e80c4f358be1ba062615ff56e09f331 (patch)
treea253cb707b95528e46137654e667426ea223e465 /erts/emulator/beam/index.h
parent194ae0717f9be27374db3609e6884fad086df4df (diff)
downloadotp-48e662a63e80c4f358be1ba062615ff56e09f331.tar.gz
otp-48e662a63e80c4f358be1ba062615ff56e09f331.tar.bz2
otp-48e662a63e80c4f358be1ba062615ff56e09f331.zip
erts: Refactor new function index_put_entry()
Same as index_put() but returns pointer to entry instead of index integer.
Diffstat (limited to 'erts/emulator/beam/index.h')
-rw-r--r--erts/emulator/beam/index.h10
1 files changed, 9 insertions, 1 deletions
diff --git a/erts/emulator/beam/index.h b/erts/emulator/beam/index.h
index 69d1cc0a22..3afe48d007 100644
--- a/erts/emulator/beam/index.h
+++ b/erts/emulator/beam/index.h
@@ -55,16 +55,24 @@ void index_info(int, void *, IndexTable*);
int index_table_sz(IndexTable *);
int index_get(IndexTable*, void*);
-int index_put(IndexTable*, void*);
+
+IndexSlot* index_put_entry(IndexTable*, void*);
void erts_index_merge(Hash*, IndexTable*);
/* Erase all entries with index 'ix' and higher
*/
void index_erase_latest_from(IndexTable*, Uint ix);
+ERTS_GLB_INLINE int index_put(IndexTable*, void*);
ERTS_GLB_INLINE IndexSlot* erts_index_lookup(IndexTable*, Uint);
#if ERTS_GLB_INLINE_INCL_FUNC_DEF
+
+ERTS_GLB_INLINE int index_put(IndexTable* t, void* tmpl)
+{
+ return index_put_entry(t, tmpl)->index;
+}
+
ERTS_GLB_INLINE IndexSlot*
erts_index_lookup(IndexTable* t, Uint ix)
{