texinfo-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[no subject]


From: Patrice Dumas
Date: Mon, 30 Sep 2024 12:46:56 -0400 (EDT)

branch: master
commit 5630de0e6f83fa2c44fdcc8a41153a7f4672a739
Author: Patrice Dumas <pertusus@free.fr>
AuthorDate: Sun Jul 21 12:14:38 2024 +0200

    * tp/Texinfo/XS/convert/ConvertXS.xs (converter_set_document_from_sv),
    tp/Texinfo/XS/convert/converter.c (converter_set_document),
    tp/Texinfo/XS/main/get_perl_info.c (converter_set_document_from_sv):
    rename converter_set_document as converter_set_document_from_sv in
    get_perl_info.c.  Add converter_set_document in converter.c to do the
    C part of converter_set_document_from_sv.
---
 ChangeLog                                       |  9 +++++++++
 tp/Texinfo/XS/convert/ConvertXS.xs              |  2 +-
 tp/Texinfo/XS/convert/converter.c               | 19 +++++++++++++++++++
 tp/Texinfo/XS/convert/converter.h               |  2 ++
 tp/Texinfo/XS/convert/get_converter_perl_info.c | 17 ++---------------
 tp/Texinfo/XS/convert/get_converter_perl_info.h |  6 ------
 tp/Texinfo/XS/main/get_perl_info.h              |  5 +++++
 7 files changed, 38 insertions(+), 22 deletions(-)

diff --git a/ChangeLog b/ChangeLog
index 83a48ca2f7..0ec12dfb01 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,12 @@
+2024-07-21  Patrice Dumas  <pertusus@free.fr>
+
+       * tp/Texinfo/XS/convert/ConvertXS.xs (converter_set_document_from_sv),
+       tp/Texinfo/XS/convert/converter.c (converter_set_document),
+       tp/Texinfo/XS/main/get_perl_info.c (converter_set_document_from_sv):
+       rename converter_set_document as converter_set_document_from_sv in
+       get_perl_info.c.  Add converter_set_document in converter.c to do the
+       C part of converter_set_document_from_sv.
+
 2024-07-21  Patrice Dumas  <pertusus@free.fr>
 
        * tp/Texinfo/Common.pm (set_output_encoding)
diff --git a/tp/Texinfo/XS/convert/ConvertXS.xs 
b/tp/Texinfo/XS/convert/ConvertXS.xs
index b92f2df3eb..880668ffd9 100644
--- a/tp/Texinfo/XS/convert/ConvertXS.xs
+++ b/tp/Texinfo/XS/convert/ConvertXS.xs
@@ -95,7 +95,7 @@ converter_initialize (SV *converter_in)
            }
 
 void
-converter_set_document (SV *converter_in, SV *document_in)
+converter_set_document_from_sv (SV *converter_in, SV *document_in)
 
 
 void
diff --git a/tp/Texinfo/XS/convert/converter.c 
b/tp/Texinfo/XS/convert/converter.c
index 5aa87e998d..433e2ba52f 100644
--- a/tp/Texinfo/XS/convert/converter.c
+++ b/tp/Texinfo/XS/convert/converter.c
@@ -155,6 +155,25 @@ unregister_converter_descriptor (int converter_descriptor)
     }
 }
 
+void
+converter_set_document (CONVERTER *converter, DOCUMENT *document)
+{
+   /*
+  if (document)
+    {
+      fprintf (stderr, "XS|CONVERTER %d: Document %d\n",
+           converter->converter_descriptor, document->descriptor);
+    }
+    */
+
+  converter->document = document;
+
+  set_output_encoding (converter->conf, converter->document);
+
+  converter->convert_text_options
+    = copy_converter_options_for_convert_text (converter);
+}
+
 
 
 static void
