From: Jarkko Hietaniemi Date: Mon, 3 Dec 2001 14:03:21 +0000 (+0000) Subject: Make sharepvn a macro since all it does is a deref. X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=37d85e3a91692e44e6e502b7d515335fd5f620d6;p=p5sagit%2Fp5-mst-13.2.git Make sharepvn a macro since all it does is a deref. p4raw-id: //depot/perl@13436 --- diff --git a/embed.h b/embed.h index ca01a8d..3a82bc7 100644 --- a/embed.h +++ b/embed.h @@ -629,7 +629,6 @@ #define setenv_getix Perl_setenv_getix #endif #define setdefout Perl_setdefout -#define sharepvn Perl_sharepvn #define share_hek Perl_share_hek #define sighandler Perl_sighandler #define stack_grow Perl_stack_grow @@ -2147,7 +2146,6 @@ #define setenv_getix(a) Perl_setenv_getix(aTHX_ a) #endif #define setdefout(a) Perl_setdefout(aTHX_ a) -#define sharepvn(a,b,c) Perl_sharepvn(aTHX_ a,b,c) #define share_hek(a,b,c) Perl_share_hek(aTHX_ a,b,c) #define sighandler Perl_sighandler #define stack_grow(a,b,c) Perl_stack_grow(aTHX_ a,b,c) diff --git a/embed.pl b/embed.pl index 5e9a8b2..629772a 100755 --- a/embed.pl +++ b/embed.pl @@ -1714,7 +1714,6 @@ Ap |char* |screaminstr |SV* bigsv|SV* littlesv|I32 start_shift \ p |I32 |setenv_getix |char* nam #endif p |void |setdefout |GV* gv -Ap |char* |sharepvn |const char* sv|I32 len|U32 hash p |HEK* |share_hek |const char* sv|I32 len|U32 hash np |Signal_t |sighandler |int sig Ap |SV** |stack_grow |SV** sp|SV**p|int n diff --git a/global.sym b/global.sym index 802dd25..b2a9225 100644 --- a/global.sym +++ b/global.sym @@ -174,6 +174,7 @@ Perl_is_uni_xdigit Perl_to_uni_upper Perl_to_uni_title Perl_to_uni_lower +Perl_to_uni_fold Perl_is_uni_alnum_lc Perl_is_uni_alnumc_lc Perl_is_uni_idfirst_lc @@ -387,7 +388,6 @@ Perl_scan_hex Perl_scan_num Perl_scan_oct Perl_screaminstr -Perl_sharepvn Perl_stack_grow Perl_start_subparse Perl_sv_2bool diff --git a/hv.c b/hv.c index 11992f4..5d7b49f 100644 --- a/hv.c +++ b/hv.c @@ -1640,12 +1640,16 @@ Perl_hv_magic(pTHX_ HV *hv, GV *gv, int how) sv_magic((SV*)hv, (SV*)gv, how, Nullch, 0); } +#if 0 /* use the macro from hv.h instead */ + char* Perl_sharepvn(pTHX_ const char *sv, I32 len, U32 hash) { return HEK_KEY(share_hek(sv, len, hash)); } +#endif + /* possibly free a shared string if no one has access to it * len and hash must both be valid for str. */ diff --git a/hv.h b/hv.h index 9d6be7f..3475c87 100644 --- a/hv.h +++ b/hv.h @@ -197,3 +197,7 @@ C. ? (size) * sizeof(HE*) \ : (size) * sizeof(HE*) * 2 - MALLOC_OVERHEAD) #endif + +/* available as a function in hv.c */ +#define Perl_sharepvn(sv, len, hash) HEK_KEY(share_hek(sv, len, hash)) +#define sharepvn(sv, len, hash) Perl_sharepvn(sv, len, hash) diff --git a/proto.h b/proto.h index 688af73..ebd00fd 100644 --- a/proto.h +++ b/proto.h @@ -693,7 +693,6 @@ PERL_CALLCONV char* Perl_screaminstr(pTHX_ SV* bigsv, SV* littlesv, I32 start_sh PERL_CALLCONV I32 Perl_setenv_getix(pTHX_ char* nam); #endif PERL_CALLCONV void Perl_setdefout(pTHX_ GV* gv); -PERL_CALLCONV char* Perl_sharepvn(pTHX_ const char* sv, I32 len, U32 hash); PERL_CALLCONV HEK* Perl_share_hek(pTHX_ const char* sv, I32 len, U32 hash); PERL_CALLCONV Signal_t Perl_sighandler(int sig); PERL_CALLCONV SV** Perl_stack_grow(pTHX_ SV** sp, SV**p, int n);