File 5722-Fix-since-attributes.patch of Package erlang

From d947948dde711d82a24354d0ff18bcc615093c41 Mon Sep 17 00:00:00 2001
From: Sverker Eriksson <sverker@erlang.org>
Date: Wed, 10 Jan 2024 12:01:35 +0100
Subject: [PATCH 2/2] Fix "since" attributes

and some minor code cleanup.
---
 erts/emulator/beam/erl_db_hash.c | 2 +-
 erts/emulator/beam/erl_db_tree.c | 2 +-
 erts/emulator/beam/erl_db_util.h | 2 +-
 lib/stdlib/doc/src/ets.xml       | 8 ++++----
 4 files changed, 7 insertions(+), 7 deletions(-)

diff --git a/erts/emulator/beam/erl_db_hash.c b/erts/emulator/beam/erl_db_hash.c
index 8997b521d4..df81264908 100644
--- a/erts/emulator/beam/erl_db_hash.c
+++ b/erts/emulator/beam/erl_db_hash.c
@@ -1090,7 +1090,7 @@ int db_create_hash(Process *p, DbTable *tbl)
 static ERTS_INLINE Eterm db_copy_key_hash(Process* p, DbTable* tbl, HashDbTerm* b)
 {
     Eterm key = GETKEY(&tbl->common, b->dbterm.tpl);
-    if IS_CONST(key) return key;
+    if is_immed(key) return key;
     else {
 	Uint size = size_object(key);
 	Eterm* hp = HAlloc(p, size);
diff --git a/erts/emulator/beam/erl_db_tree.c b/erts/emulator/beam/erl_db_tree.c
index d409ee9381..66e644f6e1 100644
--- a/erts/emulator/beam/erl_db_tree.c
+++ b/erts/emulator/beam/erl_db_tree.c
@@ -574,7 +574,7 @@ int db_create_tree(Process *p, DbTable *tbl)
 Eterm db_copy_key_tree(Process* p, DbTable* tbl, TreeDbTerm* node)
 {
     Eterm key = GETKEY(&tbl->common, node->dbterm.tpl);
-    if IS_CONST(key) return key;
+    if is_immed(key) return key;
     else {
 	Uint size = size_object(key);
 	Eterm* hp = HAlloc(p, size);
diff --git a/erts/emulator/beam/erl_db_util.h b/erts/emulator/beam/erl_db_util.h
index 62fb6e742e..9aeaeed28c 100644
--- a/erts/emulator/beam/erl_db_util.h
+++ b/erts/emulator/beam/erl_db_util.h
@@ -407,7 +407,7 @@ Wterm db_do_read_element(DbUpdateHandle* handle, Sint position);
 ERTS_GLB_INLINE Eterm db_copy_key(Process* p, DbTable* tb, DbTerm* obj)
 {
     Eterm key = GETKEY(tb, obj->tpl);
-    if IS_CONST(key) return key;
+    if is_immed(key) return key;
     else {
 	Uint size = size_object(key);
 	Eterm* hp = HAlloc(p, size);
diff --git a/lib/stdlib/doc/src/ets.xml b/lib/stdlib/doc/src/ets.xml
index 9cc39c9484..2a71b12cac 100644
--- a/lib/stdlib/doc/src/ets.xml
+++ b/lib/stdlib/doc/src/ets.xml
@@ -462,7 +462,7 @@ true
     </func>
 
     <func>
-      <name name="first_lookup" arity="1" since=""/>
+      <name name="first_lookup" arity="1" since="OTP 27.0"/>
       <fsummary>Return the first key and object(s) in an ETS table.</fsummary>
       <desc>
         <p>Similar to <seemfa marker="#first/1"><c>first/1</c></seemfa> except that
@@ -958,7 +958,7 @@ Error: fun containing local Erlang function calls
     </func>
 
     <func>
-      <name name="last_lookup" arity="1" since=""/>
+      <name name="last_lookup" arity="1" since="OTP 27.0"/>
       <fsummary>Return the last key and object in an ETS table of type
         <c>ordered_set</c>.</fsummary>
       <desc>
@@ -1519,7 +1519,7 @@ ets:select(Table, MatchSpec),</code>
     </func>
 
     <func>
-      <name name="next_lookup" arity="2" since=""/>
+      <name name="next_lookup" arity="2" since="OTP 27.0"/>
       <fsummary>Return the next key and object(s) in an ETS table.</fsummary>
       <desc>
         <p>Similar to <seemfa marker="#next/2"><c>next/2</c></seemfa> except that
@@ -1550,7 +1550,7 @@ ets:select(Table, MatchSpec),</code>
     </func>
 
     <func>
-      <name name="prev_lookup" arity="2" since=""/>
+      <name name="prev_lookup" arity="2" since="OTP 27.0"/>
       <fsummary>Return the previous key and object(s) in an ETS table of type
         <c>ordered_set</c>.</fsummary>
       <desc>
-- 
2.35.3

openSUSE Build Service is sponsored by