diff options
author | Jarkko Hietaniemi <jhi@iki.fi> | 2000-03-18 19:08:40 +0000 |
---|---|---|
committer | Jarkko Hietaniemi <jhi@iki.fi> | 2000-03-18 19:08:40 +0000 |
commit | 1a3327fb7deb3868ef5f43054de7364d8208e8e7 (patch) | |
tree | 8c980bb5a7ab704f0859cfe55e81e499a7ca69bd | |
parent | f78bfc9cd1f8635ff74b5498755525103ee2e6b3 (diff) | |
download | perl-1a3327fb7deb3868ef5f43054de7364d8208e8e7.tar.gz |
Add newSVuv().
p4raw-id: //depot/cfgperl@5803
-rwxr-xr-x | Configure | 2 | ||||
-rwxr-xr-x | embed.pl | 1 | ||||
-rw-r--r-- | global.sym | 1 | ||||
-rw-r--r-- | objXSUB.h | 4 | ||||
-rwxr-xr-x | perlapi.c | 7 | ||||
-rw-r--r-- | pod/perlapi.pod | 17 | ||||
-rw-r--r-- | proto.h | 1 | ||||
-rw-r--r-- | sv.c | 19 |
8 files changed, 46 insertions, 6 deletions
@@ -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 @@ -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 @@ -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 @@ -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>. @@ -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); @@ -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 |