File 0374-Clarify-comments-in-array-module.patch of Package erlang

From 0eefa1868ba65771077e57bafaa11b1834af7522 Mon Sep 17 00:00:00 2001
From: Richard Carlsson <richardc@klarna.com>
Date: Mon, 11 Mar 2019 15:57:36 +0100
Subject: [PATCH 2/4] Clarify comments in array module

---
 lib/stdlib/src/array.erl | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/lib/stdlib/src/array.erl b/lib/stdlib/src/array.erl
index 904d977faf..a65f7eb747 100644
--- a/lib/stdlib/src/array.erl
+++ b/lib/stdlib/src/array.erl
@@ -126,8 +126,8 @@
 %% per write than base 10, but the speedup is only 21%.)
 
 -define(DEFAULT, undefined).
--define(LEAFSIZE, 10).		% the "base"
--define(NODESIZE, ?LEAFSIZE).   % (no reason to have a different size)
+-define(LEAFSIZE, 10).         % the "base" (assumed to be > 1)
+-define(NODESIZE, ?LEAFSIZE).  % must not be LEAFSIZE-1; keep same as leaf
 -define(NODEPATTERN(S), {_,_,_,_,_,_,_,_,_,_,S}). % NODESIZE+1 elements!
 -define(NEW_NODE(E,S),  % general case (currently unused)
         setelement((?NODESIZE+1),erlang:make_tuple((?NODESIZE+1),(E)),(S))).
-- 
2.16.4

openSUSE Build Service is sponsored by