summaryrefslogtreecommitdiff
path: root/hv.h
diff options
context:
space:
mode:
authorNicholas Clark <nick@ccl4.org>2007-12-20 20:23:45 +0000
committerNicholas Clark <nick@ccl4.org>2007-12-20 20:23:45 +0000
commit78ac7dd9596fbc525d458adec628f7d991dfe43a (patch)
tree06c246ec59c74eb07d3f3c531e209c7ff32ed165 /hv.h
parentac572bf4fde55cf563ae338dfe4e12b22ebc6d80 (diff)
downloadperl-78ac7dd9596fbc525d458adec628f7d991dfe43a.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
Diffstat (limited to 'hv.h')
-rw-r--r--hv.h10
1 files changed, 10 insertions, 0 deletions
diff --git a/hv.h b/hv.h
index b8d6b7d243..dd35ae58e6 100644
--- a/hv.h
+++ b/hv.h
@@ -528,6 +528,16 @@ struct refcounted_he {
#define HV_DELETE 0x40
/*
+=for apidoc newHV
+
+Creates a new HV. The reference count is set to 1.
+
+=cut
+*/
+
+#define newHV() ((HV*)newSV_type(SVt_PVHV))
+
+/*
* Local variables:
* c-indentation-style: bsd
* c-basic-offset: 4