This patch adds to embed.pl the capability to generate static inline functions.
:
: proto.h: add __attribute__format__ (or ...null_ok__)
:
+: i Static inline: function in source code has a S_ prefix:
+:
+: proto.h: function is declared as S_foo rather than foo,
+: PERL_STATIC_INLINE is added to declaration;
+: embed.h: "#define foo S_foo" entries added
+:
: M May change:
:
: any doc entry is marked that function may change
}
}
- 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 {
$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/) {