summaryrefslogtreecommitdiff
path: root/proto.h
diff options
context:
space:
mode:
authorNick Ing-Simmons <nik@tiuk.ti.com>2000-09-03 21:54:46 +0000
committerNick Ing-Simmons <nik@tiuk.ti.com>2000-09-03 21:54:46 +0000
commit1c846c1f6d96d2ca4dfccdcfc0ff050c1474993e (patch)
tree052cab67c23c5f42f2f3fbf0d595e76961d271d2 /proto.h
parent6570e624857a0fc90e8fa87d3479a32bd7482703 (diff)
downloadperl-1c846c1f6d96d2ca4dfccdcfc0ff050c1474993e.tar.gz
Hash lookup of constant strings optimization:
Introduce SvREADONLY && SvFAKE to flag an SV which has SvPVX pointing to string table (as per sharepvn). Add newSV_pvn_share to create such a thing. Make hv.c compare addresses of strings and skip string compare if equal. Make method_named and helem ops use these shared-string SVs when arg is constant. Make keys op return shared-string SVs (less clearly a win). p4raw-id: //depot/perl@7016
Diffstat (limited to 'proto.h')
-rw-r--r--proto.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/proto.h b/proto.h
index 931997cf96..ed08b20c8e 100644
--- a/proto.h
+++ b/proto.h
@@ -551,6 +551,7 @@ PERL_CALLCONV SV* Perl_newSVuv(pTHX_ UV u);
PERL_CALLCONV SV* Perl_newSVnv(pTHX_ NV n);
PERL_CALLCONV SV* Perl_newSVpv(pTHX_ const char* s, STRLEN len);
PERL_CALLCONV SV* Perl_newSVpvn(pTHX_ const char* s, STRLEN len);
+PERL_CALLCONV SV* Perl_newSVpvn_share(pTHX_ const char* s, STRLEN len, U32 hash);
PERL_CALLCONV SV* Perl_newSVpvf(pTHX_ const char* pat, ...)
#ifdef CHECK_FORMAT
__attribute__((format(printf,pTHX_1,pTHX_2)))