#endif
#ifndef A_MULTIPLICITY
-# if defined(MULTIPLICITY) || defined(PERL_IMPLICIT_CONTEXT)
+# if defined(MULTIPLICITY)
# define A_MULTIPLICITY 1
# else
# define A_MULTIPLICITY 0
# endif
#endif
+#if A_MULTIPLICITY
+# ifndef PERL_IMPLICIT_CONTEXT
+# error MULTIPLICITY builds must set PERL_IMPLICIT_CONTEXT
+# endif
+#endif
#ifndef tTHX
# define tTHX PerlInterpreter*
/* ... pp_deref (aelem,helem,rv2sv,padsv) .................................. */
+static void a_cannot_vivify(pTHX_ UV flags) {
+#define a_cannot_vivify(F) a_cannot_vivify(aTHX_ (F))
+ if (flags & A_HINT_STRICT)
+ croak("Reference vivification forbidden");
+ else if (flags & A_HINT_WARN)
+ warn("Reference was vivified");
+ else /* A_HINT_STORE */
+ croak("Can't vivify reference");
+}
+
static OP *a_pp_deref(pTHX) {
dA_MAP_THX;
const a_op_info *oi;
if (flags & (A_HINT_NOTIFY|A_HINT_STORE)) {
SPAGAIN;
- if (a_undef(TOPs)) {
- if (flags & A_HINT_STRICT)
- croak("Reference vivification forbidden");
- else if (flags & A_HINT_WARN)
- warn("Reference was vivified");
- else /* A_HINT_STORE */
- croak("Can't vivify reference");
- }
+ if (a_undef(TOPs))
+ a_cannot_vivify(flags);
}
return o;