summaryrefslogtreecommitdiff
path: root/regen/embed.pl
diff options
context:
space:
mode:
authorKarl Williamson <khw@cpan.org>2019-09-09 11:43:18 -0600
committerKarl Williamson <khw@cpan.org>2019-09-15 10:39:55 -0600
commitedfae0c7aede11b7c295c6a40882406849675792 (patch)
treeb5a555571927b7f9b64951b1ad5789b0a518b335 /regen/embed.pl
parent2378c9f3cbe3ce31382afe16c8b9a150ac6da7ce (diff)
downloadperl-edfae0c7aede11b7c295c6a40882406849675792.tar.gz
regen/embed.pl: Wrap #if..#endif differently
By surrounding the interior stuff with these in one statement, it makes it easier to change that interior stuff without having dangling statements. This makes no difference in the current generated output
Diffstat (limited to 'regen/embed.pl')
-rwxr-xr-xregen/embed.pl7
1 files changed, 3 insertions, 4 deletions
diff --git a/regen/embed.pl b/regen/embed.pl
index 4fefd7a240..c59d8775ad 100755
--- a/regen/embed.pl
+++ b/regen/embed.pl
@@ -135,8 +135,6 @@ my ($embed, $core, $ext, $api) = setup_embed();
$func = full_name($plain_func, $flags);
$ret = "";
- $ret .= "#ifndef NO_MATHOMS\n" if $binarycompat;
- $ret .= "#ifndef PERL_NO_INLINE_FUNCTIONS\n" if $static_inline;
$ret .= "$retval\t$func(";
if ( $has_context ) {
$ret .= @args ? "pTHX_ " : "pTHX";
@@ -229,8 +227,9 @@ my ($embed, $core, $ext, $api) = setup_embed();
$ret .= "\n#define PERL_ARGS_ASSERT_\U$plain_func\E\t\\\n\t"
. join '; ', map "assert($_)", @names_of_nn;
}
- $ret .= "\n#endif" if $static_inline;
- $ret .= "\n#endif" if $binarycompat;
+
+ $ret = "#ifndef PERL_NO_INLINE_FUNCTIONS\n$ret\n#endif" if $static_inline;
+ $ret = "#ifndef NO_MATHOMS\n$ret\n#endif" if $binarycompat;
$ret .= @attrs ? "\n\n" : "\n";
print $pr $ret;