summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--perl.h10
-rw-r--r--scope.h32
2 files changed, 14 insertions, 28 deletions
diff --git a/perl.h b/perl.h
index de55634b25..dccbf014f1 100644
--- a/perl.h
+++ b/perl.h
@@ -362,16 +362,6 @@ register struct op *Perl_op asm(stringify(OP_IN_REGISTER));
#define WITH_THX(s) STMT_START { dTHX; s; } STMT_END
#define WITH_THR(s) WITH_THX(s)
-/*
- * SOFT_CAST can be used for args to prototyped functions to retain some
- * type checking; it only casts if the compiler does not know prototypes.
- */
-#if defined(CAN_PROTOTYPE) && defined(DEBUGGING_COMPILE)
-#define SOFT_CAST(type)
-#else
-#define SOFT_CAST(type) (type)
-#endif
-
#ifndef BYTEORDER /* Should never happen -- byteorder is in config.h */
# define BYTEORDER 0x1234
#endif
diff --git a/scope.h b/scope.h
index 6a1c90e3ca..cace24689d 100644
--- a/scope.h
+++ b/scope.h
@@ -111,37 +111,33 @@ Closing bracket on a callback. See C<ENTER> and L<perlcall>.
#endif
#define LEAVE_SCOPE(old) if (PL_savestack_ix > old) leave_scope(old)
-/*
- * Not using SOFT_CAST on SAVESPTR, SAVEGENERICSV and SAVEFREESV
- * because these are used for several kinds of pointer values
- */
-#define SAVEI8(i) save_I8(SOFT_CAST(I8*)&(i))
-#define SAVEI16(i) save_I16(SOFT_CAST(I16*)&(i))
-#define SAVEI32(i) save_I32(SOFT_CAST(I32*)&(i))
-#define SAVEINT(i) save_int(SOFT_CAST(int*)&(i))
-#define SAVEIV(i) save_iv(SOFT_CAST(IV*)&(i))
-#define SAVELONG(l) save_long(SOFT_CAST(long*)&(l))
-#define SAVEBOOL(b) save_bool(SOFT_CAST(bool*)&(b))
+#define SAVEI8(i) save_I8((I8*)&(i))
+#define SAVEI16(i) save_I16((I16*)&(i))
+#define SAVEI32(i) save_I32((I32*)&(i))
+#define SAVEINT(i) save_int((int*)&(i))
+#define SAVEIV(i) save_iv((IV*)&(i))
+#define SAVELONG(l) save_long((long*)&(l))
+#define SAVEBOOL(b) save_bool((bool*)&(b))
#define SAVESPTR(s) save_sptr((SV**)&(s))
-#define SAVEPPTR(s) save_pptr(SOFT_CAST(char**)&(s))
+#define SAVEPPTR(s) save_pptr((char**)&(s))
#define SAVEVPTR(s) save_vptr((void*)&(s))
#define SAVEPADSV(s) save_padsv(s)
#define SAVEFREESV(s) save_freesv((SV*)(s))
#define SAVEMORTALIZESV(s) save_mortalizesv((SV*)(s))
-#define SAVEFREEOP(o) save_freeop(SOFT_CAST(OP*)(o))
-#define SAVEFREEPV(p) save_freepv(SOFT_CAST(char*)(p))
-#define SAVECLEARSV(sv) save_clearsv(SOFT_CAST(SV**)&(sv))
+#define SAVEFREEOP(o) save_freeop((OP*)(o))
+#define SAVEFREEPV(p) save_freepv((char*)(p))
+#define SAVECLEARSV(sv) save_clearsv((SV**)&(sv))
#define SAVEGENERICSV(s) save_generic_svref((SV**)&(s))
#define SAVEGENERICPV(s) save_generic_pvref((char**)&(s))
#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(SOFT_CAST(HV*)(h), SOFT_CAST(char*)(k), (I32)(l))
+ save_delete((HV*)(h), (char*)(k), (I32)(l))
#define SAVEDESTRUCTOR(f,p) \
- save_destructor((DESTRUCTORFUNC_NOCONTEXT_t)(f), SOFT_CAST(void*)(p))
+ save_destructor((DESTRUCTORFUNC_NOCONTEXT_t)(f), (void*)(p))
#define SAVEDESTRUCTOR_X(f,p) \
- save_destructor_x((DESTRUCTORFUNC_t)(f), SOFT_CAST(void*)(p))
+ save_destructor_x((DESTRUCTORFUNC_t)(f), (void*)(p))
#define SAVESTACK_POS() \
STMT_START { \