From: Jarkko Hietaniemi Date: Sun, 9 Mar 2003 19:04:22 +0000 (+0000) Subject: Export the symbols from #18863; do not prototype (but export) X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=db2b0bab8e5c98bc74fde3b86eb3523fbfef5650;p=p5sagit%2Fp5-mst-13.2.git Export the symbols from #18863; do not prototype (but export) Nicholas Clark's experimental COW functions. Sidenote: the embed.fnc/embed.fnc/makedef.pl thing is becoming a mess of Herculean proportions. Someone should redesign and clean up the stables. p4raw-id: //depot/perl@18868 --- diff --git a/embed.fnc b/embed.fnc index b62ec99..4005cb4 100644 --- a/embed.fnc +++ b/embed.fnc @@ -6,18 +6,22 @@ : : flags are single letters with following meanings: : A member of public API -: m Implemented as a macro - no export, no proto, no #define +: 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 +: s static function, should have an S_ prefix in +: source file : n has no implicit interpreter/thread context argument : p function has a Perl_ prefix : f function takes printf style format string, varargs : r function never returns : o has no compatibility macro (#define foo Perl_foo) : x not exported -: M may change +: M may change: no Perl_ proto, but exported : E visible to Perl core extensions +: b binary backward compatibility; function is a macro +: but has also Perl_ implementation (which is exported) +: X no Perl_ proto : : Individual flags may be separated by whitespace. : @@ -691,7 +695,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 -Am |char* |sv_2pv |SV* sv|STRLEN* lp +Amb |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 @@ -709,8 +713,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 -Amd |void |sv_catpvn |SV* sv|const char* ptr|STRLEN len -Amd |void |sv_catsv |SV* dsv|SV* ssv +Amdb |void |sv_catpvn |SV* sv|const char* ptr|STRLEN len +Amdb |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 @@ -727,7 +731,7 @@ Ap |void |sv_dump |SV* sv Apd |bool |sv_derived_from|SV* sv|const char* name Apd |I32 |sv_eq |SV* sv1|SV* sv2 Apd |void |sv_free |SV* sv -Apo |void |sv_free2 |SV* sv +ApoMX |void |sv_free2 |SV* sv pd |void |sv_free_arenas Apd |char* |sv_gets |SV* sv|PerlIO* fp|I32 append Apd |char* |sv_grow |SV* sv|STRLEN newlen @@ -748,7 +752,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 -Amd |char* |sv_pvn_force |SV* sv|STRLEN* lp +Amdb |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_recode_to_utf8 |SV* sv|SV *encoding @@ -761,6 +765,7 @@ Apd |void |sv_reset |char* s|HV* stash Afpd |void |sv_setpvf |SV* sv|const char* pat|... Ap |void |sv_vsetpvf |SV* sv|const char* pat|va_list* args Apd |void |sv_setiv |SV* sv|IV num +Apdb |void |sv_setpviv |SV* sv|IV num Apd |void |sv_setuv |SV* sv|UV num Apd |void |sv_setnv |SV* sv|NV num Apd |SV* |sv_setref_iv |SV* rv|const char* classname|IV iv @@ -771,7 +776,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 -Amd |void |sv_setsv |SV* dsv|SV* ssv +Amdb |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 @@ -864,6 +869,7 @@ Apd |void |sv_catsv_mg |SV *dstr|SV *sstr Afpd |void |sv_setpvf_mg |SV *sv|const char* pat|... Ap |void |sv_vsetpvf_mg |SV* sv|const char* pat|va_list* args Apd |void |sv_setiv_mg |SV *sv|IV i +Apdb |void |sv_setpviv_mg |SV *sv|IV iv Apd |void |sv_setuv_mg |SV *sv|UV u Apd |void |sv_setnv_mg |SV *sv|NV num Apd |void |sv_setpv_mg |SV *sv|const char *ptr @@ -896,10 +902,10 @@ Ap |void |reginitcolors Apd |char* |sv_2pv_nolen |SV* sv Apd |char* |sv_2pvutf8_nolen|SV* sv Apd |char* |sv_2pvbyte_nolen|SV* sv -Amd |char* |sv_pv |SV *sv -Amd |char* |sv_pvutf8 |SV *sv -Amd |char* |sv_pvbyte |SV *sv -Amd |STRLEN |sv_utf8_upgrade|SV *sv +Amdb |char* |sv_pv |SV *sv +Amdb |char* |sv_pvutf8 |SV *sv +Amdb |char* |sv_pvbyte |SV *sv +Amdb |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 @@ -945,7 +951,7 @@ Ap |char * |custom_op_name|OP* op Ap |char * |custom_op_desc|OP* op #if defined(PERL_COPY_ON_WRITE) -ApM |int |sv_release_IVX |SV *sv +pMX |int |sv_release_IVX |SV *sv #endif Adp |void |sv_nosharing |SV * @@ -1305,7 +1311,7 @@ Apd |void |sv_copypv |SV* dsv|SV* ssv Ap |char* |my_atof2 |const char *s|NV* value Apn |int |my_socketpair |int family|int type|int protocol|int fd[2] #ifdef PERL_COPY_ON_WRITE -Ap |SV* |sv_setsv_cow |SV* dsv|SV* ssv +pMX |SV* |sv_setsv_cow |SV* dsv|SV* ssv #endif #if defined(USE_PERLIO) && !defined(USE_SFIO) diff --git a/embed.pl b/embed.pl index a8a2da7..f996925 100755 --- a/embed.pl +++ b/embed.pl @@ -156,7 +156,7 @@ sub write_protos { } else { my ($flags,$retval,$func,@args) = @_; - $ret .= '/* ' if $flags =~ /m/; + $ret .= '/* ' if $flags =~ /[mX]/; if ($flags =~ /s/) { $retval = "STATIC $retval"; $func = "S_$func"; @@ -189,7 +189,7 @@ sub write_protos { $ret .= "\n#endif\n"; } $ret .= ";"; - $ret .= ' */' if $flags =~ /m/; + $ret .= ' */' if $flags =~ /[mX]/; $ret .= "\n"; } $ret; @@ -200,8 +200,9 @@ sub write_global_sym { my $ret = ""; if (@_ > 1) { my ($flags,$retval,$func,@args) = @_; - if ($flags =~ /A/ && $flags !~ /[xm]/) { # public API, so export - $func = "Perl_$func" if $flags =~ /p/; + if ($flags =~ /[AX]/ && $flags !~ /[xm]/ + || $flags =~ /b/) { # public API, so export + $func = "Perl_$func" if $flags =~ /[pbX]/; $ret = "$func\n"; } } diff --git a/global.sym b/global.sym index cf0c093..357d6b7 100644 --- a/global.sym +++ b/global.sym @@ -422,6 +422,7 @@ Perl_sv_2io Perl_sv_2iv Perl_sv_2mortal Perl_sv_2nv +Perl_sv_2pv Perl_sv_2pvutf8 Perl_sv_2pvbyte Perl_sv_pvn_nomg @@ -438,6 +439,8 @@ Perl_sv_bless Perl_sv_catpvf Perl_sv_vcatpvf Perl_sv_catpv +Perl_sv_catpvn +Perl_sv_catsv Perl_sv_chop Perl_sv_clear Perl_sv_cmp @@ -467,6 +470,7 @@ Perl_sv_newref Perl_sv_peek Perl_sv_pos_u2b Perl_sv_pos_b2u +Perl_sv_pvn_force Perl_sv_pvutf8n_force Perl_sv_pvbyten_force Perl_sv_recode_to_utf8 @@ -478,6 +482,7 @@ Perl_sv_reset Perl_sv_setpvf Perl_sv_vsetpvf Perl_sv_setiv +Perl_sv_setpviv Perl_sv_setuv Perl_sv_setnv Perl_sv_setref_iv @@ -487,6 +492,7 @@ Perl_sv_setref_pv Perl_sv_setref_pvn Perl_sv_setpv Perl_sv_setpvn +Perl_sv_setsv Perl_sv_taint Perl_sv_tainted Perl_sv_unmagic @@ -550,6 +556,7 @@ Perl_sv_catsv_mg Perl_sv_setpvf_mg Perl_sv_vsetpvf_mg Perl_sv_setiv_mg +Perl_sv_setpviv_mg Perl_sv_setuv_mg Perl_sv_setnv_mg Perl_sv_setpv_mg @@ -574,6 +581,10 @@ Perl_reginitcolors Perl_sv_2pv_nolen Perl_sv_2pvutf8_nolen Perl_sv_2pvbyte_nolen +Perl_sv_pv +Perl_sv_pvutf8 +Perl_sv_pvbyte +Perl_sv_utf8_upgrade Perl_sv_utf8_downgrade Perl_sv_utf8_encode Perl_sv_utf8_decode diff --git a/proto.h b/proto.h index dc56625..ad3a903 100644 --- a/proto.h +++ b/proto.h @@ -764,7 +764,7 @@ PERL_CALLCONV void Perl_sv_dump(pTHX_ SV* sv); PERL_CALLCONV bool Perl_sv_derived_from(pTHX_ SV* sv, const char* name); PERL_CALLCONV I32 Perl_sv_eq(pTHX_ SV* sv1, SV* sv2); PERL_CALLCONV void Perl_sv_free(pTHX_ SV* sv); -PERL_CALLCONV void Perl_sv_free2(pTHX_ SV* sv); +/* PERL_CALLCONV void Perl_sv_free2(pTHX_ SV* sv); */ PERL_CALLCONV void Perl_sv_free_arenas(pTHX); PERL_CALLCONV char* Perl_sv_gets(pTHX_ SV* sv, PerlIO* fp, I32 append); PERL_CALLCONV char* Perl_sv_grow(pTHX_ SV* sv, STRLEN newlen); @@ -798,6 +798,7 @@ PERL_CALLCONV void Perl_sv_setpvf(pTHX_ SV* sv, const char* pat, ...) ; PERL_CALLCONV void Perl_sv_vsetpvf(pTHX_ SV* sv, const char* pat, va_list* args); PERL_CALLCONV void Perl_sv_setiv(pTHX_ SV* sv, IV num); +PERL_CALLCONV void Perl_sv_setpviv(pTHX_ SV* sv, IV num); PERL_CALLCONV void Perl_sv_setuv(pTHX_ SV* sv, UV num); PERL_CALLCONV void Perl_sv_setnv(pTHX_ SV* sv, NV num); PERL_CALLCONV SV* Perl_sv_setref_iv(pTHX_ SV* rv, const char* classname, IV iv); @@ -909,6 +910,7 @@ PERL_CALLCONV void Perl_sv_setpvf_mg(pTHX_ SV *sv, const char* pat, ...) ; PERL_CALLCONV void Perl_sv_vsetpvf_mg(pTHX_ SV* sv, const char* pat, va_list* args); PERL_CALLCONV void Perl_sv_setiv_mg(pTHX_ SV *sv, IV i); +PERL_CALLCONV void Perl_sv_setpviv_mg(pTHX_ SV *sv, IV iv); PERL_CALLCONV void Perl_sv_setuv_mg(pTHX_ SV *sv, UV u); PERL_CALLCONV void Perl_sv_setnv_mg(pTHX_ SV *sv, NV num); PERL_CALLCONV void Perl_sv_setpv_mg(pTHX_ SV *sv, const char *ptr); @@ -987,7 +989,7 @@ PERL_CALLCONV char * Perl_custom_op_name(pTHX_ OP* op); PERL_CALLCONV char * Perl_custom_op_desc(pTHX_ OP* op); #if defined(PERL_COPY_ON_WRITE) -PERL_CALLCONV int Perl_sv_release_IVX(pTHX_ SV *sv); +/* PERL_CALLCONV int Perl_sv_release_IVX(pTHX_ SV *sv); */ #endif PERL_CALLCONV void Perl_sv_nosharing(pTHX_ SV *); @@ -1335,7 +1337,7 @@ PERL_CALLCONV void Perl_sv_copypv(pTHX_ SV* dsv, SV* ssv); PERL_CALLCONV char* Perl_my_atof2(pTHX_ const char *s, NV* value); PERL_CALLCONV int Perl_my_socketpair(int family, int type, int protocol, int fd[2]); #ifdef PERL_COPY_ON_WRITE -PERL_CALLCONV SV* Perl_sv_setsv_cow(pTHX_ SV* dsv, SV* ssv); +/* PERL_CALLCONV SV* Perl_sv_setsv_cow(pTHX_ SV* dsv, SV* ssv); */ #endif #if defined(USE_PERLIO) && !defined(USE_SFIO)