[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
branch master updated: * tp/Texinfo/XS/xspara.c (xspara__print_escaped_s
From: |
Gavin D. Smith |
Subject: |
branch master updated: * tp/Texinfo/XS/xspara.c (xspara__print_escaped_spaces): Avoid unnecessary use of malloc/free. malloc/free would require use of dTHX on MS-Windows. Report from Eli Zaretskii. |
Date: |
Sat, 07 Oct 2023 12:20:52 -0400 |
This is an automated email from the git hooks/post-receive script.
gavin pushed a commit to branch master
in repository texinfo.
The following commit(s) were added to refs/heads/master by this push:
new b74fc3cd6e * tp/Texinfo/XS/xspara.c (xspara__print_escaped_spaces):
Avoid unnecessary use of malloc/free. malloc/free would require use of dTHX on
MS-Windows. Report from Eli Zaretskii.
b74fc3cd6e is described below
commit b74fc3cd6ed50f54f9c62e204837bfc2ff96d237
Author: Gavin Smith <gavinsmith0123@gmail.com>
AuthorDate: Sat Oct 7 17:20:42 2023 +0100
* tp/Texinfo/XS/xspara.c (xspara__print_escaped_spaces):
Avoid unnecessary use of malloc/free. malloc/free would
require use of dTHX on MS-Windows. Report from Eli Zaretskii.
---
ChangeLog | 6 ++++++
tp/Texinfo/XS/xspara.c | 3 +--
2 files changed, 7 insertions(+), 2 deletions(-)
diff --git a/ChangeLog b/ChangeLog
index 01d61f022d..b0bd8f39bc 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2023-10-07 Gavin Smith <gavinsmith0123@gmail.com>
+
+ * tp/Texinfo/XS/xspara.c (xspara__print_escaped_spaces):
+ Avoid unnecessary use of malloc/free. malloc/free would
+ require use of dTHX on MS-Windows. Report from Eli Zaretskii.
+
2023-09-30 Gavin Smith <gavinsmith0123@gmail.com>
pretest 7.0.93
diff --git a/tp/Texinfo/XS/xspara.c b/tp/Texinfo/XS/xspara.c
index 965d2c5466..efb645f14c 100644
--- a/tp/Texinfo/XS/xspara.c
+++ b/tp/Texinfo/XS/xspara.c
@@ -253,10 +253,9 @@ xspara__print_escaped_spaces (char *string)
text_append_n (&t, "\\f", 2);
else if (isspace(*p))
{
- char *protected_string = malloc (7 * sizeof (char));
+ char protected_string[7];
sprintf (protected_string, "\\x%04x", *p);
text_append (&t, protected_string);
- free (protected_string);
}
p++;
}
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- branch master updated: * tp/Texinfo/XS/xspara.c (xspara__print_escaped_spaces): Avoid unnecessary use of malloc/free. malloc/free would require use of dTHX on MS-Windows. Report from Eli Zaretskii.,
Gavin D. Smith <=