diff options
author | Nicholas Clark <nick@ccl4.org> | 2005-06-12 21:59:34 +0000 |
---|---|---|
committer | Nicholas Clark <nick@ccl4.org> | 2005-06-12 21:59:34 +0000 |
commit | d1db91c62f7fa6ddc9f9a29f5ba20b5d381c9d4b (patch) | |
tree | 5b501a2c81e5c3f59ef23bb9d625bcfe6f2bd652 /hv.h | |
parent | 6c1b96a17296a211cb3d88901a67369582176a79 (diff) | |
download | perl-d1db91c62f7fa6ddc9f9a29f5ba20b5d381c9d4b.tar.gz |
Provide share_hek_hek, and use it for fast copying of shared string
scalars.
p4raw-id: //depot/perl@24811
Diffstat (limited to 'hv.h')
-rw-r--r-- | hv.h | 7 |
1 files changed, 7 insertions, 0 deletions
@@ -364,6 +364,13 @@ C<SV*>. #define Perl_sharepvn(sv, len, hash) HEK_KEY(share_hek(sv, len, hash)) #define sharepvn(sv, len, hash) Perl_sharepvn(sv, len, hash) +#define share_hek_hek(hek) \ + (++(((struct shared_he *)(((char *)hek) \ + - STRUCT_OFFSET(struct shared_he, \ + shared_he_hek))) \ + ->shared_he_he.hent_val), \ + hek) + /* * Local variables: * c-indentation-style: bsd |