summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNicholas Clark <nick@ccl4.org>2005-10-29 14:39:37 +0000
committerNicholas Clark <nick@ccl4.org>2005-10-29 14:39:37 +0000
commit174c73e345a053498d612e92802b2f52a87c26bc (patch)
tree229b40596acda4d59f5b62a8b8155fd76c5498a2
parente424a81e12752daec8332495577eb8122f350b31 (diff)
downloadperl-174c73e345a053498d612e92802b2f52a87c26bc.tar.gz
Replace sv_unref with a macro that calls sv_unref_flags
p4raw-id: //depot/perl@25878
-rw-r--r--embed.fnc2
-rw-r--r--embed.h2
-rw-r--r--mathoms.c17
-rw-r--r--proto.h4
-rw-r--r--sv.c17
-rw-r--r--sv.h2
6 files changed, 22 insertions, 22 deletions
diff --git a/embed.fnc b/embed.fnc
index 9adba9848d..c4c85878a2 100644
--- a/embed.fnc
+++ b/embed.fnc
@@ -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
diff --git a/embed.h b/embed.h
index c383dc88eb..f99bc5b26f 100644
--- a/embed.h
+++ b/embed.h
@@ -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)
diff --git a/mathoms.c b/mathoms.c
index f165ba487b..04cff18a8f 100644
--- a/mathoms.c
+++ b/mathoms.c
@@ -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.
diff --git a/proto.h b/proto.h
index fd92ce31e6..f5914c98e2 100644
--- a/proto.h
+++ b/proto.h
@@ -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);
diff --git a/sv.c b/sv.c
index a15149c814..9b863ce459 100644
--- a/sv.c
+++ b/sv.c
@@ -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.
diff --git a/sv.h b/sv.h
index 0fff60910a..8dbbcb287c 100644
--- a/sv.h
+++ b/sv.h
@@ -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