#ifdef USE_ITHREADS
# define cGVOPx_gv(o) ((GV*)PAD_SVl(cPADOPx(o)->op_padix))
-# define IS_PADGV(v) (v && SvTYPE(v) == SVt_PVGV && isGV_with_GP(v) \
- && GvIN_PAD(v))
-# define IS_PADCONST(v) \
+# ifndef PERL_CORE
+# define IS_PADGV(v) (v && isGV(v))
+# define IS_PADCONST(v) \
(v && (SvREADONLY(v) || (SvIsCOW(v) && !SvLEN(v))))
+# endif
# define cSVOPx_sv(v) (cSVOPx(v)->op_sv \
? cSVOPx(v)->op_sv : PAD_SVl((v)->op_targ))
# define cSVOPx_svp(v) (cSVOPx(v)->op_sv \
? &cSVOPx(v)->op_sv : &PAD_SVl((v)->op_targ))
#else
# define cGVOPx_gv(o) ((GV*)cSVOPx(o)->op_sv)
-# define IS_PADGV(v) FALSE
-# define IS_PADCONST(v) FALSE
+# ifndef PERL_CORE
+# define IS_PADGV(v) FALSE
+# define IS_PADCONST(v) FALSE
+# endif
# define cSVOPx_sv(v) (cSVOPx(v)->op_sv)
# define cSVOPx_svp(v) (&cSVOPx(v)->op_sv)
#endif
#define RV2CVOPCV_MARK_EARLY 0x00000001
#define RV2CVOPCV_RETURN_NAME_GV 0x00000002
#define RV2CVOPCV_RETURN_STUB 0x00000004
-#define RV2CVOPCV_FLAG_MASK 0x00000007 /* all of the above */
+#ifdef PERL_CORE /* behaviour of this flag is subject to change: */
+# define RV2CVOPCV_MAYBE_NAME_GV 0x00000008
+#endif
+#define RV2CVOPCV_FLAG_MASK 0x0000000f /* all of the above */
#define op_lvalue(op,t) Perl_op_lvalue_flags(aTHX_ op,t,0)