File 1016-erlang-module-doc-list_to_atom-1-binary_to_atom-2.patch of Package erlang

From 0b2d694f87018107b249ee95af64f36f25a8d9f2 Mon Sep 17 00:00:00 2001
From: Kjell Winblad <kjellwinblad@gmail.com>
Date: Mon, 31 Aug 2020 14:04:40 +0200
Subject: [PATCH 06/39] erlang module doc: : list_to_atom/1, binary_to_atom/2

* Note about atom name length limit
* Note about that one should consider binary_to_existing_atom/2
---
 erts/doc/src/erlang.xml | 37 +++++++++++++++++++++++++++++++++++--
 1 file changed, 35 insertions(+), 2 deletions(-)

diff --git a/erts/doc/src/erlang.xml b/erts/doc/src/erlang.xml
index 60220ef29a..1f646867b1 100644
--- a/erts/doc/src/erlang.xml
+++ b/erts/doc/src/erlang.xml
@@ -434,10 +434,27 @@ Z = erlang:adler32_combine(X,Y,iolist_size(Data2)).</code>
             encoded atoms</seealso>
             in section "External Term Format" in the User's Guide.</p>
         </note>
+        <note>
+          <p>The number of characters that are permitted in an atom
+          name is limited. The default limits can be found in the
+          <seealso marker="system/efficiency_guide:advanced">
+          efficiency guide (section Advanced)</seealso>.</p>
+        </note>
+        <note>
+          <p>There is configurable limit on how many atoms that can
+          exist and atoms are not garbage collected. Therefore, it is
+          recommended to consider if
+          <c>binary_to_existing_atom/2</c> is a better option
+          than <c>binary_to_atom/2</c>. The default limits can
+          be found in <seealso
+          marker="system/efficiency_guide:advanced">efficiency guide
+          (section Advanced)</seealso>.</p>
+        </note>
         <p>Examples:</p>
         <pre>
 > <input>binary_to_atom(&lt;&lt;"Erlang"&gt;&gt;, latin1).</input>
-'Erlang'
+'Erlang'</pre>
+        <pre>
 > <input>binary_to_atom(&lt;&lt;1024/utf8&gt;&gt;, utf8).</input>
 ** exception error: bad argument
      in function  binary_to_atom/2
@@ -2727,7 +2744,23 @@ false</code>
           For more information on Unicode support in atoms, see
           <seealso marker="erl_ext_dist#utf8_atoms">note on UTF-8
           encoded atoms</seealso>
-          in section "External Term Format" in the User's Guide.</p>
+        in section "External Term Format" in the User's Guide.</p>
+        <note>
+          <p>The number of characters that are permitted in an atom
+          name is limited. The default limits can be found in the
+          <seealso marker="system/efficiency_guide:advanced">
+          efficiency guide (section Advanced)</seealso>.</p>
+        </note>
+        <note>
+          <p>There is configurable limit on how many atoms that can
+          exist and atoms are not garbage collected. Therefore, it is
+          recommended to consider if
+          <c>binary_to_existing_atom/2</c> is a better option
+          than <c>list_to_atom/1</c>. The default limits can
+          be found in <seealso
+          marker="system/efficiency_guide:advanced">efficiency guide
+          (section Advanced)</seealso>.</p>
+        </note>
         <p>Example:</p>
         <pre>
 > <input>list_to_atom("Erlang").</input>
-- 
2.26.2

openSUSE Build Service is sponsored by