This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
sv_taint() can easily be replaced by a macro.
[perl5.git] / mathoms.c
index d58beb8..f165ba4 100644 (file)
--- a/mathoms.c
+++ b/mathoms.c
@@ -36,6 +36,19 @@ Perl_ref(pTHX_ OP *o, I32 type)
     return doref(o, type, TRUE);
 }
 
+/*
+=for apidoc sv_taint
+
+Taint an SV. Use C<SvTAINTED_on> instead.
+=cut
+*/
+
+void
+Perl_sv_taint(pTHX_ SV *sv)
+{
+    sv_magic((sv), Nullsv, PERL_MAGIC_taint, Nullch, 0);
+}
+
 /* sv_2iv() is now a macro using Perl_sv_2iv_flags();
  * this function provided for binary compatibility only
  */