[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
branch master updated: * tp/Texinfo/XS/convert/convert_html.c (html_comm
From: |
Patrice Dumas |
Subject: |
branch master updated: * tp/Texinfo/XS/convert/convert_html.c (html_command_id): set return const. |
Date: |
Sat, 17 Feb 2024 17:32:30 -0500 |
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 396df9c5ac * tp/Texinfo/XS/convert/convert_html.c (html_command_id):
set return const.
396df9c5ac is described below
commit 396df9c5ac03018e8345e01e7253f5f983a2002a
Author: Patrice Dumas <pertusus@free.fr>
AuthorDate: Sat Feb 17 23:32:27 2024 +0100
* tp/Texinfo/XS/convert/convert_html.c (html_command_id): set return
const.
* tp/Texinfo/XS/convert/ConvertXS.xs: set const for elements returned
by element_converter_from_sv.
---
ChangeLog | 8 ++++++++
tp/Texinfo/Convert/HTML.pm | 2 +-
tp/Texinfo/XS/convert/ConvertXS.xs | 22 +++++++++++-----------
tp/Texinfo/XS/convert/convert_html.c | 2 +-
tp/Texinfo/XS/convert/convert_html.h | 2 +-
5 files changed, 22 insertions(+), 14 deletions(-)
diff --git a/ChangeLog b/ChangeLog
index ad5d23a9f6..a5f2a33a2c 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,11 @@
+2024-02-17 Patrice Dumas <pertusus@free.fr>
+
+ * tp/Texinfo/XS/convert/convert_html.c (html_command_id): set return
+ const.
+
+ * tp/Texinfo/XS/convert/ConvertXS.xs: set const for elements returned
+ by element_converter_from_sv.
+
2024-02-17 Patrice Dumas <pertusus@free.fr>
* doc/texi2any_api.texi (Element Direction Information Type),
diff --git a/tp/Texinfo/Convert/HTML.pm b/tp/Texinfo/Convert/HTML.pm
index ea33df63e2..ecd1c0a81d 100644
--- a/tp/Texinfo/Convert/HTML.pm
+++ b/tp/Texinfo/Convert/HTML.pm
@@ -1556,7 +1556,7 @@ my %valid_direction_return_type = (
# a string that can be used in a href linking to the direction
'href' => 1,
# a string representing the direction that can be used in
- # context where only entities are available (attributes)
+ # context where only entities are available (ie with HTML attributes)
'string' => 1,
# a string representing the direction to be used in contexts
# not restricted in term of available formatting (ie with HTML elements)
diff --git a/tp/Texinfo/XS/convert/ConvertXS.xs
b/tp/Texinfo/XS/convert/ConvertXS.xs
index ef4dca5ca1..740dc3d02f 100644
--- a/tp/Texinfo/XS/convert/ConvertXS.xs
+++ b/tp/Texinfo/XS/convert/ConvertXS.xs
@@ -962,8 +962,8 @@ SV *
html_command_id (SV *converter_in, SV *element_sv)
PREINIT:
CONVERTER *self;
- char *id = 0;
- ELEMENT *element;
+ const char *id = 0;
+ const ELEMENT *element;
CODE:
element = element_converter_from_sv (converter_in, element_sv,
"html_command_id", &self);
@@ -983,7 +983,7 @@ html_command_contents_target (SV *converter_in, SV
*element_sv, cmdname)
PREINIT:
CONVERTER *self;
char *id = 0;
- ELEMENT *element;
+ const ELEMENT *element;
CODE:
element = element_converter_from_sv (converter_in, element_sv,
"html_command_contents_target",
@@ -1006,7 +1006,7 @@ html_footnote_location_target (SV *converter_in, SV
*element_sv)
PREINIT:
CONVERTER *self;
char *id = 0;
- ELEMENT *element;
+ const ELEMENT *element;
CODE:
element = element_converter_from_sv (converter_in, element_sv,
"html_footnote_location_target",
@@ -1026,7 +1026,7 @@ html_command_filename (SV *converter_in, SV *element_sv)
PREINIT:
CONVERTER *self;
const char *filename = 0;
- ELEMENT *element;
+ const ELEMENT *element;
CODE:
element = element_converter_from_sv (converter_in, element_sv,
"html_command_filename",
@@ -1095,7 +1095,7 @@ html_internal_command_href (SV *converter_in, SV
*element_sv, SV *source_filenam
PREINIT:
CONVERTER *self;
char *href = 0;
- ELEMENT *element;
+ const ELEMENT *element;
CODE:
element = element_converter_from_sv (converter_in, element_sv,
"html_internal_command_href", &self);
@@ -1128,7 +1128,7 @@ html_command_contents_href (SV *converter_in, SV
*element_sv, cmdname, SV *sourc
PREINIT:
CONVERTER *self;
char *href = 0;
- ELEMENT *element;
+ const ELEMENT *element;
CODE:
element = element_converter_from_sv (converter_in, element_sv,
"html_command_contents_href", &self);
@@ -1158,7 +1158,7 @@ html_footnote_location_href (SV *converter_in, SV
*element_sv, SV *source_filena
PREINIT:
CONVERTER *self;
char *href = 0;
- ELEMENT *element;
+ const ELEMENT *element;
CODE:
element = element_converter_from_sv (converter_in, element_sv,
"html_footnote_location_href", &self);
@@ -1190,7 +1190,7 @@ html_internal_command_tree (SV *converter_in, SV
*element_sv, SV* no_number_sv)
PREINIT:
CONVERTER *self;
ELEMENT *command_tree = 0;
- ELEMENT *element;
+ const ELEMENT *element;
CODE:
element = element_converter_from_sv (converter_in, element_sv,
"html_internal_command_tree", &self);
@@ -1221,7 +1221,7 @@ html_internal_command_text (SV *converter_in, SV
*element_sv, char *type)
PREINIT:
CONVERTER *self;
char *text = 0;
- ELEMENT *element;
+ const ELEMENT *element;
CODE:
element = element_converter_from_sv (converter_in, element_sv,
"html_internal_command_text", &self);
@@ -2159,7 +2159,7 @@ html_prepare_node_redirection_page (SV *converter_in, SV
*element_sv, redirectio
PREINIT:
CONVERTER *self;
char *redirection_page = 0;
- ELEMENT *element;
+ const ELEMENT *element;
CODE:
element = element_converter_from_sv (converter_in, element_sv,
"html_prepare_node_redirection_page", &self);
diff --git a/tp/Texinfo/XS/convert/convert_html.c
b/tp/Texinfo/XS/convert/convert_html.c
index 6ed9593c26..df96c69c36 100644
--- a/tp/Texinfo/XS/convert/convert_html.c
+++ b/tp/Texinfo/XS/convert/convert_html.c
@@ -2951,7 +2951,7 @@ html_get_target (CONVERTER *self, const ELEMENT *element)
return result;
}
-char *
+const char *
html_command_id (CONVERTER *self, const ELEMENT *command)
{
HTML_TARGET *target_info = html_get_target (self, command);
diff --git a/tp/Texinfo/XS/convert/convert_html.h
b/tp/Texinfo/XS/convert/convert_html.h
index 656ebc5c68..f11ff0e723 100644
--- a/tp/Texinfo/XS/convert/convert_html.h
+++ b/tp/Texinfo/XS/convert/convert_html.h
@@ -94,7 +94,7 @@ int html_special_unit_variety_direction_index (CONVERTER
*self,
char *special_unit_variety);
HTML_TARGET *html_get_target (CONVERTER *self, const ELEMENT *element);
-char *html_command_id (CONVERTER *self, const ELEMENT *command);
+const char *html_command_id (CONVERTER *self, const ELEMENT *command);
char *html_command_contents_target (CONVERTER *self, const ELEMENT *command,
enum command_id contents_or_shortcontents);
char *html_footnote_location_target (CONVERTER *self, const ELEMENT *command);
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- branch master updated: * tp/Texinfo/XS/convert/convert_html.c (html_command_id): set return const.,
Patrice Dumas <=