Apmb |void |gv_fullname3 |NN SV* sv|NN const GV* gv|NULLOK const char* prefix
Ap |void |gv_fullname4 |NN SV* sv|NN const GV* gv|NULLOK const char* prefix|bool keepmain
Ap |void |gv_init |NN GV* gv|NULLOK HV* stash|NN const char* name|STRLEN len|int multi
-Ap |void |gv_name_set |NN GV* gv|NULLOK const char *name|U32 len|U32 flags
+Ap |void |gv_name_set |NN GV* gv|NN const char *name|U32 len|U32 flags
Apd |HV* |gv_stashpv |NN const char* name|I32 create
Apd |HV* |gv_stashpvn |NN const char* name|U32 namelen|I32 create
Apd |HV* |gv_stashsv |NULLOK SV* sv|I32 create
dVAR;
U32 hash;
+ assert(name);
PERL_UNUSED_ARG(flags);
if (len > I32_MAX)
}
PERL_HASH(hash, name, len);
- GvNAME_HEK(gv) = name ? share_hek(name, len, hash) : 0;
+ GvNAME_HEK(gv) = share_hek(name, len, hash);
}
/*
assert(SvTYPE(zzzz) == SVt_PVGV || SvTYPE(zzzz) >= SVt_PVLV); \
&(GvXPVGV(zzzz)->xiv_u.xivu_namehek); \
}))
+# define GvNAME_get(gv) ({ assert(GvNAME_HEK(gv)); HEK_KEY(GvNAME_HEK(gv)); })
+# define GvNAMELEN_get(gv) ({ assert(GvNAME_HEK(gv)); HEK_LEN(GvNAME_HEK(gv)); })
#else
# define GvGP(gv) ((gv)->sv_u.svu_gp)
# define GvFLAGS(gv) (GvXPVGV(gv)->xpv_cur)
# define GvSTASH(gv) (GvXPVGV(gv)->xnv_u.xgv_stash)
# define GvNAME_HEK(gv) (GvXPVGV(gv)->xiv_u.xivu_namehek)
+# define GvNAME_get(gv) HEK_KEY(GvNAME_HEK(gv))
+# define GvNAMELEN_get(gv) HEK_LEN(GvNAME_HEK(gv))
#endif
-#define GvNAME_get(gv) (GvNAME_HEK(gv) ? HEK_KEY(GvNAME_HEK(gv)) : NULL)
-#define GvNAMELEN_get(gv) (GvNAME_HEK(gv) ? HEK_LEN(GvNAME_HEK(gv)) : 0)
-
#define GvNAME(gv) GvNAME_get(gv)
#define GvNAMELEN(gv) GvNAMELEN_get(gv)
__attribute__nonnull__(pTHX_3);
PERL_CALLCONV void Perl_gv_name_set(pTHX_ GV* gv, const char *name, U32 len, U32 flags)
- __attribute__nonnull__(pTHX_1);
+ __attribute__nonnull__(pTHX_1)
+ __attribute__nonnull__(pTHX_2);
PERL_CALLCONV HV* Perl_gv_stashpv(pTHX_ const char* name, I32 create)
__attribute__nonnull__(pTHX_1);