summaryrefslogtreecommitdiff
path: root/mathoms.c
diff options
context:
space:
mode:
authorNicholas Clark <nick@ccl4.org>2006-04-16 11:03:28 +0000
committerNicholas Clark <nick@ccl4.org>2006-04-16 11:03:28 +0000
commit47518d95dc53ff6c3eab1e57e355d65c518ebfa5 (patch)
tree7a6c2bacad02be8716b0f1896436d2e00c6fdad3 /mathoms.c
parent69d25b4f32e8b88ba21011f0df2af3779b14626d (diff)
downloadperl-47518d95dc53ff6c3eab1e57e355d65c518ebfa5.tar.gz
Merge sv_usepvn and sv_usepvn_mg into sv_usepvn_flags. "Promote" the
other two to mathoms.c p4raw-id: //depot/perl@27840
Diffstat (limited to 'mathoms.c')
-rw-r--r--mathoms.c31
1 files changed, 31 insertions, 0 deletions
diff --git a/mathoms.c b/mathoms.c
index 3636a9b0fe..967e0353ec 100644
--- a/mathoms.c
+++ b/mathoms.c
@@ -1205,6 +1205,37 @@ Perl_save_destructor(pTHX_ DESTRUCTORFUNC_NOCONTEXT_t f, void* p)
SSPUSHINT(SAVEt_DESTRUCTOR);
}
+
+/*
+=for apidoc sv_usepvn_mg
+
+Like C<sv_usepvn>, but also handles 'set' magic.
+
+=cut
+*/
+
+void
+Perl_sv_usepvn_mg(pTHX_ SV *sv, char *ptr, STRLEN len)
+{
+ sv_usepvn_flags(sv,ptr,len, SV_SMAGIC);
+}
+
+/*
+=for apidoc sv_usepvn
+
+Tells an SV to use C<ptr> to find its string value. Implemented by
+calling C<sv_usepvn_flags> with C<flags> of 0, hence does not handle 'set'
+magic. See C<sv_usepvn_flags>.
+
+=cut
+*/
+
+void
+Perl_sv_usepvn(pTHX_ SV *sv, char *ptr, STRLEN len)
+{
+ sv_usepvn_flags(sv,ptr,len, 0);
+}
+
#endif /* NO_MATHOMS */
/*