diff --git a/tp/Texinfo/XS/convert/converter.h 
b/tp/Texinfo/XS/convert/converter.h
index 0e91b9165c..5053018087 100644
--- a/tp/Texinfo/XS/convert/converter.h
+++ b/tp/Texinfo/XS/convert/converter.h
@@ -85,6 +85,8 @@ CONVERTER *retrieve_converter (int converter_descriptor);
 size_t new_converter (void);
 void unregister_converter_descriptor (int converter_descriptor);
 
+void converter_set_document (CONVERTER *converter, DOCUMENT *document);
+
 int set_conf (OPTION *option, int int_value, const char *char_value);
 void force_conf (OPTION *option, int int_value, const char *char_value);
 
diff --git a/tp/Texinfo/XS/convert/get_converter_perl_info.c 
b/tp/Texinfo/XS/convert/get_converter_perl_info.c
index 0320486aac..f37122c2fa 100644
--- a/tp/Texinfo/XS/convert/get_converter_perl_info.c
+++ b/tp/Texinfo/XS/convert/get_converter_perl_info.c
@@ -69,7 +69,7 @@ get_sv_converter (SV *sv_in, const char *warn_string)
 }
 
 void
-converter_set_document (SV *converter_in, SV *document_in)
+converter_set_document_from_sv (SV *converter_in, SV *document_in)
 {
   CONVERTER *converter;
   DOCUMENT *document;
@@ -79,20 +79,7 @@ converter_set_document (SV *converter_in, SV *document_in)
   converter = get_sv_converter (converter_in, "converter_set_document");
   document = get_sv_document_document (document_in, 0);
 
-   /*
-  if (document)
-    {
-      fprintf (stderr, "XS|CONVERTER %d: Document %d\n",
-           converter->converter_descriptor, document->descriptor);
-    }
-    */
-
-  converter->document = document;
-
-  set_output_encoding (converter->conf, converter->document);
-
-  converter->convert_text_options
-    = copy_converter_options_for_convert_text (converter);
+  converter_set_document (converter, document);
 }
 
 void
diff --git a/tp/Texinfo/XS/convert/get_converter_perl_info.h 
b/tp/Texinfo/XS/convert/get_converter_perl_info.h
index c9785d3bf5..d33ea554e0 100644
--- a/tp/Texinfo/XS/convert/get_converter_perl_info.h
+++ b/tp/Texinfo/XS/convert/get_converter_perl_info.h
@@ -9,12 +9,6 @@
 
 struct TEXT_OPTIONS;
 
-CONVERTER *get_sv_converter (SV *sv_in, const char *warn_string);
-int converter_initialize (SV *converter_sv);
-
-void converter_set_document (SV *converter_in, SV *document_in);
-void reset_output_init_conf (SV *sv_in);
-
 struct TEXT_OPTIONS *copy_sv_options_for_convert_text (SV *sv_in);
 
 #endif
diff --git a/tp/Texinfo/XS/main/get_perl_info.h 
b/tp/Texinfo/XS/main/get_perl_info.h
index 4642f99c8a..f7e846bda5 100644
--- a/tp/Texinfo/XS/main/get_perl_info.h
+++ b/tp/Texinfo/XS/main/get_perl_info.h
@@ -43,6 +43,11 @@ void copy_converter_conf_sv (HV *hv, CONVERTER *converter,
 void set_sv_conf (CONVERTER *converter, const char *conf, SV *value);
 void force_sv_conf (CONVERTER *converter, const char *conf, SV *value);
 
+CONVERTER *get_sv_converter (SV *sv_in, const char *warn_string);
+int converter_initialize (SV *converter_sv);
+void reset_output_init_conf (SV *sv_in);
+void converter_set_document_from_sv (SV *converter_in, SV *document_in);
+
 INDEX_ENTRY *find_index_entry_sv (const SV *index_entry_sv,
                      INDEX_LIST *indices_info,
                      const char *warn_string, const INDEX **entry_idx,



reply via email to

[Prev in Thread] Current Thread [Next in Thread]