Change 13436 by jhi@alpha on 2001/12/03 14:03:21
Make sharepvn a macro since all it does is a deref.
Affected files ...
.... //depot/perl/embed.h#312 edit
.... //depot/perl/embed.pl#301 edit
.... //depot/perl/global.sym#191 edit
.... //depot/perl/hv.c#93 edit
.... //depot/perl/hv.h#24 edit
.... //depot/perl/proto.h#355 edit
Differences ...
==== //depot/perl/embed.h#312 (text+w) ====
Index: perl/embed.h
--- perl/embed.h.~1~ Mon Dec 3 07:15:05 2001
+++ perl/embed.h Mon Dec 3 07:15:05 2001
@@ -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)
==== //depot/perl/embed.pl#301 (xtext) ====
Index: perl/embed.pl
--- perl/embed.pl.~1~ Mon Dec 3 07:15:05 2001
+++ perl/embed.pl Mon Dec 3 07:15:05 2001
@@ -1714,7 +1714,6 @@
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
==== //depot/perl/global.sym#191 (text+w) ====
Index: perl/global.sym
--- perl/global.sym.~1~ Mon Dec 3 07:15:05 2001
+++ perl/global.sym Mon Dec 3 07:15:05 2001
@@ -174,6 +174,7 @@
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_num
Perl_scan_oct
Perl_screaminstr
-Perl_sharepvn
Perl_stack_grow
Perl_start_subparse
Perl_sv_2bool
==== //depot/perl/hv.c#93 (text) ====
Index: perl/hv.c
--- perl/hv.c.~1~ Mon Dec 3 07:15:05 2001
+++ perl/hv.c Mon Dec 3 07:15:05 2001
@@ -1640,12 +1640,16 @@
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.
*/
==== //depot/perl/hv.h#24 (text) ====
Index: perl/hv.h
--- perl/hv.h.~1~ Mon Dec 3 07:15:05 2001
+++ perl/hv.h Mon Dec 3 07:15:05 2001
@@ -197,3 +197,7 @@
? (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)
==== //depot/perl/proto.h#355 (text+w) ====
Index: perl/proto.h
--- perl/proto.h.~1~ Mon Dec 3 07:15:05 2001
+++ perl/proto.h Mon Dec 3 07:15:05 2001
@@ -693,7 +693,6 @@
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);
End of Patch.