diff options
author | Nicholas Clark <nick@ccl4.org> | 2005-10-29 14:39:37 +0000 |
---|---|---|
committer | Nicholas Clark <nick@ccl4.org> | 2005-10-29 14:39:37 +0000 |
commit | 174c73e345a053498d612e92802b2f52a87c26bc (patch) | |
tree | 229b40596acda4d59f5b62a8b8155fd76c5498a2 | |
parent | e424a81e12752daec8332495577eb8122f350b31 (diff) | |
download | perl-174c73e345a053498d612e92802b2f52a87c26bc.tar.gz |
Replace sv_unref with a macro that calls sv_unref_flags
p4raw-id: //depot/perl@25878
-rw-r--r-- | embed.fnc | 2 | ||||
-rw-r--r-- | embed.h | 2 | ||||
-rw-r--r-- | mathoms.c | 17 | ||||
-rw-r--r-- | proto.h | 4 | ||||
-rw-r--r-- | sv.c | 17 | ||||
-rw-r--r-- | sv.h | 2 |
6 files changed, 22 insertions, 22 deletions
@@ -814,7 +814,7 @@ Amdb |void |sv_setsv |NN SV* dsv|NULLOK SV* ssv Amdb |void |sv_taint |NN SV* sv ApdR |bool |sv_tainted |NN SV* sv Apd |int |sv_unmagic |NN SV* sv|int type -Apd |void |sv_unref |NN SV* sv +Apdmb |void |sv_unref |NN SV* sv Apd |void |sv_unref_flags |NN SV* sv|U32 flags Apd |void |sv_untaint |NN SV* sv Apd |void |sv_upgrade |NN SV* sv|U32 mt @@ -855,7 +855,6 @@ #define sv_setpvn Perl_sv_setpvn #define sv_tainted Perl_sv_tainted #define sv_unmagic Perl_sv_unmagic -#define sv_unref Perl_sv_unref #define sv_unref_flags Perl_sv_unref_flags #define sv_untaint Perl_sv_untaint #define sv_upgrade Perl_sv_upgrade @@ -2848,7 +2847,6 @@ #define sv_setpvn(a,b,c) Perl_sv_setpvn(aTHX_ a,b,c) #define sv_tainted(a) Perl_sv_tainted(aTHX_ a) #define sv_unmagic(a,b) Perl_sv_unmagic(aTHX_ a,b) -#define sv_unref(a) Perl_sv_unref(aTHX_ a) #define sv_unref_flags(a,b) Perl_sv_unref_flags(aTHX_ a,b) #define sv_untaint(a) Perl_sv_untaint(aTHX_ a) #define sv_upgrade(a,b) Perl_sv_upgrade(aTHX_ a,b) @@ -37,6 +37,23 @@ Perl_ref(pTHX_ OP *o, I32 type) } /* +=for apidoc sv_unref + +Unsets the RV status of the SV, and decrements the reference count of +whatever was being referenced by the RV. This can almost be thought of +as a reversal of C<newSVrv>. This is C<sv_unref_flags> with the C<flag> +being zero. See C<SvROK_off>. + +=cut +*/ + +void +Perl_sv_unref(pTHX_ SV *sv) +{ + sv_unref_flags(sv, 0); +} + +/* =for apidoc sv_taint Taint an SV. Use C<SvTAINTED_on> instead. @@ -2258,8 +2258,8 @@ PERL_CALLCONV bool Perl_sv_tainted(pTHX_ SV* sv) PERL_CALLCONV int Perl_sv_unmagic(pTHX_ SV* sv, int type) __attribute__nonnull__(pTHX_1); -PERL_CALLCONV void Perl_sv_unref(pTHX_ SV* sv) - __attribute__nonnull__(pTHX_1); +/* PERL_CALLCONV void Perl_sv_unref(pTHX_ SV* sv) + __attribute__nonnull__(pTHX_1); */ PERL_CALLCONV void Perl_sv_unref_flags(pTHX_ SV* sv, U32 flags) __attribute__nonnull__(pTHX_1); @@ -8319,23 +8319,6 @@ Perl_sv_unref_flags(pTHX_ SV *ref, U32 flags) } /* -=for apidoc sv_unref - -Unsets the RV status of the SV, and decrements the reference count of -whatever was being referenced by the RV. This can almost be thought of -as a reversal of C<newSVrv>. This is C<sv_unref_flags> with the C<flag> -being zero. See C<SvROK_off>. - -=cut -*/ - -void -Perl_sv_unref(pTHX_ SV *sv) -{ - sv_unref_flags(sv, 0); -} - -/* =for apidoc sv_untaint Untaint an SV. Use C<SvTAINTED_off> instead. @@ -1349,6 +1349,8 @@ Like C<sv_catsv> but doesn't process magic. #define SV_CONST_RETURN 32 #define SV_MUTABLE_RETURN 64 +#define sv_unref(sv) sv_unref_flags(sv, 0) + /* We are about to replace the SV's current value. So if it's copy on write we need to normalise it. Use the SV_COW_DROP_PV flag hint to say that the value is about to get thrown away, so drop the PV rather than go to |