[latex3-commits] [latex3/latex3] object-tracking: Simplify an auxiliary (b175f841a)
github at latex-project.org
github at latex-project.org
Mon Apr 1 09:18:41 CEST 2024
Repository : https://github.com/latex3/latex3
On branch : object-tracking
Link : https://github.com/latex3/latex3/commit/b175f841a3be1e12f8e15c10e25798136fac5d66
>---------------------------------------------------------------
commit b175f841a3be1e12f8e15c10e25798136fac5d66
Author: Joseph Wright <joseph at texdev.net>
Date: Fri Mar 29 10:45:47 2024 +0000
Simplify an auxiliary
>---------------------------------------------------------------
b175f841a3be1e12f8e15c10e25798136fac5d66
l3kernel/l3pdf.dtx | 51 ++++++++++++++++++++++++++-------------------------
1 file changed, 26 insertions(+), 25 deletions(-)
diff --git a/l3kernel/l3pdf.dtx b/l3kernel/l3pdf.dtx
index 74c892b84..8ab6c97fb 100644
--- a/l3kernel/l3pdf.dtx
+++ b/l3kernel/l3pdf.dtx
@@ -420,11 +420,11 @@
% \end{variable}
%
% \begin{macro}{\pdf_object_new_indexed:nn}
-% \begin{macro}{\@@_object_new_indexed:nnn}
+% \begin{macro}{\@@_object_new_indexed:Nn}
% \begin{macro}{\pdf_object_write_indexed:nnnn, \pdf_object_write_indexed:nnne}
-% \begin{macro}{\@@_object_write_indexed:nnnnn}
+% \begin{macro}{\@@_object_write_indexed:Nnnn}
% \begin{macro}[EXP]{\pdf_object_ref_indexed:nn}
-% \begin{macro}[EXP]{\@@_object_ref_indexed:nnn}
+% \begin{macro}[EXP]{\@@_object_ref_indexed:Nn}
% \begin{macro}[EXP]{\@@_object_indexed_split:nnN}
% Using indexed values is much the same, except we have to split up the
% value. As that's repetitive, we use a single auxiliary.
@@ -432,57 +432,58 @@
\cs_new_protected:Npn \pdf_object_new_indexed:nn #1#2
{
\@@_object_indexed_split:nnN {#1} {#2}
- \@@_object_new_indexed:nnn
+ \@@_object_new_indexed:Nn
}
-\cs_new_protected:Npn \@@_object_new_indexed:nnn #1#2#3
+\cs_new_protected:Npn \@@_object_new_indexed:Nn #1#2
{
\@@_backend_object_new:
- \intarray_if_exist:cF { g_@@_object_ #1 _ #2 _intarray }
+ \intarray_if_exist:NF #1
{
- \intarray_new:cn { g_@@_object_ #1 _ #2 _intarray }
+ \intarray_new:Nn #1
\c_@@_object_block_int
}
- \intarray_gset:cnn { g_@@_object_ #1 _ #2 _intarray }
- {#3} \g_@@_backend_object_int
+ \intarray_gset:Nnn #1 {#2} \g_@@_backend_object_int
}
\cs_new_protected:Npn \pdf_object_write_indexed:nnnn #1#2#3#4
{
\@@_object_indexed_split:nnN {#1} {#2}
- \@@_object_new_write_indexed:nnnnn
+ \@@_object_new_write_indexed:Nnnn
{#3} {#4}
}
\cs_generate_variant:Nn \pdf_object_write_indexed:nnnn { nnne }
-\cs_new_protected:Npn \@@_object_write_indexed:nnnnn #1#2#3#4#5
+\cs_new_protected:Npn \@@_object_write_indexed:Nnnn #1#2#3#4
{
\exp_args:Ne \@@_backend_object_write:nnn
- { \intarray_item:cn { g_@@_object_ #1 _ #2 _intarray } {#3} }
- {#4} {#5}
+ { \intarray_item:Nn #1 {#2} }
+ {#3} {#4}
\bool_gset_true:N \g_@@_init_bool
}
\cs_new:Npn \pdf_object_ref_indexed:nn #1#2
{
\@@_object_indexed_split:nnN {#1} {#2}
- \@@_object_ref_indexed:nnn
+ \@@_object_ref_indexed:Nn
}
-\cs_new:Npn \@@_object_ref_indexed:nnn #1#2#3
+\cs_new:Npn \@@_object_ref_indexed:Nn #1#2
{
\exp_args:Ne \@@_backend_object_ref:n
- { \intarray_item:cn { g_@@_object_ #1 _ #2 _intarray } {#3} }
+ { \intarray_item:Nn #1 {#2} }
}
\cs_new:Npn \@@_object_indexed_split:nnN #1#2#3
{
\use:e
{
\exp_not:N #3
- {#1}
- {
- \int_eval:n
- { \int_div_truncate:nn {#2} \c_@@_object_block_int }
- }
- {
- \int_eval:n
- { \int_mod:nn {#2} \c_@@_object_block_int }
- }
+ \exp_not:c
+ {
+ g_@@_object_ #1 _
+ \int_eval:n
+ { \int_div_truncate:nn {#2} \c_@@_object_block_int }
+ _intarray
+ }
+ {
+ \int_eval:n
+ { \int_mod:nn {#2} \c_@@_object_block_int }
+ }
}
}
% \end{macrocode}
More information about the latex3-commits
mailing list.