This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
Some deprecated warnings were also in the syntax category
[perl5.git] / scope.h
diff --git a/scope.h b/scope.h
index bb033e3..25ccbf6 100644 (file)
--- a/scope.h
+++ b/scope.h
@@ -1,7 +1,7 @@
 /*    scope.h
  *
- *    Copyright (C) 1993, 1994, 1996, 1997, 1998, 1999,
- *    2000, 2001, 2002, 2004, 2005, 2006, 2007 by Larry Wall and others
+ *    Copyright (C) 1993, 1994, 1996, 1997, 1998, 1999, 2000, 2001,
+ *    2002, 2004, 2005, 2006, 2007, 2008 by Larry Wall and others
  *
  *    You may distribute under the terms of either the GNU General Public
  *    License or the Artistic License, as specified in the README file.
@@ -127,8 +127,8 @@ Closing bracket on a callback.  See C<ENTER> and L<perlcall>.
 #define SAVEPPTR(s)    save_pptr((char**)&(s))
 #define SAVEVPTR(s)    save_vptr((void*)&(s))
 #define SAVEPADSVANDMORTALIZE(s)       save_padsv_and_mortalize(s)
-#define SAVEFREESV(s)  save_freesv((SV*)(s))
-#define SAVEMORTALIZESV(s)     save_mortalizesv((SV*)(s))
+#define SAVEFREESV(s)  save_freesv(MUTABLE_SV(s))
+#define SAVEMORTALIZESV(s)     save_mortalizesv(MUTABLE_SV(s))
 #define SAVEFREEOP(o)  save_freeop((OP*)(o))
 #define SAVEFREEPV(p)  save_freepv((char*)(p))
 #define SAVECLEARSV(sv)        save_clearsv((SV**)&(sv))
@@ -137,7 +137,7 @@ Closing bracket on a callback.  See C<ENTER> and L<perlcall>.
 #define SAVESHAREDPV(s)                save_shared_pvref((char**)&(s))
 #define SAVESETSVFLAGS(sv,mask,val)    save_set_svflags(sv,mask,val)
 #define SAVEDELETE(h,k,l) \
-         save_delete((HV*)(h), (char*)(k), (I32)(l))
+         save_delete(MUTABLE_HV(h), (char*)(k), (I32)(l))
 #define SAVEDESTRUCTOR(f,p) \
          save_destructor((DESTRUCTORFUNC_NOCONTEXT_t)(f), (void*)(p))
 
@@ -173,15 +173,15 @@ Closing bracket on a callback.  See C<ENTER> and L<perlcall>.
 #define SAVECOMPPAD() \
     STMT_START {                                               \
        SSCHECK(2);                                             \
-       SSPUSHPTR((SV*)PL_comppad);                             \
+       SSPUSHPTR(MUTABLE_SV(PL_comppad));                      \
        SSPUSHINT(SAVEt_COMPPAD);                               \
     } STMT_END
 
 #define SAVESWITCHSTACK(f,t) \
     STMT_START {                                       \
        SSCHECK(3);                                     \
-       SSPUSHPTR((SV*)(f));                            \
-       SSPUSHPTR((SV*)(t));                            \
+       SSPUSHPTR(MUTABLE_SV(f));                       \
+       SSPUSHPTR(MUTABLE_SV(t));                       \
        SSPUSHINT(SAVEt_SAVESWITCHSTACK);               \
        SWITCHSTACK((f),(t));                           \
        PL_curstackinfo->si_stack = (t);                \