[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
branch master updated: * tp/Texinfo/XS/convert/ConvertXS.xs (destroy, re
From: |
Patrice Dumas |
Subject: |
branch master updated: * tp/Texinfo/XS/convert/ConvertXS.xs (destroy, reset_converter): use C converter self->format to determine which function to call. |
Date: |
Fri, 04 Oct 2024 06:11:04 -0400 |
This is an automated email from the git hooks/post-receive script.
pertusus pushed a commit to branch master
in repository texinfo.
The following commit(s) were added to refs/heads/master by this push:
new e083d0500d * tp/Texinfo/XS/convert/ConvertXS.xs (destroy,
reset_converter): use C converter self->format to determine which function to
call.
e083d0500d is described below
commit e083d0500dcb787f904b35b7eda099195f8e171c
Author: Patrice Dumas <pertusus@free.fr>
AuthorDate: Sun Aug 11 13:06:42 2024 +0200
* tp/Texinfo/XS/convert/ConvertXS.xs (destroy, reset_converter): use C
converter self->format to determine which function to call.
* tp/Texinfo/XS/convert/ConvertXS.xs (html_converter_defaults): ignore
the arguments.
---
ChangeLog | 8 ++++++++
tp/Texinfo/XS/convert/ConvertXS.xs | 41 ++++++++++++++------------------------
2 files changed, 23 insertions(+), 26 deletions(-)
diff --git a/ChangeLog b/ChangeLog
index 033f6e6996..8f083a401d 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,11 @@
+2024-08-11 Patrice Dumas <pertusus@free.fr>
+
+ * tp/Texinfo/XS/convert/ConvertXS.xs (destroy, reset_converter): use C
+ converter self->format to determine which function to call.
+
+ * tp/Texinfo/XS/convert/ConvertXS.xs (html_converter_defaults): ignore
+ the arguments.
+
2024-08-11 Patrice Dumas <pertusus@free.fr>
* tp/Texinfo/XS/convert/converter.c (find_format_data_index),
diff --git a/tp/Texinfo/XS/convert/ConvertXS.xs
b/tp/Texinfo/XS/convert/ConvertXS.xs
index 4d8f8a66f5..24b9fbb956 100644
--- a/tp/Texinfo/XS/convert/ConvertXS.xs
+++ b/tp/Texinfo/XS/convert/ConvertXS.xs
@@ -523,41 +523,28 @@ get_converter_errors (SV *converter_in)
void
reset_converter (SV *converter_in)
PREINIT:
- CONVERTER *self = 0;
- HV *stash;
- const char *name;
+ CONVERTER *self;
CODE:
- stash = SvSTASH (SvRV (converter_in));
- name = HvNAME (stash);
- if (!strcmp (name, "Texinfo::Convert::HTML"))
+ self = get_sv_converter (converter_in, 0);
+ if (self)
{
- self = get_sv_converter (converter_in, "reset html converter");
- html_reset_converter (self);
+ if (self->format == COF_html)
+ html_reset_converter (self);
}
void
destroy (SV *converter_in)
PREINIT:
- CONVERTER *self = 0;
- HV *stash;
- const char *name;
+ CONVERTER *self;
CODE:
- stash = SvSTASH (SvRV (converter_in));
- name = HvNAME (stash);
- if (!strcmp (name, "Texinfo::Convert::HTML"))
- {
- self = get_sv_converter (converter_in, "destroy html");
- html_free_converter (self);
- }
- /*
- else if (!strcmp (name, "Texinfo::Convert::Text"))
+ self = get_sv_converter (converter_in, 0);
+ if (self)
{
- self = get_sv_converter (converter_in, "destroy text");
- text_destroy (self);
+ if (self->format == COF_html)
+ html_free_converter (self);
+
+ unregister_converter_descriptor (self->converter_descriptor);
}
- */
- if (self)
- unregister_converter_descriptor (self->converter_descriptor);
SV *
plain_texinfo_convert_tree (SV *tree_in)
@@ -658,8 +645,10 @@ html_converter_initialize_sv (SV *converter_in, SV
*default_formatting_reference
html_fill_options_directions (self->conf, self);
# do nothing as everything is already set in C
+# $converter, $conf
SV *
-html_converter_defaults (SV *converter_in, SV *conf_sv)
+html_converter_defaults (...)
+ PROTOTYPE: $$
PREINIT:
HV *format_defaults_hv;
CODE:
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- branch master updated: * tp/Texinfo/XS/convert/ConvertXS.xs (destroy, reset_converter): use C converter self->format to determine which function to call.,
Patrice Dumas <=