[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[6748] fix XS loading
From: |
Gavin D. Smith |
Subject: |
[6748] fix XS loading |
Date: |
Tue, 03 Nov 2015 11:51:43 +0000 |
Revision: 6748
http://svn.sv.gnu.org/viewvc/?view=rev&root=texinfo&revision=6748
Author: gavin
Date: 2015-11-03 11:51:41 +0000 (Tue, 03 Nov 2015)
Log Message:
-----------
fix XS loading
Modified Paths:
--------------
trunk/ChangeLog
trunk/tp/Texinfo/Convert/Paragraph.pm
Modified: trunk/ChangeLog
===================================================================
--- trunk/ChangeLog 2015-11-02 16:20:29 UTC (rev 6747)
+++ trunk/ChangeLog 2015-11-03 11:51:41 UTC (rev 6748)
@@ -1,3 +1,12 @@
+2015-11-03 Gavin Smith <address@hidden>
+
+ * tp/Texinfo/Convert/Paragraph.pm: Use the correct symbol name
+ for the XS bootstrap function. Print the name of the loaded
+ library file if debug output is on, as well as the name of the
+ bootstrap function. Delay aliasing the loaded module to
+ Texinfo::Convert::Paragraph, as accessing the "init" function
+ right away seems not to work.
+
2015-11-02 Gavin Smith <address@hidden>
* tp/Makefile.am: Remove a commented-out line.
Modified: trunk/tp/Texinfo/Convert/Paragraph.pm
===================================================================
--- trunk/tp/Texinfo/Convert/Paragraph.pm 2015-11-02 16:20:29 UTC (rev
6747)
+++ trunk/tp/Texinfo/Convert/Paragraph.pm 2015-11-03 11:51:41 UTC (rev
6748)
@@ -48,7 +48,7 @@
BEGIN {
-my $module = "Texinfo::Convert::XSParagraph::XSParagraph::";
+my $module = "Texinfo::Convert::XSParagraph::XSParagraph";
our $VERSION = '6.0dev';
# Module interface number, to be changed when the XS interface changes.
# The value used for the .xs file compilation is set in configure.ac.
@@ -193,15 +193,17 @@
_fatal "XSParagraph: couldn't load file $dlpath";
goto FALLBACK;
}
+_debug "$dlpath loaded";
my @undefined_symbols = DynaLoader::dl_undef_symbols();
if ($#undefined_symbols+1 != 0) {
_fatal "XSParagraph: still have undefined symbols after dl_load_file";
}
my $bootname = "boot_$module";
$bootname =~ s/:/_/g;
+_debug "looking for $bootname";
my $symref = DynaLoader::dl_find_symbol($libref, $bootname);
if (!$symref) {
- _fatal "XSParagraph: couldn't find boot_$module symbol";
+ _fatal "XSParagraph: couldn't find $bootname symbol";
goto FALLBACK;
}
my $boot_fn = DynaLoader::dl_install_xsub("${module}::bootstrap",
@@ -219,11 +221,11 @@
# be called from Perl code.
&$boot_fn($module, $XSPARAGRAPH_INTERFACE_VERSION);
-*Texinfo::Convert::Paragraph = *Texinfo::Convert::XSParagraph::XSParagraph::;
-if (!Texinfo::Convert::Paragraph::init ()) {
+if (!Texinfo::Convert::XSParagraph::XSParagraph::init ()) {
_fatal "XSParagraph: error initializing";
goto FALLBACK;
}
+*Texinfo::Convert::Paragraph:: = *Texinfo::Convert::XSParagraph::XSParagraph::;
goto DONTFALLBACK;
FALLBACK:
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [6748] fix XS loading,
Gavin D. Smith <=