[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
branch master updated: * README-hacking, tp/Texinfo/XSLoader.pm (init),
From: |
Patrice Dumas |
Subject: |
branch master updated: * README-hacking, tp/Texinfo/XSLoader.pm (init), tp/Texinfo/XS/configure.ac (AC_INIT), tp/maintain/change_perl_modules_version.sh: in XSLoader.pm init, pass the module version as argument to the bootstrap XS object function to compare to the XS_VERSION value. Set tp/Texinfo/XS/configure.ac AC_INIT version to the same version as the top-level configure.ac in change_perl_modules_version.sh. Since XS_VERSION is set based on the configure.ac AC_INIT version through Makefile.am for all the XS [...] |
Date: |
Sat, 05 Oct 2024 05:34:51 -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 fe39959041 * README-hacking, tp/Texinfo/XSLoader.pm (init),
tp/Texinfo/XS/configure.ac (AC_INIT),
tp/maintain/change_perl_modules_version.sh: in XSLoader.pm init, pass the
module version as argument to the bootstrap XS object function to compare to
the XS_VERSION value. Set tp/Texinfo/XS/configure.ac AC_INIT version to the
same version as the top-level configure.ac in change_perl_modules_version.sh.
Since XS_VERSION is set based on the configure.ac AC_INIT version through Makef
[...]
fe39959041 is described below
commit fe3995904158e8e54f4d9fdec68f0851ba7e0837
Author: Patrice Dumas <pertusus@free.fr>
AuthorDate: Tue Aug 27 00:01:51 2024 +0200
* README-hacking, tp/Texinfo/XSLoader.pm (init),
tp/Texinfo/XS/configure.ac (AC_INIT),
tp/maintain/change_perl_modules_version.sh: in XSLoader.pm init,
pass the module version as argument to the bootstrap XS object
function to compare to the XS_VERSION value. Set
tp/Texinfo/XS/configure.ac AC_INIT version to the same version as the
top-level configure.ac in change_perl_modules_version.sh. Since
XS_VERSION is set based on the configure.ac AC_INIT version through
Makefile.am for all the XS objects, the version check should pass.
* tp/Texinfo/XSLoader.pm (init), tp/Texinfo/Convert/ConvertXS.pm,
tp/Texinfo/Convert/Paragraph.pm, tp/Texinfo/DocumentXS.pm,
tp/Texinfo/IndicesXS.pm, tp/Texinfo/MiscXS.pm, tp/Texinfo/Parser.pm,
tp/Texinfo/StructTransfXS.pm, tp/Texinfo/XS/TestXS.pm: remove the
XSLoader.pm init module interface number argument.
---
ChangeLog | 18 ++++++++++++++++++
README-hacking | 3 ++-
tp/Texinfo/Convert/ConvertXS.pm | 1 -
tp/Texinfo/Convert/Paragraph.pm | 1 -
tp/Texinfo/DocumentXS.pm | 1 -
tp/Texinfo/IndicesXS.pm | 1 -
tp/Texinfo/MiscXS.pm | 1 -
tp/Texinfo/Parser.pm | 1 -
tp/Texinfo/StructTransfXS.pm | 1 -
tp/Texinfo/XS/Makefile.am | 2 ++
tp/Texinfo/XS/TestXS.pm | 4 ++--
tp/Texinfo/XS/configure.ac | 4 ++--
tp/Texinfo/XSLoader.pm | 15 +++++++++------
tp/maintain/change_perl_modules_version.sh | 7 +++++++
14 files changed, 42 insertions(+), 18 deletions(-)
diff --git a/ChangeLog b/ChangeLog
index bd28bd1a35..50c7509eba 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,21 @@
+2024-08-26 Patrice Dumas <pertusus@free.fr>
+
+ * README-hacking, tp/Texinfo/XSLoader.pm (init),
+ tp/Texinfo/XS/configure.ac (AC_INIT),
+ tp/maintain/change_perl_modules_version.sh: in XSLoader.pm init,
+ pass the module version as argument to the bootstrap XS object
+ function to compare to the XS_VERSION value. Set
+ tp/Texinfo/XS/configure.ac AC_INIT version to the same version as the
+ top-level configure.ac in change_perl_modules_version.sh. Since
+ XS_VERSION is set based on the configure.ac AC_INIT version through
+ Makefile.am for all the XS objects, the version check should pass.
+
+ * tp/Texinfo/XSLoader.pm (init), tp/Texinfo/Convert/ConvertXS.pm,
+ tp/Texinfo/Convert/Paragraph.pm, tp/Texinfo/DocumentXS.pm,
+ tp/Texinfo/IndicesXS.pm, tp/Texinfo/MiscXS.pm, tp/Texinfo/Parser.pm,
+ tp/Texinfo/StructTransfXS.pm, tp/Texinfo/XS/TestXS.pm: remove the
+ XSLoader.pm init module interface number argument.
+
2024-08-25 Patrice Dumas <pertusus@free.fr>
* tp/Texinfo/XS/convert/html_prepare_converter.c
diff --git a/README-hacking b/README-hacking
index f3bd25dbc3..85f60aa0ac 100644
--- a/README-hacking
+++ b/README-hacking
@@ -416,7 +416,8 @@ Update version number:
version number in txirefcard.tex (offical releases only)
(cd texindex ; rm texindex.awk ; make)
(cd tp && ./maintain/change_perl_modules_version.sh auto)
- -- this updates all the version numbers in the Perl modules
+ -- this updates all the version numbers in the Perl modules and
+ in tp/Texinfo/XS/configure.ac
check up to date copyright years in files relevant to --version calls
(tp/texi2any.pl, info/info.c, install-info/install-info.c, texindex/ti.twjr,
Pod-Simple-Texinfo/pod2texi)
diff --git a/tp/Texinfo/Convert/ConvertXS.pm b/tp/Texinfo/Convert/ConvertXS.pm
index 48b8ae2503..033b5533dc 100644
--- a/tp/Texinfo/Convert/ConvertXS.pm
+++ b/tp/Texinfo/Convert/ConvertXS.pm
@@ -34,7 +34,6 @@ BEGIN {
undef,
"ConvertXS",
undef,
- 0,
);
}
}
diff --git a/tp/Texinfo/Convert/Paragraph.pm b/tp/Texinfo/Convert/Paragraph.pm
index 4841e99419..db3f1cf090 100644
--- a/tp/Texinfo/Convert/Paragraph.pm
+++ b/tp/Texinfo/Convert/Paragraph.pm
@@ -56,7 +56,6 @@ BEGIN {
"Texinfo::Convert::ParagraphNonXS",
"XSParagraph",
undef,
- 0,
);
no strict 'refs';
diff --git a/tp/Texinfo/DocumentXS.pm b/tp/Texinfo/DocumentXS.pm
index ee7815bcb4..b40e6347a1 100644
--- a/tp/Texinfo/DocumentXS.pm
+++ b/tp/Texinfo/DocumentXS.pm
@@ -30,7 +30,6 @@ BEGIN {
undef,
"DocumentXS",
undef,
- 0,
);
}
diff --git a/tp/Texinfo/IndicesXS.pm b/tp/Texinfo/IndicesXS.pm
index 6dd59efb27..190234bd6c 100644
--- a/tp/Texinfo/IndicesXS.pm
+++ b/tp/Texinfo/IndicesXS.pm
@@ -30,7 +30,6 @@ BEGIN {
undef,
"IndicesXS",
undef,
- 0,
);
}
}
diff --git a/tp/Texinfo/MiscXS.pm b/tp/Texinfo/MiscXS.pm
index 6093007074..f1045c105c 100644
--- a/tp/Texinfo/MiscXS.pm
+++ b/tp/Texinfo/MiscXS.pm
@@ -31,7 +31,6 @@ BEGIN {
"Texinfo::MiscXS",
"MiscXS",
undef,
- 0,
);
}
diff --git a/tp/Texinfo/Parser.pm b/tp/Texinfo/Parser.pm
index 150f28fef1..afcdd85a04 100644
--- a/tp/Texinfo/Parser.pm
+++ b/tp/Texinfo/Parser.pm
@@ -34,7 +34,6 @@ BEGIN {
"Texinfo::ParserNonXS",
$shared_library_name,
"Texinfo::XS::parsetexi::Parsetexi",
- 0,
);
}
diff --git a/tp/Texinfo/StructTransfXS.pm b/tp/Texinfo/StructTransfXS.pm
index dde572827e..1fb6bc51c6 100644
--- a/tp/Texinfo/StructTransfXS.pm
+++ b/tp/Texinfo/StructTransfXS.pm
@@ -32,7 +32,6 @@ BEGIN {
undef,
"StructuringTransfoXS",
undef,
- 0,
);
}
}
diff --git a/tp/Texinfo/XS/Makefile.am b/tp/Texinfo/XS/Makefile.am
index 45751d08db..2f2643600b 100644
--- a/tp/Texinfo/XS/Makefile.am
+++ b/tp/Texinfo/XS/Makefile.am
@@ -44,6 +44,8 @@ xsdir = $(pkglibdir)
# -------------------------------------------------------
+# XS_VERSION is used in version check in the bootstrap function created
+# by xsubpp in C code generated from .xs, and called in XSLoader.pm
XSLIBS_CPPFLAGS = -DVERSION=\"$(VERSION)\" -DXS_VERSION=\"$(VERSION)\"
XSLIBS_CPPFLAGS += -I$(PERL_INC)
diff --git a/tp/Texinfo/XS/TestXS.pm b/tp/Texinfo/XS/TestXS.pm
index 0860c90921..0f5a4c97f9 100644
--- a/tp/Texinfo/XS/TestXS.pm
+++ b/tp/Texinfo/XS/TestXS.pm
@@ -26,8 +26,8 @@ BEGIN {
"TestXS",
undef,
"TestXS",
- undef,
- 0);
+ undef
+ );
}
1;
diff --git a/tp/Texinfo/XS/configure.ac b/tp/Texinfo/XS/configure.ac
index d990781335..bec612c2bf 100644
--- a/tp/Texinfo/XS/configure.ac
+++ b/tp/Texinfo/XS/configure.ac
@@ -10,14 +10,14 @@
# WITHOUT ANY WARRANTY, to the extent permitted by law; without even the
# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
#
-AC_INIT([texinfo], [0])
+AC_INIT([texinfo], [7.1.90])
AC_CONFIG_AUX_DIR([build-aux])
AM_INIT_AUTOMAKE
AC_CONFIG_MACRO_DIR([gnulib/m4])
b='\'
d='$'
-o='@<:@' dnl quadrigraph for [ - see autoconf documentatoin
+o='@<:@' dnl quadrigraph for [ - see autoconf documentation
c='@:>@' dnl quadrigraph for ]
# This turns a string like "cc='cc';" into a string like "cc".
diff --git a/tp/Texinfo/XSLoader.pm b/tp/Texinfo/XSLoader.pm
index 221a48d334..45bbb5c0a1 100644
--- a/tp/Texinfo/XSLoader.pm
+++ b/tp/Texinfo/XSLoader.pm
@@ -90,11 +90,9 @@ sub _find_file($) {
return undef;
}
-# Load module $module, either from XS implementation in
+# Load module $MODULE, either from XS implementation in
# Libtool file $MODULE_NAME and Perl file $PERL_EXTRA_FILE,
# or non-XS implementation $FALLBACK_MODULE.
-# $INTERFACE_VERSION is a module interface number, to be changed when the XS
-# interface changes.
# The package loaded is returned or undef if there is no fallback and the
# XS package was not loaded.
sub init {
@@ -102,7 +100,6 @@ sub init {
$fallback_module,
$module_name,
$perl_extra_file,
- $interface_version,
) = @_;
# Possible values for TEXINFO_XS environment variable:
@@ -207,8 +204,14 @@ sub init {
# This is the module bootstrap function, which causes all the other
# functions (XSUB's) provided by the module to become available to
- # be called from Perl code.
- &$boot_fn($module, $interface_version);
+ # be called from Perl code, after a check that the version argument
+ # matches the XS object XS_VERSION value. In our case, XS_VERSION
+ # is set based on tp/Texinfo/XS/configure.ac AC_INIT version passed
+ # through Makefile.am. The tp/Texinfo/XS/configure.ac AC_INIT version
+ # and thePerl modules VERSION should be synchronized with the top-level
+ # configure.ac version. The check therefore ensures that the XS objects
+ # and the Perl module come from the same GNU Texinfo distribution.
+ &$boot_fn($module, $VERSION);
# This makes it easier to refer to packages and symbols by name.
no strict 'refs';
diff --git a/tp/maintain/change_perl_modules_version.sh
b/tp/maintain/change_perl_modules_version.sh
index 641cd815a0..815f640e71 100755
--- a/tp/maintain/change_perl_modules_version.sh
+++ b/tp/maintain/change_perl_modules_version.sh
@@ -18,3 +18,10 @@ fi
find Texinfo/ -name '*.pm' -o -name '*.pm.in' | xargs \
perl -pi -e 's/\$VERSION = '"'([0-9.]+[^']*)'"'/\$VERSION = '"'$VERS'"'/'
+
+# change also tp/Texinfo/XS/configure.ac version, it is used to set
+# XS_VERSION through Makefile.am. XS_VERSION in XS objects in turn is
+# used in xsubpp generated code in XS object bootstrap function called
+# by XSLoader.pm init through DynaLoader to check that the XS modules
+# versions are the same than the XSLoader.pm Perl module $VERSION.
+perl -pi -e "s/^(AC_INIT\(\[[^\]]+\], *)\[([0-9.]+)\]/\$1\[$VERS\]/"
Texinfo/XS/configure.ac
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- branch master updated: * README-hacking, tp/Texinfo/XSLoader.pm (init), tp/Texinfo/XS/configure.ac (AC_INIT), tp/maintain/change_perl_modules_version.sh: in XSLoader.pm init, pass the module version as argument to the bootstrap XS object function to compare to the XS_VERSION value. Set tp/Texinfo/XS/configure.ac AC_INIT version to the same version as the top-level configure.ac in change_perl_modules_version.sh. Since XS_VERSION is set based on the configure.ac AC_INIT version through Makefile.am for all the XS [...],
Patrice Dumas <=