diff options
author | Nick Ing-Simmons <nik@tiuk.ti.com> | 2001-10-20 10:28:17 +0000 |
---|---|---|
committer | Nick Ing-Simmons <nik@tiuk.ti.com> | 2001-10-20 10:28:17 +0000 |
commit | af3c7592a74e7782bf0779c3272ee86140fadf53 (patch) | |
tree | 45a9d4ecb34573b9bed7ca845e6d22bae76450e6 /embed.pl | |
parent | 66a93824ccd37b2948fb857056747c3314d2a08c (diff) | |
download | perl-af3c7592a74e7782bf0779c3272ee86140fadf53.tar.gz |
Add a new flag character 'm' to embed.pl set to represent
"functions" which are really macros. Use it foe the troublesome
sv_setsv() etc. macros in sv.h - changing latter to define
sv_setsv rather than sv_setsv_macro etc.
p4raw-id: //depot/perlio@12524
Diffstat (limited to 'embed.pl')
-rwxr-xr-x | embed.pl | 24 |
1 files changed, 14 insertions, 10 deletions
@@ -114,6 +114,7 @@ sub write_protos { } else { my ($flags,$retval,$func,@args) = @_; + $ret .= '/* ' if $flags =~ /m/; if ($flags =~ /s/) { $retval = "STATIC $retval"; $func = "S_$func"; @@ -145,7 +146,9 @@ sub write_protos { $prefix, $args - 1, $prefix, $args; $ret .= "\n#endif\n"; } - $ret .= ";\n"; + $ret .= ";"; + $ret .= ' */' if $flags =~ /m/; + $ret .= "\n"; } $ret; } @@ -155,7 +158,7 @@ sub write_global_sym { my $ret = ""; if (@_ > 1) { my ($flags,$retval,$func,@args) = @_; - if ($flags =~ /A/ && $flags !~ /x/) { # public API, so export + if ($flags =~ /A/ && $flags !~ /[xm]/) { # public API, so export $func = "Perl_$func" if $flags =~ /p/; $ret = "$func\n"; } @@ -343,7 +346,7 @@ walk_table { } else { my ($flags,$retval,$func,@args) = @_; - unless ($flags =~ /o/) { + unless ($flags =~ /[om]/) { if ($flags =~ /s/) { $ret .= hide($func,"S_$func"); } @@ -376,7 +379,7 @@ walk_table { } else { my ($flags,$retval,$func,@args) = @_; - unless ($flags =~ /o/) { + unless ($flags =~ /[om]/) { my $args = scalar @args; if ($args and $args[$args-1] =~ /\.\.\./) { # we're out of luck for varargs functions under CPP @@ -1052,6 +1055,7 @@ __END__ : : flags are single letters with following meanings: : A member of public API +: m Implemented as a macro - no export, no proto, no #define : d function has documentation with its source : s static function, should have an S_ prefix in source : file @@ -1718,7 +1722,7 @@ Apd |IO* |sv_2io |SV* sv Apd |IV |sv_2iv |SV* sv Apd |SV* |sv_2mortal |SV* sv Apd |NV |sv_2nv |SV* sv -Ap |char* |sv_2pv |SV* sv|STRLEN* lp +Am |char* |sv_2pv |SV* sv|STRLEN* lp Apd |char* |sv_2pvutf8 |SV* sv|STRLEN* lp Apd |char* |sv_2pvbyte |SV* sv|STRLEN* lp Ap |char* |sv_pvn_nomg |SV* sv|STRLEN* lp @@ -1736,8 +1740,8 @@ Apd |SV* |sv_bless |SV* sv|HV* stash Afpd |void |sv_catpvf |SV* sv|const char* pat|... Ap |void |sv_vcatpvf |SV* sv|const char* pat|va_list* args Apd |void |sv_catpv |SV* sv|const char* ptr -Apd |void |sv_catpvn |SV* sv|const char* ptr|STRLEN len -Apd |void |sv_catsv |SV* dsv|SV* ssv +Amd |void |sv_catpvn |SV* sv|const char* ptr|STRLEN len +Amd |void |sv_catsv |SV* dsv|SV* ssv Apd |void |sv_chop |SV* sv|char* ptr pd |I32 |sv_clean_all pd |void |sv_clean_objs @@ -1772,7 +1776,7 @@ Apd |SV* |sv_newref |SV* sv Ap |char* |sv_peek |SV* sv Apd |void |sv_pos_u2b |SV* sv|I32* offsetp|I32* lenp Apd |void |sv_pos_b2u |SV* sv|I32* offsetp -Apd |char* |sv_pvn_force |SV* sv|STRLEN* lp +Amd |char* |sv_pvn_force |SV* sv|STRLEN* lp Apd |char* |sv_pvutf8n_force|SV* sv|STRLEN* lp Apd |char* |sv_pvbyten_force|SV* sv|STRLEN* lp Apd |char* |sv_reftype |SV* sv|int ob @@ -1793,7 +1797,7 @@ Apd |SV* |sv_setref_pvn |SV* rv|const char* classname|char* pv \ |STRLEN n Apd |void |sv_setpv |SV* sv|const char* ptr Apd |void |sv_setpvn |SV* sv|const char* ptr|STRLEN len -Apd |void |sv_setsv |SV* dsv|SV* ssv +Amd |void |sv_setsv |SV* dsv|SV* ssv Apd |void |sv_taint |SV* sv Apd |bool |sv_tainted |SV* sv Apd |int |sv_unmagic |SV* sv|int type @@ -1925,7 +1929,7 @@ Apd |char* |sv_2pvbyte_nolen|SV* sv Apd |char* |sv_pv |SV *sv Apd |char* |sv_pvutf8 |SV *sv Apd |char* |sv_pvbyte |SV *sv -Apd |STRLEN |sv_utf8_upgrade|SV *sv +Amd |STRLEN |sv_utf8_upgrade|SV *sv ApdM |bool |sv_utf8_downgrade|SV *sv|bool fail_ok Apd |void |sv_utf8_encode |SV *sv ApdM |bool |sv_utf8_decode |SV *sv |