In perl.git, the branch smoke-me/andyd/croak_memory_wrap has been updated

<http://perl5.git.perl.org/perl.git/commitdiff/68549bf3aee4bfc8cc9c32dd8e9e687058d93cec?hp=f8fd8bfff8eb57156a0ab858d4c185701258b0e3>

- Log -----------------------------------------------------------------
commit 68549bf3aee4bfc8cc9c32dd8e9e687058d93cec
Author: Andy Dougherty <[email protected]>
Date:   Wed Mar 27 20:11:34 2013 -0400

    makedef.pl shouldn't prepend Perl_ to symbols already starting with Perl_.
    
    I had Perl_croak_memory_wrap defined in embed.fnc with the 'nroX' flags,
    since this is a private function used by public macros.  I used the long
    form of the name Perl_croak_memory_wrap everywhere, and used the 'o'
    flag so that embed.h wouldn't contain a useless #define croak_memory_wrap
    Perl_croak_memory_wrap.  Unfortunately, makedef.pl (used by the Win32
    build process) didn't know what to do with that entry and created an
    entry Perl_Perl_croak_memory_wrap.   Changing makedef.pl to use the 'o'
    flag to decide whether to add the Perl_ prefix resulted in over 50 other
    symbols changing in the output of makedef.pl.  I don't know if the changes
    are correct or if the 'o' flag is in error on those entries in embed.fnc,
    but I don't have time to check them all out.
    
    This patch just stops makedef.pl from adding a Perl_ prefix if there is
    already one there.
-----------------------------------------------------------------------

Summary of changes:
 makedef.pl |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)

diff --git a/makedef.pl b/makedef.pl
index 950af85..d2c5f5e 100644
--- a/makedef.pl
+++ b/makedef.pl
@@ -755,7 +755,8 @@ if ($define{'USE_PERLIO'}) {
            # within the block, as the *first* definition may have flags which
            # mean "don't export"
            next if $seen{$func}++;
-           $func = "Perl_$func" if $flags =~ /[pbX]/;
+           # Should we also skip adding the Perl_ prefix if $flags =~ /o/ ?
+           $func = "Perl_$func" if ($flags =~ /[pbX]/ && $func !~ /^Perl_/); 
            ++$export{$func} unless exists $skip{$func};
        }
     }

--
Perl5 Master Repository

Reply via email to