[latex3-commits] [git/LaTeX3-latex3-latex3] master: Set a const when initialising a color stack (ed542e48a)

Joseph Wright joseph.wright at morningstar2.co.uk
Tue Dec 15 09:32:41 CET 2020


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

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

commit ed542e48a25af147aa0c03516de0fb0d34ff3c5c
Author: Joseph Wright <joseph.wright at morningstar2.co.uk>
Date:   Tue Dec 15 08:32:41 2020 +0000

    Set a const when initialising a color stack
    
    We end up otherwise needing awkward scratch variables.


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

ed542e48a25af147aa0c03516de0fb0d34ff3c5c
 l3backend/l3backend-color.dtx | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/l3backend/l3backend-color.dtx b/l3backend/l3backend-color.dtx
index 0dfebdd5b..dfc923f9b 100644
--- a/l3backend/l3backend-color.dtx
+++ b/l3backend/l3backend-color.dtx
@@ -190,7 +190,7 @@
     \cs_new_protected:Npn \__kernel_color_stack_init:Nnn #1#2#3
       {
         \int_gincr:N \g__color_stack_int
-        \int_gset_eq:NN #1 \g__color_stack_int
+        \int_const:Nn #1 { \g__color_stack_int }
         \__kernel_backend_literal:x
           {
             pdfcolorstackinit ~
@@ -249,7 +249,7 @@
 %    \begin{macrocode}
 \cs_new_protected:Npn \__kernel_color_stack_init:Nnn #1#2#3
   {
-    \int_gset:Nn #1
+    \int_const:Nn #1
       {
 %<*luatex>
         \tex_pdffeedback:D colorstackinit ~





More information about the latex3-commits mailing list.