summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJarkko Hietaniemi <jhi@iki.fi>2000-03-18 19:08:40 +0000
committerJarkko Hietaniemi <jhi@iki.fi>2000-03-18 19:08:40 +0000
commit1a3327fb7deb3868ef5f43054de7364d8208e8e7 (patch)
tree8c980bb5a7ab704f0859cfe55e81e499a7ca69bd
parentf78bfc9cd1f8635ff74b5498755525103ee2e6b3 (diff)
downloadperl-1a3327fb7deb3868ef5f43054de7364d8208e8e7.tar.gz
Add newSVuv().
p4raw-id: //depot/cfgperl@5803
-rwxr-xr-xConfigure2
-rwxr-xr-xembed.pl1
-rw-r--r--global.sym1
-rw-r--r--objXSUB.h4
-rwxr-xr-xperlapi.c7
-rw-r--r--pod/perlapi.pod17
-rw-r--r--proto.h1
-rw-r--r--sv.c19
8 files changed, 46 insertions, 6 deletions
diff --git a/Configure b/Configure
index 237d2f9ba9..f722d38937 100755
--- a/Configure
+++ b/Configure
@@ -20,7 +20,7 @@
# $Id: Head.U,v 3.0.1.9 1997/02/28 15:02:09 ram Exp $
#
-# Generated on Sat Mar 18 18:51:21 EET 2000 [metaconfig 3.0 PL70]
+# Generated on Sat Mar 18 19:51:46 EET 2000 [metaconfig 3.0 PL70]
# (with additional metaconfig patches by perlbug@perl.com)
cat >/tmp/c1$$ <<EOF
diff --git a/embed.pl b/embed.pl
index 0593f0403a..27dd1c5195 100755
--- a/embed.pl
+++ b/embed.pl
@@ -1769,6 +1769,7 @@ Ap |SV* |newSV |STRLEN len
Ap |OP* |newSVREF |OP* o
Ap |OP* |newSVOP |I32 type|I32 flags|SV* sv
Apd |SV* |newSViv |IV i
+Apd |SV* |newSVuv |UV u
Apd |SV* |newSVnv |NV n
Apd |SV* |newSVpv |const char* s|STRLEN len
Apd |SV* |newSVpvn |const char* s|STRLEN len
diff --git a/global.sym b/global.sym
index 7a97668caf..95e7775609 100644
--- a/global.sym
+++ b/global.sym
@@ -272,6 +272,7 @@ Perl_newSV
Perl_newSVREF
Perl_newSVOP
Perl_newSViv
+Perl_newSVuv
Perl_newSVnv
Perl_newSVpv
Perl_newSVpvn
diff --git a/objXSUB.h b/objXSUB.h
index 4e6508f460..68c31b0538 100644
--- a/objXSUB.h
+++ b/objXSUB.h
@@ -1073,6 +1073,10 @@
#define Perl_newSViv pPerl->Perl_newSViv
#undef newSViv
#define newSViv Perl_newSViv
+#undef Perl_newSVuv
+#define Perl_newSVuv pPerl->Perl_newSVuv
+#undef newSVuv
+#define newSVuv Perl_newSVuv
#undef Perl_newSVnv
#define Perl_newSVnv pPerl->Perl_newSVnv
#undef newSVnv
diff --git a/perlapi.c b/perlapi.c
index b396d6bae4..787c2f220c 100755
--- a/perlapi.c
+++ b/perlapi.c
@@ -1963,6 +1963,13 @@ Perl_newSViv(pTHXo_ IV i)
return ((CPerlObj*)pPerl)->Perl_newSViv(i);
}
+#undef Perl_newSVuv
+SV*
+Perl_newSVuv(pTHXo_ UV u)
+{
+ return ((CPerlObj*)pPerl)->Perl_newSVuv(u);
+}
+
#undef Perl_newSVnv
SV*
Perl_newSVnv(pTHXo_ NV n)
diff --git a/pod/perlapi.pod b/pod/perlapi.pod
index c13dcde6ff..32e77d6f07 100644
--- a/pod/perlapi.pod
+++ b/pod/perlapi.pod
@@ -897,6 +897,13 @@ Creates a new SV which is an exact duplicate of the original SV.
SV* newSVsv(SV* old)
+=item newSVuv
+
+Creates a new SV and copies an unsigned integer into it.
+The reference count for the SV is set to 1.
+
+ SV* newSVuv(UV u)
+
=item newXS
Used by C<xsubpp> to hook up XSUBs as Perl subs.
@@ -1590,17 +1597,17 @@ false, defined or undefined. Does not handle 'get' magic.
bool SvTRUE(SV* sv)
+=item svtype
+
+An enum of flags for Perl types. These are found in the file B<sv.h>
+in the C<svtype> enum. Test these flags with the C<SvTYPE> macro.
+
=item SvTYPE
Returns the type of the SV. See C<svtype>.
svtype SvTYPE(SV* sv)
-=item svtype
-
-An enum of flags for Perl types. These are found in the file B<sv.h>
-in the C<svtype> enum. Test these flags with the C<SvTYPE> macro.
-
=item SVt_IV
Integer type flag for scalars. See C<svtype>.
diff --git a/proto.h b/proto.h
index 37a7bdc8a7..1be9992ffb 100644
--- a/proto.h
+++ b/proto.h
@@ -541,6 +541,7 @@ PERL_CALLCONV SV* Perl_newSV(pTHX_ STRLEN len);
PERL_CALLCONV OP* Perl_newSVREF(pTHX_ OP* o);
PERL_CALLCONV OP* Perl_newSVOP(pTHX_ I32 type, I32 flags, SV* sv);
PERL_CALLCONV SV* Perl_newSViv(pTHX_ IV i);
+PERL_CALLCONV SV* Perl_newSVuv(pTHX_ UV u);
PERL_CALLCONV SV* Perl_newSVnv(pTHX_ NV n);
PERL_CALLCONV SV* Perl_newSVpv(pTHX_ const char* s, STRLEN len);
PERL_CALLCONV SV* Perl_newSVpvn(pTHX_ const char* s, STRLEN len);
diff --git a/sv.c b/sv.c
index e2b740d2df..f6f49d28a2 100644
--- a/sv.c
+++ b/sv.c
@@ -4743,6 +4743,25 @@ Perl_newSViv(pTHX_ IV i)
}
/*
+=for apidoc newSVuv
+
+Creates a new SV and copies an unsigned integer into it.
+The reference count for the SV is set to 1.
+
+=cut
+*/
+
+SV *
+Perl_newSVuv(pTHX_ UV u)
+{
+ register SV *sv;
+
+ new_SV(sv);
+ sv_setuv(sv,u);
+ return sv;
+}
+
+/*
=for apidoc newRV_noinc
Creates an RV wrapper for an SV. The reference count for the original