Philip Newton <[EMAIL PROTECTED]> wrote:
:On Sun, 16 Feb 2003 06:30:06 -0800, [EMAIL PROTECTED] (Hv) wrote:
:> +++ perl/embed.h     Sun Feb 16 05:08:52 2003
[...]
:> @@ -1003,6 +1003,8 @@
:>  #define sv_free                     Perl_sv_free
:>  #ifdef PERL_CORE
:> +#endif
:> +#ifdef PERL_CORE
:>  #define sv_free_arenas              Perl_sv_free_arenas
[...]
:I presume having "#ifdef PERL_CORE / #endif" with nothing in between
:(twice) makes some sort of strange sense to someone, but the purpose
:eludes me. Can someone enlighten me, please?

1. This file is generated from embed.fnc. This fragment comes from:
  Apd |void   |sv_free    |SV* sv
  po  |void   |sv_free2   |SV* sv
  pd  |void   |sv_free_arenas

2. The #ifdef is wrapped separately around each function definition
that isn't marked 'A'. But 'o' then suppresses the function alias.
I've applied the patch below as #18734 to suppress the #ifdef block
in this case, but we could also consider wrapping the normal alias
definition in a comment to make the derivation clearer.

Hugo
--- embed.pl.old        Mon Feb 17 11:12:27 2003
+++ embed.pl    Mon Feb 17 11:10:34 2003
@@ -344,7 +344,7 @@
                $ret .= hide($func,"Perl_$func");
            }
        }
-         unless ($flags =~ /A/) {
+       if ($ret ne '' && $flags !~ /A/) {
            if ($flags =~ /E/) {
                $ret = "#if defined(PERL_CORE) || defined(PERL_EXT)\n$ret#endif\n";
            } else {

Reply via email to