# define MALLOC_CHECK_TAINT(argc,argv,env)
#endif /* MYMALLOC */
-#define TOO_LATE_FOR_(ch,s) Perl_croak(aTHX_ "Too late for \"-%c\" option%s", (char)(ch), s)
+#define TOO_LATE_FOR_(ch,s) Perl_croak(aTHX_ "\"-%c\" is on the #! line, it must also be used on the command line", (char)(ch), s)
#define TOO_LATE_FOR(ch) TOO_LATE_FOR_(ch, "")
#define MALLOC_TOO_LATE_FOR(ch) TOO_LATE_FOR_(ch, " with $ENV{PERL_MALLOC_OPT}")
#define MALLOC_CHECK_TAINT2(argc,argv) MALLOC_CHECK_TAINT(argc,argv,NULL)
#ifndef assert /* <assert.h> might have been included somehow */
-#ifdef DEBUGGING
-#define assert(what) PERL_DEB( { \
- if (!(what)) { \
- Perl_croak(aTHX_ "Assertion " STRINGIFY(what) " failed: file \"%s\", line %d", \
- __FILE__, __LINE__); \
- PerlProc_exit(1); \
- }})
-#else
-#define assert(what) PERL_DEB( { \
- if (!(what)) { \
- Perl_croak(aTHX_ "Assertion failed: file \"%s\", line %d", \
- __FILE__, __LINE__); \
- PerlProc_exit(1); \
- }})
-#endif
+#define assert(what) PERL_DEB( \
+ ((what) ? ((void) 0) : \
+ (Perl_croak(aTHX_ "Assertion " STRINGIFY(what) " failed: file \"%s\", line %d", \
+ __FILE__, __LINE__), \
+ PerlProc_exit(1), \
+ (void) 0)))
#endif
struct ufuncs {
char* patend; /* one after last char */
char* grpbeg; /* 1st char of ()-group */
char* grpend; /* end of ()-group */
- I32 code; /* template code (!) */
+ I32 code; /* template code (!<>) */
I32 length; /* length/repeat count */
howlen_t howlen; /* how length is given */
int level; /* () nesting level */
U32 flags; /* /=4, comma=2, pack=1 */
+ /* and group modifiers */
} tempsym_t;
#include "thread.h"
Zero(my_cxtp, 1, my_cxt_t); \
sv_setuv(my_cxt_sv, PTR2UV(my_cxtp))
+/* Clones the per-interpreter data. */
+#define MY_CXT_CLONE \
+ dMY_CXT_SV; \
+ my_cxt_t *my_cxtp = (my_cxt_t*)SvPVX(newSV(sizeof(my_cxt_t)-1));\
+ Copy(INT2PTR(my_cxt_t*, SvUV(my_cxt_sv)), my_cxtp, 1, my_cxt_t);\
+ sv_setuv(my_cxt_sv, PTR2UV(my_cxtp))
+
/* This macro must be used to access members of the my_cxt_t structure.
* e.g. MYCXT.some_data */
#define MY_CXT (*my_cxtp)
#define dMY_CXT_SV dNOOP
#define dMY_CXT dNOOP
#define MY_CXT_INIT NOOP
+#define MY_CXT_CLONE NOOP
#define MY_CXT my_cxt
#define pMY_CXT void