bug-texinfo
[Top][All Lists]
Advanced

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

Re: ppport.h warnings - cv_name - html_get_button_specification_list


From: Patrice Dumas
Subject: Re: ppport.h warnings - cv_name - html_get_button_specification_list
Date: Thu, 6 Jun 2024 19:11:21 +0200

On Tue, Jun 04, 2024 at 06:15:16PM +0100, Gavin Smith wrote:
> When I run ppport.h to get warnings, as stated in README-hacking, I
> get some warnings:
> 
> *** WARNING: Uses sv_ref, which may not be portable below perl 5.23.5, even 
> with 'ppport.h'
> 
> This appears to be a false alarm due to local variables being called "sv_ref"
> which is also the name of a function exposed in the Perl API.

I renamed the variables, to avoid future issues.

> *** WARNING: Uses cv_name, which may not be portable below perl 5.21.5, even 
> with 'ppport.h'
> 
> This may be more serious.  cv_name is used in main/get_perl_info.c, in
> html_get_button_specification_list.

Indeed, I tested on solaris 11, which uses PERL 5.10 and indeed it
breaks compilation.

> Is this a way of checking if it is set to the default subroutine?

Exactly.  It is an important feature as it is used for the HTML header
Next and Prev formatting.  It allows to use C function to replace the
default Perl formatting functions, if the name of the Perl function
matches with the default Perel HTML buttons formatting functions.

>  Is there
> another way of doing this without using the name?

There could be, by changing the Perl code to pass the mapping of name
and functions reference SV.  However, it is not a big deal if the Perl
functions are used, I preferred a simplest fix, to use the C function
insteead of the Perl button formatting function only if Perl is new
enough to have cv_name.  I have not checked how old 5.21.5, but I think
that a combination of older Perl and newest Texinfo is gonna be very
rare, and the only effect should be a slowdown of HTML output in full XS
conversion to HTML, which is not even the default for now.

The corresponding commit is:

https://git.savannah.gnu.org/cgit/texinfo.git/commit/?id=f9124f316a768b2702edbcc190cbace7e5d03a77

I tried to check on solaris 11 with XS.  It compiles, and there are no
important compilation warnings as far as I can tell.  I did not really
manage to know if the fix is ok at runtime, as there are errors on
checks with XS used for the parser, although these errors seem to be
related to translations, more errors with converting the Texinfo manual
to HTML, and even more errors when using XS for conversion, which are
most probably unrelated.

-- 
Pat



reply via email to

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