[latex3-commits] [git/LaTeX3-latex3-latex3] master: Correct \intarray_item:Nn, which was accidentally restricted-expandable (4f48f843f)

Bruno Le Floch bruno at le-floch.fr
Wed Jul 15 23:33:15 CEST 2020


Repository : https://github.com/latex3/latex3
On branch  : master
Link       : https://github.com/latex3/latex3/commit/4f48f843f8d6683dfe73f833c043db4f0f85e96e

>---------------------------------------------------------------

commit 4f48f843f8d6683dfe73f833c043db4f0f85e96e
Author: Bruno Le Floch <bruno at le-floch.fr>
Date:   Wed Jul 15 23:33:15 2020 +0200

    Correct \intarray_item:Nn, which was accidentally restricted-expandable
    
    When f-expanding \intarray_item:Nn there was a trailing TeX conditional
    \fi: left over.


>---------------------------------------------------------------

4f48f843f8d6683dfe73f833c043db4f0f85e96e
 l3kernel/l3intarray.dtx | 17 ++++++++---------
 1 file changed, 8 insertions(+), 9 deletions(-)

diff --git a/l3kernel/l3intarray.dtx b/l3kernel/l3intarray.dtx
index 6ab5647a8..6f3e6bb59 100644
--- a/l3kernel/l3intarray.dtx
+++ b/l3kernel/l3intarray.dtx
@@ -266,29 +266,28 @@
 %    \end{macrocode}
 % \end{macro}
 %
-% \begin{macro}[EXP]{\@@_bounds:NNnTF, \@@_bounds_error:NNn}
+% \begin{macro}[EXP]{\@@_bounds:NNnTF, \@@_bounds_error:NNnw}
 %   The functions \cs{intarray_gset:Nnn} and \cs{intarray_item:Nn} share
 %   bounds checking.  The |T| branch is used if |#3| is within bounds of
 %   the array |#2|.
 %    \begin{macrocode}
-\cs_new:Npn \@@_bounds:NNnTF #1#2#3#4#5
+\cs_new:Npn \@@_bounds:NNnTF #1#2#3
   {
     \if_int_compare:w 1 > #3 \exp_stop_f:
-      \@@_bounds_error:NNn #1 #2 {#3}
-      #5
+      \@@_bounds_error:NNnw #1 #2 {#3}
     \else:
       \if_int_compare:w #3 > \intarray_count:N #2 \exp_stop_f:
-        \@@_bounds_error:NNn #1 #2 {#3}
-        #5
-      \else:
-        #4
+        \@@_bounds_error:NNnw #1 #2 {#3}
       \fi:
     \fi:
+    \use_i:nn
   }
-\cs_new:Npn \@@_bounds_error:NNn #1#2#3
+\cs_new:Npn \@@_bounds_error:NNnw #1#2#3#4 \use_i:nn #5#6
   {
+    #4
     #1 { kernel } { out-of-bounds }
       { \token_to_str:N #2 } {#3} { \intarray_count:N #2 }
+    #6
   }
 %    \end{macrocode}
 % \end{macro}





More information about the latex3-commits mailing list.