This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
Stop turning off bit 1 in rv2cv private flags
[perl5.git] / mathoms.c
index 732e2a4..f9b9462 100644 (file)
--- a/mathoms.c
+++ b/mathoms.c
  *
  * The compilation of this file can be suppressed; see INSTALL
  *
+=head1 Obsolete backwards compatibility functions
+Some of these are also deprecated.  You can exclude these from
+your compiled Perl by adding this option to Configure:
+C<-Accflags='-DNO_MATHOMS'>
+
+=cut
+
  */
 
+
 #include "EXTERN.h"
 #define PERL_IN_MATHOMS_C
 #include "perl.h"
@@ -543,7 +551,6 @@ Perl_sv_utf8_upgrade(pTHX_ SV *sv)
 int
 Perl_fprintf_nocontext(PerlIO *stream, const char *format, ...)
 {
-    dTHXs;
     int ret = 0;
     va_list(arglist);
 
@@ -720,6 +727,7 @@ bool
 Perl_is_utf8_string_loc(pTHX_ const U8 *s, STRLEN len, const U8 **ep)
 {
     PERL_ARGS_ASSERT_IS_UTF8_STRING_LOC;
+    PERL_UNUSED_CONTEXT;
 
     return is_utf8_string_loclen(s, len, ep, 0);
 }
@@ -766,8 +774,6 @@ Perl_sv_nounlocking(pTHX_ SV *sv)
 void
 Perl_save_long(pTHX_ long int *longp)
 {
-    dVAR;
-
     PERL_ARGS_ASSERT_SAVE_LONG;
 
     SSCHECK(3);
@@ -779,8 +785,6 @@ Perl_save_long(pTHX_ long int *longp)
 void
 Perl_save_iv(pTHX_ IV *ivp)
 {
-    dVAR;
-
     PERL_ARGS_ASSERT_SAVE_IV;
 
     SSCHECK(3);
@@ -792,8 +796,6 @@ Perl_save_iv(pTHX_ IV *ivp)
 void
 Perl_save_nogv(pTHX_ GV *gv)
 {
-    dVAR;
-
     PERL_ARGS_ASSERT_SAVE_NOGV;
 
     SSCHECK(2);
@@ -804,7 +806,6 @@ Perl_save_nogv(pTHX_ GV *gv)
 void
 Perl_save_list(pTHX_ SV **sarg, I32 maxsarg)
 {
-    dVAR;
     I32 i;
 
     PERL_ARGS_ASSERT_SAVE_LIST;
@@ -1047,15 +1048,12 @@ Perl_sv_insert(pTHX_ SV *const bigstr, const STRLEN offset, const STRLEN len,
 void
 Perl_save_freesv(pTHX_ SV *sv)
 {
-    dVAR;
     save_freesv(sv);
 }
 
 void
 Perl_save_mortalizesv(pTHX_ SV *sv)
 {
-    dVAR;
-
     PERL_ARGS_ASSERT_SAVE_MORTALIZESV;
 
     save_mortalizesv(sv);
@@ -1064,21 +1062,18 @@ Perl_save_mortalizesv(pTHX_ SV *sv)
 void
 Perl_save_freeop(pTHX_ OP *o)
 {
-    dVAR;
     save_freeop(o);
 }
 
 void
 Perl_save_freepv(pTHX_ char *pv)
 {
-    dVAR;
     save_freepv(pv);
 }
 
 void
 Perl_save_op(pTHX)
 {
-    dVAR;
     save_op();
 }
 
@@ -1270,84 +1265,98 @@ Perl_is_uni_alpha(pTHX_ UV c)
 bool
 Perl_is_uni_ascii(pTHX_ UV c)
 {
+    PERL_UNUSED_CONTEXT;
     return isASCII_uni(c);
 }
 
 bool
 Perl_is_uni_blank(pTHX_ UV c)
 {
+    PERL_UNUSED_CONTEXT;
     return isBLANK_uni(c);
 }
 
 bool
 Perl_is_uni_space(pTHX_ UV c)
 {
+    PERL_UNUSED_CONTEXT;
     return isSPACE_uni(c);
 }
 
 bool
 Perl_is_uni_digit(pTHX_ UV c)
 {
+    PERL_UNUSED_CONTEXT;
     return isDIGIT_uni(c);
 }
 
 bool
 Perl_is_uni_upper(pTHX_ UV c)
 {
+    PERL_UNUSED_CONTEXT;
     return isUPPER_uni(c);
 }
 
 bool
 Perl_is_uni_lower(pTHX_ UV c)
 {
+    PERL_UNUSED_CONTEXT;
     return isLOWER_uni(c);
 }
 
 bool
 Perl_is_uni_cntrl(pTHX_ UV c)
 {
+    PERL_UNUSED_CONTEXT;
     return isCNTRL_L1(c);
 }
 
 bool
 Perl_is_uni_graph(pTHX_ UV c)
 {
+    PERL_UNUSED_CONTEXT;
     return isGRAPH_uni(c);
 }
 
 bool
 Perl_is_uni_print(pTHX_ UV c)
 {
+    PERL_UNUSED_CONTEXT;
     return isPRINT_uni(c);
 }
 
 bool
 Perl_is_uni_punct(pTHX_ UV c)
 {
+    PERL_UNUSED_CONTEXT;
     return isPUNCT_uni(c);
 }
 
 bool
 Perl_is_uni_xdigit(pTHX_ UV c)
 {
+    PERL_UNUSED_CONTEXT;
     return isXDIGIT_uni(c);
 }
 
 bool
 Perl_is_uni_alnum_lc(pTHX_ UV c)
 {
+    PERL_UNUSED_CONTEXT;
     return isWORDCHAR_LC_uvchr(c);
 }
 
 bool
 Perl_is_uni_alnumc_lc(pTHX_ UV c)
 {
+    PERL_UNUSED_CONTEXT;
     return isALPHANUMERIC_LC_uvchr(c);
 }
 
 bool
 Perl_is_uni_idfirst_lc(pTHX_ UV c)
 {
+    PERL_UNUSED_CONTEXT;
     /* XXX Should probably be something that resolves to the old IDFIRST, but
      * this function is deprecated, so not bothering */
     return isIDFIRST_LC_uvchr(c);
@@ -1356,24 +1365,28 @@ Perl_is_uni_idfirst_lc(pTHX_ UV c)
 bool
 Perl_is_uni_alpha_lc(pTHX_ UV c)
 {
+    PERL_UNUSED_CONTEXT;
     return isALPHA_LC_uvchr(c);
 }
 
 bool
 Perl_is_uni_ascii_lc(pTHX_ UV c)
 {
+    PERL_UNUSED_CONTEXT;
     return isASCII_LC_uvchr(c);
 }
 
 bool
 Perl_is_uni_blank_lc(pTHX_ UV c)
 {
+    PERL_UNUSED_CONTEXT;
     return isBLANK_LC_uvchr(c);
 }
 
 bool
 Perl_is_uni_space_lc(pTHX_ UV c)
 {
+    PERL_UNUSED_CONTEXT;
     return isSPACE_LC_uvchr(c);
 }
 
@@ -1394,8 +1407,6 @@ Perl_is_uni_idfirst(pTHX_ UV c)
 bool
 Perl_is_utf8_idfirst(pTHX_ const U8 *p) /* The naming is historical. */
 {
-    dVAR;
-
     PERL_ARGS_ASSERT_IS_UTF8_IDFIRST;
 
     return _is_utf8_idstart(p);
@@ -1404,8 +1415,6 @@ Perl_is_utf8_idfirst(pTHX_ const U8 *p) /* The naming is historical. */
 bool
 Perl_is_utf8_xidfirst(pTHX_ const U8 *p) /* The naming is historical. */
 {
-    dVAR;
-
     PERL_ARGS_ASSERT_IS_UTF8_XIDFIRST;
 
     return _is_utf8_xidstart(p);
@@ -1414,8 +1423,6 @@ Perl_is_utf8_xidfirst(pTHX_ const U8 *p) /* The naming is historical. */
 bool
 Perl_is_utf8_idcont(pTHX_ const U8 *p)
 {
-    dVAR;
-
     PERL_ARGS_ASSERT_IS_UTF8_IDCONT;
 
     return _is_utf8_idcont(p);
@@ -1424,8 +1431,6 @@ Perl_is_utf8_idcont(pTHX_ const U8 *p)
 bool
 Perl_is_utf8_xidcont(pTHX_ const U8 *p)
 {
-    dVAR;
-
     PERL_ARGS_ASSERT_IS_UTF8_XIDCONT;
 
     return _is_utf8_xidcont(p);
@@ -1506,8 +1511,6 @@ Perl_to_uni_lower_lc(pTHX_ U32 c)
 bool
 Perl_is_utf8_alnum(pTHX_ const U8 *p)
 {
-    dVAR;
-
     PERL_ARGS_ASSERT_IS_UTF8_ALNUM;
 
     /* NOTE: "IsWord", not "IsAlnum", since Alnum is a true
@@ -1519,8 +1522,6 @@ Perl_is_utf8_alnum(pTHX_ const U8 *p)
 bool
 Perl_is_utf8_alnumc(pTHX_ const U8 *p)
 {
-    dVAR;
-
     PERL_ARGS_ASSERT_IS_UTF8_ALNUMC;
 
     return isALPHANUMERIC_utf8(p);
@@ -1529,8 +1530,6 @@ Perl_is_utf8_alnumc(pTHX_ const U8 *p)
 bool
 Perl_is_utf8_alpha(pTHX_ const U8 *p)
 {
-    dVAR;
-
     PERL_ARGS_ASSERT_IS_UTF8_ALPHA;
 
     return isALPHA_utf8(p);
@@ -1539,9 +1538,8 @@ Perl_is_utf8_alpha(pTHX_ const U8 *p)
 bool
 Perl_is_utf8_ascii(pTHX_ const U8 *p)
 {
-    dVAR;
-
     PERL_ARGS_ASSERT_IS_UTF8_ASCII;
+    PERL_UNUSED_CONTEXT;
 
     return isASCII_utf8(p);
 }
@@ -1549,9 +1547,8 @@ Perl_is_utf8_ascii(pTHX_ const U8 *p)
 bool
 Perl_is_utf8_blank(pTHX_ const U8 *p)
 {
-    dVAR;
-
     PERL_ARGS_ASSERT_IS_UTF8_BLANK;
+    PERL_UNUSED_CONTEXT;
 
     return isBLANK_utf8(p);
 }
@@ -1559,9 +1556,8 @@ Perl_is_utf8_blank(pTHX_ const U8 *p)
 bool
 Perl_is_utf8_space(pTHX_ const U8 *p)
 {
-    dVAR;
-
     PERL_ARGS_ASSERT_IS_UTF8_SPACE;
+    PERL_UNUSED_CONTEXT;
 
     return isSPACE_utf8(p);
 }
@@ -1569,9 +1565,8 @@ Perl_is_utf8_space(pTHX_ const U8 *p)
 bool
 Perl_is_utf8_perl_space(pTHX_ const U8 *p)
 {
-    dVAR;
-
     PERL_ARGS_ASSERT_IS_UTF8_PERL_SPACE;
+    PERL_UNUSED_CONTEXT;
 
     /* Only true if is an ASCII space-like character, and ASCII is invariant
      * under utf8, so can just use the macro */
@@ -1581,9 +1576,8 @@ Perl_is_utf8_perl_space(pTHX_ const U8 *p)
 bool
 Perl_is_utf8_perl_word(pTHX_ const U8 *p)
 {
-    dVAR;
-
     PERL_ARGS_ASSERT_IS_UTF8_PERL_WORD;
+    PERL_UNUSED_CONTEXT;
 
     /* Only true if is an ASCII word character, and ASCII is invariant
      * under utf8, so can just use the macro */
@@ -1593,8 +1587,6 @@ Perl_is_utf8_perl_word(pTHX_ const U8 *p)
 bool
 Perl_is_utf8_digit(pTHX_ const U8 *p)
 {
-    dVAR;
-
     PERL_ARGS_ASSERT_IS_UTF8_DIGIT;
 
     return isDIGIT_utf8(p);
@@ -1603,9 +1595,8 @@ Perl_is_utf8_digit(pTHX_ const U8 *p)
 bool
 Perl_is_utf8_posix_digit(pTHX_ const U8 *p)
 {
-    dVAR;
-
     PERL_ARGS_ASSERT_IS_UTF8_POSIX_DIGIT;
+    PERL_UNUSED_CONTEXT;
 
     /* Only true if is an ASCII digit character, and ASCII is invariant
      * under utf8, so can just use the macro */
@@ -1615,8 +1606,6 @@ Perl_is_utf8_posix_digit(pTHX_ const U8 *p)
 bool
 Perl_is_utf8_upper(pTHX_ const U8 *p)
 {
-    dVAR;
-
     PERL_ARGS_ASSERT_IS_UTF8_UPPER;
 
     return isUPPER_utf8(p);
@@ -1625,8 +1614,6 @@ Perl_is_utf8_upper(pTHX_ const U8 *p)
 bool
 Perl_is_utf8_lower(pTHX_ const U8 *p)
 {
-    dVAR;
-
     PERL_ARGS_ASSERT_IS_UTF8_LOWER;
 
     return isLOWER_utf8(p);
@@ -1635,9 +1622,8 @@ Perl_is_utf8_lower(pTHX_ const U8 *p)
 bool
 Perl_is_utf8_cntrl(pTHX_ const U8 *p)
 {
-    dVAR;
-
     PERL_ARGS_ASSERT_IS_UTF8_CNTRL;
+    PERL_UNUSED_CONTEXT;
 
     return isCNTRL_utf8(p);
 }
@@ -1645,8 +1631,6 @@ Perl_is_utf8_cntrl(pTHX_ const U8 *p)
 bool
 Perl_is_utf8_graph(pTHX_ const U8 *p)
 {
-    dVAR;
-
     PERL_ARGS_ASSERT_IS_UTF8_GRAPH;
 
     return isGRAPH_utf8(p);
@@ -1655,8 +1639,6 @@ Perl_is_utf8_graph(pTHX_ const U8 *p)
 bool
 Perl_is_utf8_print(pTHX_ const U8 *p)
 {
-    dVAR;
-
     PERL_ARGS_ASSERT_IS_UTF8_PRINT;
 
     return isPRINT_utf8(p);
@@ -1665,8 +1647,6 @@ Perl_is_utf8_print(pTHX_ const U8 *p)
 bool
 Perl_is_utf8_punct(pTHX_ const U8 *p)
 {
-    dVAR;
-
     PERL_ARGS_ASSERT_IS_UTF8_PUNCT;
 
     return isPUNCT_utf8(p);
@@ -1675,9 +1655,8 @@ Perl_is_utf8_punct(pTHX_ const U8 *p)
 bool
 Perl_is_utf8_xdigit(pTHX_ const U8 *p)
 {
-    dVAR;
-
     PERL_ARGS_ASSERT_IS_UTF8_XDIGIT;
+    PERL_UNUSED_CONTEXT;
 
     return isXDIGIT_utf8(p);
 }
@@ -1685,8 +1664,6 @@ Perl_is_utf8_xdigit(pTHX_ const U8 *p)
 bool
 Perl_is_utf8_mark(pTHX_ const U8 *p)
 {
-    dVAR;
-
     PERL_ARGS_ASSERT_IS_UTF8_MARK;
 
     return _is_utf8_mark(p);