diff options
author | Nicholas Clark <nick@ccl4.org> | 2007-12-20 20:23:45 +0000 |
---|---|---|
committer | David Mitchell <davem@iabyn.com> | 2009-03-05 16:30:05 +0000 |
commit | 30b566004db994e33ef11faf8f23af732b201519 (patch) | |
tree | efa1b3d9b280a2cbc14771c767761832cd037265 /hv.c | |
parent | 3acc3a7e97de03055a1f70f393a055e1d1d47674 (diff) | |
download | perl-30b566004db994e33ef11faf8f23af732b201519.tar.gz |
Similiarly Perl_newHV() can become a mathom by making newHV() a
wrapper around newSV_type() and tweaking Perl_sv_upgrade().
p4raw-id: //depot/perl@32676
(cherry picked from commit 78ac7dd9596fbc525d458adec628f7d991dfe43a)
Diffstat (limited to 'hv.c')
-rw-r--r-- | hv.c | 24 |
1 files changed, 0 insertions, 24 deletions
@@ -1316,30 +1316,6 @@ Perl_hv_ksplit(pTHX_ HV *hv, IV newmax) } } -/* -=for apidoc newHV - -Creates a new HV. The reference count is set to 1. - -=cut -*/ - -HV * -Perl_newHV(pTHX) -{ - register XPVHV* xhv; - HV * const hv = (HV*)newSV_type(SVt_PVHV); - xhv = (XPVHV*)SvANY(hv); - assert(!SvOK(hv)); -#ifndef NODEFAULT_SHAREKEYS - HvSHAREKEYS_on(hv); /* key-sharing on by default */ -#endif - - xhv->xhv_max = 7; /* HvMAX(hv) = 7 (start with 8 buckets) */ - xhv->xhv_fill = 0; /* HvFILL(hv) = 0 */ - return hv; -} - HV * Perl_newHVhv(pTHX_ HV *ohv) { |