[latex3-commits] [latex3/latex3] develop, main: Correct arg grabbing for Lua-based PDF object tracker (37033a654)

github at latex-project.org github at latex-project.org
Tue Apr 9 16:17:02 CEST 2024


Repository : https://github.com/latex3/latex3
On branches: develop,main
Link       : https://github.com/latex3/latex3/commit/37033a654cb7f2f7bb8dff0291d38f3841bf39a6

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

commit 37033a654cb7f2f7bb8dff0291d38f3841bf39a6
Author: Joseph Wright <joseph at texdev.net>
Date:   Wed Apr 3 15:52:07 2024 +0100

    Correct arg grabbing for Lua-based PDF object tracker
    
    As a result, we don't need to V-type expand either.


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

37033a654cb7f2f7bb8dff0291d38f3841bf39a6
 l3kernel/l3pdf.dtx | 8 +++-----
 1 file changed, 3 insertions(+), 5 deletions(-)

diff --git a/l3kernel/l3pdf.dtx b/l3kernel/l3pdf.dtx
index 8bed00a20..f0ccb1093 100644
--- a/l3kernel/l3pdf.dtx
+++ b/l3kernel/l3pdf.dtx
@@ -380,7 +380,7 @@
 % \begin{macro}{\pdf_object_ref:n}
 % \begin{macro}{\__kernel_pdf_object_id:n}
 % \begin{macro}{ltx.pdf.object_id}
-% \begin{macro}{\@@_object_record:nn, \@@_object_record:nV}
+% \begin{macro}{\@@_object_record:nn}
 % \begin{macro}{\@@_object_retrieve:n}
 % \begin{macro}[pTF]{\pdf_object_if_exist:n}
 %   Simple to do: all objects create a constant |int| so it is not a
@@ -389,7 +389,7 @@
 \cs_new_protected:Npn \pdf_object_new:n #1
   {
     \@@_backend_object_new:
-    \@@_object_record:nV {#1} \g_@@_backend_object_int
+    \@@_object_record:nn {#1} \g_@@_backend_object_int
   }
 \cs_new_protected:Npn \pdf_object_write:nnn #1#2#3
   {
@@ -416,7 +416,6 @@
 %    \begin{macrocode}
 %<*lua>
 
-local scan_int = token.scan_int
 local scan_string = token.scan_string
 local cprint = tex.cprint
 
@@ -424,7 +423,7 @@ local @@_objects = {}
 
 luacmd('@@_object_record:nn', function()
   local name = scan_string()
-  local n = scan_int()
+  local n = tonumber(scan_string())
   @@_objects[name] = n
 end, 'global')
 
@@ -463,7 +462,6 @@ ltx.pdf.object_id = object_id
           { 0 }
       }
   }
-\cs_generate_variant:Nn \@@_object_record:nn { nV }
 \prg_new_conditional:Npnn \pdf_object_if_exist:n #1 { p , T , F , TF }
   {
     \int_compare:nNnTF { \@@_object_retrieve:n {#1} } = 0





More information about the latex3-commits mailing list.