From bb24aab36b14425d5408e5c0c889c83a70cc7a5a Mon Sep 17 00:00:00 2001
From: Norbert Preining <norbert@preining.info>
Date: Tue, 19 May 2020 03:03:34 +0000
Subject: CTAN sync 202005190303

---
 macros/latex/contrib/l3experimental/l3pdf.dtx | 41 ++++++++++++++++++++-------
 1 file changed, 31 insertions(+), 10 deletions(-)

(limited to 'macros/latex/contrib/l3experimental/l3pdf.dtx')

diff --git a/macros/latex/contrib/l3experimental/l3pdf.dtx b/macros/latex/contrib/l3experimental/l3pdf.dtx
index dc36f172fa..2b9f2564e7 100644
--- a/macros/latex/contrib/l3experimental/l3pdf.dtx
+++ b/macros/latex/contrib/l3experimental/l3pdf.dtx
@@ -46,7 +46,7 @@
 %    }^^A
 % }
 %
-% \date{Released 2020-01-12}
+% \date{Released 2020-05-18}
 %
 % \maketitle
 %
@@ -71,7 +71,13 @@
 %   The object may be referenced from this point on, and written later
 %   using \cs{pdf_object_write:nn}.
 % \end{function}
-%
+% \begin{function}[EXP, pTF, added=2020-05-15]{\pdf_object_if_exist:n}
+%   \begin{syntax}
+%    \cs{pdf_object_if_exist_p:n} \Arg{object}
+%    \cs{pdf_object_if_exist:nTF} \Arg{object}
+%   \end{syntax}
+%   Tests whether an object with name \Arg{object} has been defined.
+% \end{function}
 % \begin{function}[added = 2019-06-02]
 %   {\pdf_object_write:nn, \pdf_object_write:nx}
 %   \begin{syntax}
@@ -185,11 +191,18 @@
 %
 %    \begin{macrocode}
 %<*package>
-\ProvidesExplPackage{l3pdf}{2020-01-12}{}
+\ProvidesExplPackage{l3pdf}{2020-05-18}{}
   {L3 Experimental core PDF support}
 %</package>
 %    \end{macrocode}
 %
+% \begin{variable}{\s_@@_stop}
+%   Internal scan marks.
+%    \begin{macrocode}
+\scan_new:N \s_@@_stop
+%    \end{macrocode}
+% \end{variable}
+%
 % \begin{variable}{\g_@@_init_bool}
 %   A flag so we have some chance of avoiding setting things we are not
 %   allowed to.
@@ -224,6 +237,7 @@
 % \subsection{Objects}
 %
 % \begin{macro}{\pdf_object_new:nn, \pdf_object_write:nn, \pdf_object_write:nx}
+% \begin{macro}[pTF]{\pdf_object_if_exist:n}
 % \begin{macro}{\pdf_object_ref:n}
 % \begin{macro}{\pdf_object_now:nn, \pdf_object_now:nx}
 % \begin{macro}{\pdf_object_last:}
@@ -231,6 +245,12 @@
 %    \begin{macrocode}
 \cs_new_protected:Npn \pdf_object_new:nn #1#2
   { \@@_backend_object_new:nn {#1} {#2} }
+\prg_new_conditional:Npnn \pdf_object_if_exist:n #1 { p , T , F , TF }
+  {
+    \int_if_exist:cTF { c__pdf_backend_object_ \tl_to_str:n {#1} _int }
+     { \prg_return_true: }
+     { \prg_return_false:}
+  }
 \cs_new_protected:Npn \pdf_object_write:nn #1#2
   { \@@_backend_object_write:nn {#1} {#2} }
 \cs_generate_variant:Nn \pdf_object_write:nn { nx }
@@ -244,6 +264,7 @@
 % \end{macro}
 % \end{macro}
 % \end{macro}
+% \end{macro}
 %
 % \subsection{Version}
 %
@@ -258,8 +279,8 @@
 %   To compare version, we need to split the given value then deal with both
 %   major and minor version
 \prg_new_conditional:Npnn \pdf_version_compare:Nn #1#2 { p , T , F , TF }
-  { \use:c { @@_version_compare_ #1 :w } #2 . . \q_stop }
-\cs_new:cpn { @@_version_compare_=:w } #1 . #2 . #3 \q_stop
+  { \use:c { @@_version_compare_ #1 :w } #2 . . \s_@@_stop }
+\cs_new:cpn { @@_version_compare_=:w } #1 . #2 . #3 \s_@@_stop
  {
    \bool_lazy_and:nnTF
     { \int_compare_p:nNn \@@_backend_version_major: = {#1} }
@@ -267,7 +288,7 @@
     { \prg_return_true: }
     { \prg_return_false: }
  }
-\cs_new:cpn { @@_version_compare_<:w } #1 . #2 . #3 \q_stop
+\cs_new:cpn { @@_version_compare_<:w } #1 . #2 . #3 \s_@@_stop
  {
    \bool_lazy_or:nnTF
     { \int_compare_p:nNn \@@_backend_version_major: < {#1} }
@@ -279,7 +300,7 @@
     { \prg_return_true: }
     { \prg_return_false: }
  }
-\cs_new:cpn { @@_version_compare_>:w } #1 . #2 . #3 \q_stop
+\cs_new:cpn { @@_version_compare_>:w } #1 . #2 . #3 \s_@@_stop
  {
    \bool_lazy_or:nnTF
     { \int_compare_p:nNn \@@_backend_version_major: > {#1} }
@@ -300,13 +321,13 @@
 %   Split the version and set.
 %    \begin{macrocode}
 \cs_new_protected:Npn \pdf_version_gset:n #1
-  { \@@_version_gset:w  #1 . . \q_stop }
+  { \@@_version_gset:w  #1 . . \s_@@_stop }
 \cs_new_protected:Npn \pdf_version_min_gset:n #1
   {
     \pdf_version_compare:NnT < {#1}
-      { \@@_version_gset:w  #1 . . \q_stop }
+      { \@@_version_gset:w  #1 . . \s_@@_stop }
   }
-\cs_new_protected:Npn \@@_version_gset:w  #1 . #2 . #3\q_stop
+\cs_new_protected:Npn \@@_version_gset:w  #1 . #2 . #3\s_@@_stop
   {
     \bool_if:NF \g_@@_init_bool
       {
-- 
cgit v1.2.3

