[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
branch master updated: * tp/Texinfo/XS/main/unicode.c (string_from_utf8)
From: |
Patrice Dumas |
Subject: |
branch master updated: * tp/Texinfo/XS/main/unicode.c (string_from_utf8): cast to char * before using strdup. |
Date: |
Thu, 22 Feb 2024 18:43:21 -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 36dc60bdef * tp/Texinfo/XS/main/unicode.c (string_from_utf8): cast to
char * before using strdup.
36dc60bdef is described below
commit 36dc60bdef16ce59a37383dba85b71af384db762
Author: Patrice Dumas <pertusus@free.fr>
AuthorDate: Fri Feb 23 00:43:14 2024 +0100
* tp/Texinfo/XS/main/unicode.c (string_from_utf8): cast to char *
before using strdup.
* tp/Texinfo/XS/main/unicode.c (utf8_from_string, string_from_utf8):
change comment to avoid compiler warning.
---
ChangeLog | 8 ++++++++
tp/Texinfo/XS/main/unicode.c | 6 +++---
2 files changed, 11 insertions(+), 3 deletions(-)
diff --git a/ChangeLog b/ChangeLog
index 865b416b7c..30553de746 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,11 @@
+2024-02-22 Patrice Dumas <pertusus@free.fr>
+
+ * tp/Texinfo/XS/main/unicode.c (string_from_utf8): cast to char *
+ before using strdup.
+
+ * tp/Texinfo/XS/main/unicode.c (utf8_from_string, string_from_utf8):
+ change comment to avoid compiler warning.
+
2024-02-22 Patrice Dumas <pertusus@free.fr>
* tp/Texinfo/XS/main/targets.c (existing_label_error)
diff --git a/tp/Texinfo/XS/main/unicode.c b/tp/Texinfo/XS/main/unicode.c
index 574f0181b3..6f1bd3b40a 100644
--- a/tp/Texinfo/XS/main/unicode.c
+++ b/tp/Texinfo/XS/main/unicode.c
@@ -42,7 +42,7 @@ utf8_from_string (const char *text)
/* TODO error checking? */
return (uint8_t *) strdup (text);
- /* With uniconv/* gnulib module this could be the following, although
+ /* With uniconv gnulib module this could be the following, although
this pulls in quite a few other gnulib module dependencies. */
/* return u8_strconv_from_encoding (text, "UTF-8", iconveh_question_mark); */
}
@@ -50,8 +50,8 @@ utf8_from_string (const char *text)
char *
string_from_utf8 (const uint8_t *encoded_u8)
{
- return (char *) strdup (encoded_u8);
- /* With uniconv/* gnulib module this could be the following, although
+ return strdup ((char *) encoded_u8);
+ /* With uniconv gnulib module this could be the following, although
this pulls in quite a few other gnulib module dependencies. */
/* return u8_strconv_to_encoding (encoded_u8, "UTF-8",
iconveh_question_mark); */
}
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- branch master updated: * tp/Texinfo/XS/main/unicode.c (string_from_utf8): cast to char * before using strdup.,
Patrice Dumas <=