[latex3-commits] [git/LaTeX3-latex3-latex3] debug: Avoid wasting registers (fd1ddfd)

Joseph Wright joseph.wright at morningstar2.co.uk
Tue Jun 18 07:38:05 CEST 2019


Repository : https://github.com/latex3/latex3
On branch  : debug
Link       : https://github.com/latex3/latex3/commit/fd1ddfd2d214b92f3f4b0eb21f90c3666be9fa7a

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

commit fd1ddfd2d214b92f3f4b0eb21f90c3666be9fa7a
Author: Joseph Wright <joseph.wright at morningstar2.co.uk>
Date:   Tue Jun 18 06:38:05 2019 +0100

    Avoid wasting registers


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

fd1ddfd2d214b92f3f4b0eb21f90c3666be9fa7a
 l3kernel/l3deprecation.dtx |   12 ++++++++----
 1 file changed, 8 insertions(+), 4 deletions(-)

diff --git a/l3kernel/l3deprecation.dtx b/l3kernel/l3deprecation.dtx
index 73db095..6b37ed5 100644
--- a/l3kernel/l3deprecation.dtx
+++ b/l3kernel/l3deprecation.dtx
@@ -726,8 +726,8 @@
 %   In order to toggle definitions on and off locally we declare an
 %   internal constant integer and copy it into \cs{c_minus_one}.
 %    \begin{macrocode}
-\cs_undefine:N \c_@@_minus_one
-\int_const:Nn \c_@@_minus_one { -1 }
+\cs_if_free:NT \c_@@_minus_one
+  { \int_const:Nn \c_@@_minus_one { -1 } }
 \__kernel_deprecation_code:nn
   {
     \tex_let:D \c_minus_one \scan_stop:
@@ -797,8 +797,12 @@
     #1 \c_one_thousand         {  1000 } #2
     #1 \c_ten_thousand         { 10000 } #2
   }
-\@@_deprecated_constants:nn { \use_i_ii:nnn \cs_undefine:N } { }
-\@@_deprecated_constants:nn { \int_const:Nn } { }
+\cs_set_protected:Npn \@@_deprecated_constants:Nn #1#2#3
+  {
+    \cs_if_free:NT #1
+      { \int_const:Nn #1 {#2} }
+  }
+\@@_deprecated_constants:nn { \@@_deprecated_constants:Nn } { }
 \__kernel_deprecation_code:nn
   {
     \@@_deprecated_constants:nn





More information about the latex3-commits mailing list