[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
branch master updated: * tp/Texinfo/XS/Makefile.am (MiscXS_la_CPPFLAGS,
From: |
Patrice Dumas |
Subject: |
branch master updated: * tp/Texinfo/XS/Makefile.am (MiscXS_la_CPPFLAGS, MiscXS_la_LIBADD), tp/Texinfo/XS/MiscXS.xs, tp/Texinfo/XS/misc.c: there is no use of gnulib anymore in MiscXS, remove the gnulib/autoconf flags and includes, in particular do not include config.h. |
Date: |
Thu, 14 Nov 2024 13:15:34 -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 fac78a49c9 * tp/Texinfo/XS/Makefile.am (MiscXS_la_CPPFLAGS,
MiscXS_la_LIBADD), tp/Texinfo/XS/MiscXS.xs, tp/Texinfo/XS/misc.c: there is no
use of gnulib anymore in MiscXS, remove the gnulib/autoconf flags and includes,
in particular do not include config.h.
fac78a49c9 is described below
commit fac78a49c9b51f4888ef1ac7487d05eb40fb7515
Author: Patrice Dumas <pertusus@free.fr>
AuthorDate: Thu Nov 14 19:15:18 2024 +0100
* tp/Texinfo/XS/Makefile.am (MiscXS_la_CPPFLAGS, MiscXS_la_LIBADD),
tp/Texinfo/XS/MiscXS.xs, tp/Texinfo/XS/misc.c: there is no use of
gnulib anymore in MiscXS, remove the gnulib/autoconf flags and
includes, in particular do not include config.h.
* tp/Texinfo/XS/MiscXS.xs (xs_parse_command_name)
(xs_parse_texi_regex), tp/Texinfo/XS/misc.c (xs_process_text)
(xs_unicode_text, xs_entity_text, xs_parse_command_name)
(xs_parse_texi_regex): use SvPVutf8_nolen in MiscXS.xs, not in C code.
Remove useless Perl macros, remove Perl includes as there is no C Perl
anymore in misc.c.
---
ChangeLog | 14 ++++++++++++
tp/Texinfo/XS/Makefile.am | 4 ++--
tp/Texinfo/XS/MiscXS.xs | 12 ++---------
tp/Texinfo/XS/misc.c | 55 ++---------------------------------------------
tp/Texinfo/XS/miscxs.h | 4 ++--
5 files changed, 22 insertions(+), 67 deletions(-)
diff --git a/ChangeLog b/ChangeLog
index bcb8ab19cf..f710fcf631 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,17 @@
+2024-11-14 Patrice Dumas <pertusus@free.fr>
+
+ * tp/Texinfo/XS/Makefile.am (MiscXS_la_CPPFLAGS, MiscXS_la_LIBADD),
+ tp/Texinfo/XS/MiscXS.xs, tp/Texinfo/XS/misc.c: there is no use of
+ gnulib anymore in MiscXS, remove the gnulib/autoconf flags and
+ includes, in particular do not include config.h.
+
+ * tp/Texinfo/XS/MiscXS.xs (xs_parse_command_name)
+ (xs_parse_texi_regex), tp/Texinfo/XS/misc.c (xs_process_text)
+ (xs_unicode_text, xs_entity_text, xs_parse_command_name)
+ (xs_parse_texi_regex): use SvPVutf8_nolen in MiscXS.xs, not in C code.
+ Remove useless Perl macros, remove Perl includes as there is no C Perl
+ anymore in misc.c.
+
2024-11-14 Gavin Smith <gavinsmith0123@gmail.com>
* tp/Texinfo/XS: run "gnulib-tool --remove-import copy-file".
diff --git a/tp/Texinfo/XS/Makefile.am b/tp/Texinfo/XS/Makefile.am
index 7bb04b9041..b13985d93d 100644
--- a/tp/Texinfo/XS/Makefile.am
+++ b/tp/Texinfo/XS/Makefile.am
@@ -85,9 +85,9 @@ xs_LTLIBRARIES += MiscXS.la
nodist_MiscXS_la_SOURCES = MiscXS.c
CLEANFILES += MiscXS.c
MiscXS_la_SOURCES = misc.c miscxs.h ppport.h
-MiscXS_la_CPPFLAGS = $(AM_CPPFLAGS) $(GNULIB_CPPFLAGS) $(XSLIBS_CPPFLAGS)
+MiscXS_la_CPPFLAGS = $(AM_CPPFLAGS) $(XSLIBS_CPPFLAGS)
MiscXS_la_CFLAGS = $(XSLIBS_CFLAGS)
-MiscXS_la_LIBADD = $(builddir)/gnulib/lib/libgnu.la $(platform_PERL_LIBADD)
+MiscXS_la_LIBADD = $(platform_PERL_LIBADD)
MiscXS_la_LDFLAGS = $(XSLIBS_LDFLAGS)
xs_LTLIBRARIES += XSParagraph.la
diff --git a/tp/Texinfo/XS/MiscXS.xs b/tp/Texinfo/XS/MiscXS.xs
index 1307474212..43a05c1882 100644
--- a/tp/Texinfo/XS/MiscXS.xs
+++ b/tp/Texinfo/XS/MiscXS.xs
@@ -13,17 +13,9 @@
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>. */
-#ifdef HAVE_CONFIG_H
- #include <config.h>
-#endif
-
#define PERL_NO_GET_CONTEXT
#include "EXTERN.h"
#include "perl.h"
-#if defined _WIN32 && !defined __CYGWIN__
-/* See comment in XSParagraph.xs for why we #undef free. */
-# undef free
-#endif
#include "XSUB.h"
#include "miscxs.h"
@@ -83,7 +75,7 @@ xs_entity_text (text)
void
xs_parse_command_name (text)
- SV *text
+ char *text = (char *)SvPVutf8_nolen ($arg);
PREINIT:
char *command;
int is_single_letter;
@@ -100,7 +92,7 @@ xs_parse_command_name (text)
void
xs_parse_texi_regex (text)
- SV *text
+ char *text = (char *)SvPVutf8_nolen ($arg);
PREINIT:
char *arobase;
char *open_brace;
diff --git a/tp/Texinfo/XS/misc.c b/tp/Texinfo/XS/misc.c
index de62bbfb94..c895332535 100644
--- a/tp/Texinfo/XS/misc.c
+++ b/tp/Texinfo/XS/misc.c
@@ -13,35 +13,10 @@
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>. */
-#ifdef HAVE_CONFIG_H
- #include <config.h>
-#endif
#include <stdlib.h>
#include <stdio.h>
#include <string.h>
-#include <locale.h>
-#ifndef _WIN32
-#include <langinfo.h>
-#else /* _WIN32 */
-/* Workaround for problems caused in mingw.org's MinGW build by
- Gnulib's wchar.h overriding the wint_t type definition, which
- causes compilation errors when perl.h is included below, because
- perl.h includes ctype.h. */
#include <ctype.h>
-#endif
-#include <wchar.h>
-#include <wctype.h>
-
-/* See "How do I use all this in extensions" in 'man perlguts'. */
-#define PERL_NO_GET_CONTEXT
-
-#include "EXTERN.h"
-#include "perl.h"
-#if defined _WIN32 && !defined __CYGWIN__
-/* See comment in XSParagraph.xs for why we #undef free. */
-# undef free
-#endif
-#include "XSUB.h"
#include "miscxs.h"
@@ -53,8 +28,6 @@ xs_process_text (char *text)
static char *new;
char *p, *q;
- dTHX;
-
new = realloc (new, strlen (text) + 1);
strcpy (new, text);
@@ -109,8 +82,6 @@ xs_unicode_text (char *text, int in_code)
static char *new;
int new_space, new_len;
- dTHX; /* Perl boilerplate. */
-
if (in_code)
return text;
@@ -211,8 +182,6 @@ xs_entity_text (char *text)
static char *new;
int new_space, new_len;
- dTHX; /* Perl boilerplate. */
-
p = text;
new_space = strlen (text);
new = realloc (new, new_space + 1);
@@ -283,19 +252,10 @@ xs_entity_text (char *text)
return new;
}
-void xs_parse_command_name (SV *text_in,
+void xs_parse_command_name (char *text,
char **command,
int *is_single_letter)
{
- char *text;
-
- dTHX;
-
- /* Make sure the input is in UTF8. */
- if (!SvUTF8 (text_in))
- sv_utf8_upgrade (text_in);
- text = SvPV_nolen (text_in);
-
*command = 0;
*is_single_letter = 0;
@@ -329,7 +289,7 @@ void xs_parse_command_name (SV *text_in,
}
/* Return list ($at_command, $open_brace, ....) */
-void xs_parse_texi_regex (SV *text_in,
+void xs_parse_texi_regex (char *text,
char **arobase,
char **open_brace,
char **close_brace,
@@ -339,15 +299,6 @@ void xs_parse_texi_regex (SV *text_in,
char **menu_only_separator,
char **new_text)
{
- char *text;
-
- dTHX;
-
- /* Make sure the input is in UTF8. */
- if (!SvUTF8 (text_in))
- sv_utf8_upgrade (text_in);
- text = SvPV_nolen (text_in);
-
*arobase = *open_brace = *close_brace = *comma = *asterisk
= *form_feed = *menu_only_separator = *new_text = 0;
@@ -408,8 +359,6 @@ xs_default_format_protect_text (char *text)
static char *new;
int new_space, new_len;
- dTHX; /* Perl boilerplate. */
-
p = text;
new_space = strlen (text);
new = realloc (new, new_space + 1);
diff --git a/tp/Texinfo/XS/miscxs.h b/tp/Texinfo/XS/miscxs.h
index 9768dbab53..374355a49a 100644
--- a/tp/Texinfo/XS/miscxs.h
+++ b/tp/Texinfo/XS/miscxs.h
@@ -1,10 +1,10 @@
char *xs_unicode_text (char *, int);
char *xs_entity_text (char *);
char *xs_process_text (char *text);
-void xs_parse_command_name (SV *text,
+void xs_parse_command_name (char *text,
char **,
int*);
-void xs_parse_texi_regex (SV *text,
+void xs_parse_texi_regex (char *text,
char **,
char **,
char **,
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- branch master updated: * tp/Texinfo/XS/Makefile.am (MiscXS_la_CPPFLAGS, MiscXS_la_LIBADD), tp/Texinfo/XS/MiscXS.xs, tp/Texinfo/XS/misc.c: there is no use of gnulib anymore in MiscXS, remove the gnulib/autoconf flags and includes, in particular do not include config.h.,
Patrice Dumas <=