This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
Add newSVuv().
authorJarkko Hietaniemi <jhi@iki.fi>
Sat, 18 Mar 2000 19:08:40 +0000 (19:08 +0000)
committerJarkko Hietaniemi <jhi@iki.fi>
Sat, 18 Mar 2000 19:08:40 +0000 (19:08 +0000)
p4raw-id: //depot/cfgperl@5803

Configure
embed.pl
global.sym
objXSUB.h
perlapi.c
pod/perlapi.pod
proto.h
sv.c

index 237d2f9..f722d38 100755 (executable)
--- a/Configure
+++ b/Configure
@@ -20,7 +20,7 @@
 
 # $Id: Head.U,v 3.0.1.9 1997/02/28 15:02:09 ram Exp $
 #
 
 # $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
 # (with additional metaconfig patches by perlbug@perl.com)
 
 cat >/tmp/c1$$ <<EOF
index 0593f04..27dd1c5 100755 (executable)
--- 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
 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
 Apd    |SV*    |newSVnv        |NV n
 Apd    |SV*    |newSVpv        |const char* s|STRLEN len
 Apd    |SV*    |newSVpvn       |const char* s|STRLEN len
index 7a97668..95e7775 100644 (file)
@@ -272,6 +272,7 @@ Perl_newSV
 Perl_newSVREF
 Perl_newSVOP
 Perl_newSViv
 Perl_newSVREF
 Perl_newSVOP
 Perl_newSViv
+Perl_newSVuv
 Perl_newSVnv
 Perl_newSVpv
 Perl_newSVpvn
 Perl_newSVnv
 Perl_newSVpv
 Perl_newSVpvn
index 4e6508f..68c31b0 100644 (file)
--- a/objXSUB.h
+++ b/objXSUB.h
 #define Perl_newSViv           pPerl->Perl_newSViv
 #undef  newSViv
 #define newSViv                        Perl_newSViv
 #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
 #undef  Perl_newSVnv
 #define Perl_newSVnv           pPerl->Perl_newSVnv
 #undef  newSVnv
index b396d6b..787c2f2 100755 (executable)
--- a/perlapi.c
+++ b/perlapi.c
@@ -1963,6 +1963,13 @@ Perl_newSViv(pTHXo_ IV i)
     return ((CPerlObj*)pPerl)->Perl_newSViv(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)
 #undef  Perl_newSVnv
 SV*
 Perl_newSVnv(pTHXo_ NV n)
index c13dcde..32e77d6 100644 (file)
@@ -897,6 +897,13 @@ Creates a new SV which is an exact duplicate of the original SV.
 
        SV*     newSVsv(SV* old)
 
 
        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.
 =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)
 
 
        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
 
 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>.
 =item SVt_IV
 
 Integer type flag for scalars.  See C<svtype>.
diff --git a/proto.h b/proto.h
index 37a7bdc..1be9992 100644 (file)
--- 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 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);
 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 e2b740d..f6f49d2 100644 (file)
--- 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
 =for apidoc newRV_noinc
 
 Creates an RV wrapper for an SV.  The reference count for the original