texinfo-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[no subject]


From: Patrice Dumas
Date: Thu, 25 Jan 2024 05:47:51 -0500 (EST)

branch: master
commit d13d967eacda5713d9ed73c6dfbc24072bac7500
Author: Patrice Dumas <pertusus@free.fr>
AuthorDate: Thu Jan 25 11:44:07 2024 +0100

    * tp/Texinfo/XSLoader.pm (init): simply use _fatal if the libtool name
    was not found.
---
 ChangeLog              |  5 +++++
 tp/Texinfo/XSLoader.pm | 17 +++++++----------
 2 files changed, 12 insertions(+), 10 deletions(-)

diff --git a/ChangeLog b/ChangeLog
index 2de8547ffd..daa1af780a 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2024-01-25  Patrice Dumas  <pertusus@free.fr>
+
+       * tp/Texinfo/XSLoader.pm (init): simply use _fatal if the libtool name
+       was not found.
+
 2024-01-25  Patrice Dumas  <pertusus@free.fr>
 
        * tp/Texinfo/Convert/HTML.pm (_default_format_element_footer): use
diff --git a/tp/Texinfo/XSLoader.pm b/tp/Texinfo/XSLoader.pm
index ad613c02d9..fb07e1107c 100644
--- a/tp/Texinfo/XSLoader.pm
+++ b/tp/Texinfo/XSLoader.pm
@@ -75,7 +75,10 @@ sub _find_file($) {
 # $MODULE_NAME is the name of a Libtool file used for
 # loading the XS subroutines.
 # $INTERFACE_VERSION is a module interface number, to be changed when the XS 
-# interface changes.  
+# interface changes.
+# The package loaded is returned or undef if there is no fallback and the
+# XS package was not loaded.
+# TODO remove $warning_message and $fatal_message?
 sub init {
  my ($module,
      $fallback_module,
@@ -126,11 +129,7 @@ sub init {
  
  my ($libtool_dir, $libtool_archive) = _find_file("$module_name.la");
  if (!$libtool_archive) {
-   if ($TEXINFO_XS eq 'libtool') {
-     _fatal "$module_name: couldn't find Libtool archive file";
-     goto FALLBACK;
-   }
-   _debug "$module_name: couldn't find Libtool archive file";
+   _fatal "$module_name: couldn't find Libtool archive file";
    goto FALLBACK;
  }
  
@@ -233,10 +232,8 @@ sub init {
       warn "falling back to pure Perl module $fallback_module\n";
     }
   }
-  # if there is no fallback and the perl methods that have not been overriden
-  # should not be called, the return value should be made available such
-  # that code that could have called the corresponding perl methods can
-  # chenck if the return value is not set.
+  # if there is no fallback, it may be relevant to have access to the
+  # return value in perl code, to check if the package was loaded.
   if (!defined $fallback_module) {
     if ($TEXINFO_XS eq 'warn' or $TEXINFO_XS eq 'debug') {
       warn "no fallback module for $module\n";



reply via email to

[Prev in Thread] Current Thread [Next in Thread]