summaryrefslogtreecommitdiff
path: root/regen
diff options
context:
space:
mode:
authorKarl Williamson <public@khwilliamson.com>2011-01-29 09:53:44 -0700
committerKarl Williamson <public@khwilliamson.com>2011-01-29 10:26:41 -0700
commit71556506e314e769ce97e03177d978fbd8a37c18 (patch)
tree313dd82a60fc951c0a8d87a122a8d145fd693b63 /regen
parente5228720d6fdc243999d812a7a89ca41dd4c11bf (diff)
downloadperl-71556506e314e769ce97e03177d978fbd8a37c18.tar.gz
embed.fnc: Add inline function capability
This patch adds to embed.pl the capability to generate static inline functions.
Diffstat (limited to 'regen')
-rwxr-xr-xregen/embed.pl9
1 files changed, 6 insertions, 3 deletions
diff --git a/regen/embed.pl b/regen/embed.pl
index b7d784970b..b6a25356b4 100755
--- a/regen/embed.pl
+++ b/regen/embed.pl
@@ -231,8 +231,11 @@ sub walk_table (&@) {
}
}
- if ($flags =~ /s/) {
- $retval = "STATIC $splint_flags$retval";
+ if ($flags =~ /([si])/) {
+ my $type = ($1 eq 's') ? "STATIC" : "PERL_STATIC_INLINE";
+ warn "$func: i and s flags are mutually exclusive"
+ if $flags =~ /s/ && $flags =~ /i/;
+ $retval = "$type $splint_flags$retval";
$func = "S_$plain_func";
}
else {
@@ -468,7 +471,7 @@ sub embed_h {
$ret = "#define $func($alist)";
my $t = int(length($ret) / 8);
$ret .= "\t" x ($t < 4 ? 4 - $t : 1);
- if ($flags =~ /s/) {
+ if ($flags =~ /[si]/) {
$ret .= "S_$func(aTHX";
}
elsif ($flags =~ /p/) {