summaryrefslogtreecommitdiff
path: root/sv.c
diff options
context:
space:
mode:
authorDoug MacEachern <dougm@covalent.net>2001-02-18 06:49:33 -0800
committerJarkko Hietaniemi <jhi@iki.fi>2001-02-19 00:23:41 +0000
commit4030fe4ad6ddcf55e0341ef163ebb1419014d565 (patch)
treeba61b1f08997a95e92a0dcd5a3977822918cc676 /sv.c
parentb8c8cfe2143ccc131c4ba2522f7e9a4aef4adb7a (diff)
downloadperl-4030fe4ad6ddcf55e0341ef163ebb1419014d565.tar.gz
[patch] add sv_setref_uv
Message-ID: <Pine.LNX.4.21.0102181448290.10021-100000@mako.covalent.net> p4raw-id: //depot/perl@8840
Diffstat (limited to 'sv.c')
-rw-r--r--sv.c19
1 files changed, 19 insertions, 0 deletions
diff --git a/sv.c b/sv.c
index ea360c3f6e..eeda889989 100644
--- a/sv.c
+++ b/sv.c
@@ -6349,6 +6349,25 @@ Perl_sv_setref_iv(pTHX_ SV *rv, const char *classname, IV iv)
}
/*
+=for apidoc sv_setref_uv
+
+Copies an unsigned integer into a new SV, optionally blessing the SV. The C<rv>
+argument will be upgraded to an RV. That RV will be modified to point to
+the new SV. The C<classname> argument indicates the package for the
+blessing. Set C<classname> to C<Nullch> to avoid the blessing. The new SV
+will be returned and will have a reference count of 1.
+
+=cut
+*/
+
+SV*
+Perl_sv_setref_uv(pTHX_ SV *rv, const char *classname, UV uv)
+{
+ sv_setuv(newSVrv(rv,classname), uv);
+ return rv;
+}
+
+/*
=for apidoc sv_setref_nv
Copies a double into a new SV, optionally blessing the SV. The C<rv>