Adp |void |sv_nosharing |NULLOK SV *sv
Adpbm |void |sv_nolocking |NULLOK SV *sv
+Adp |bool |sv_destroyable |NULLOK SV *sv
#ifdef NO_MATHOMS
Adpbm |void |sv_nounlocking |NULLOK SV *sv
#else
#define custom_op_name Perl_custom_op_name
#define custom_op_desc Perl_custom_op_desc
#define sv_nosharing Perl_sv_nosharing
+#define sv_destroyable Perl_sv_destroyable
#ifdef NO_MATHOMS
#else
#define sv_nounlocking Perl_sv_nounlocking
#define custom_op_name(a) Perl_custom_op_name(aTHX_ a)
#define custom_op_desc(a) Perl_custom_op_desc(aTHX_ a)
#define sv_nosharing(a) Perl_sv_nosharing(aTHX_ a)
+#define sv_destroyable(a) Perl_sv_destroyable(aTHX_ a)
#ifdef NO_MATHOMS
#else
#define sv_nounlocking(a) Perl_sv_nounlocking(aTHX_ a)
#define PL_defoutgv (vTHX->Idefoutgv)
#define PL_defstash (vTHX->Idefstash)
#define PL_delaymagic (vTHX->Idelaymagic)
+#define PL_destroyhook (vTHX->Idestroyhook)
#define PL_diehook (vTHX->Idiehook)
#define PL_dirty (vTHX->Idirty)
#define PL_doextract (vTHX->Idoextract)
#define PL_Idefoutgv PL_defoutgv
#define PL_Idefstash PL_defstash
#define PL_Idelaymagic PL_delaymagic
+#define PL_Idestroyhook PL_destroyhook
#define PL_Idiehook PL_diehook
#define PL_Idirty PL_dirty
#define PL_Idoextract PL_doextract
Perl_custom_op_desc
Perl_sv_nosharing
Perl_sv_nolocking
+Perl_sv_destroyable
Perl_sv_nounlocking
Perl_nothreadhook
Perl_Slab_Alloc
PERLVARI(Islab_count, U32, 0) /* Size of the array */
#endif
+/* Can shared object be destroyed */
+PERLVARI(Idestroyhook, destroyable_proc_t, MEMBER_TO_FPTR(Perl_sv_destroyable))
+
/* If you are adding a U8 or U16, check to see if there are 'Space' comments
* above on where there are gaps which currently will be structure padding. */
typedef void (CPERLscope(*share_proc_t)) (pTHX_ SV *sv);
typedef int (CPERLscope(*thrhook_proc_t)) (pTHX);
typedef OP* (CPERLscope(*PPADDR_t)[]) (pTHX);
+typedef bool (CPERLscope(*destroyable_proc_t)) (pTHX_ SV *sv);
/* _ (for $_) must be first in the following list (DEFSV requires it) */
#define THREADSV_NAMES "_123456789&`'+/.,\\\";^-%=|~:\001\005!@"
#define PL_defstash (*Perl_Idefstash_ptr(aTHX))
#undef PL_delaymagic
#define PL_delaymagic (*Perl_Idelaymagic_ptr(aTHX))
+#undef PL_destroyhook
+#define PL_destroyhook (*Perl_Idestroyhook_ptr(aTHX))
#undef PL_diehook
#define PL_diehook (*Perl_Idiehook_ptr(aTHX))
#undef PL_dirty
=for hackers
Found in file handy.h
+=item sv_destroyable
+X<sv_destroyable>
+
+Dummy routine which reports that object can be destroyed when there is no
+sharing module present. It ignores its single SV argument, and returns
+'true'. Exists to avoid test for a NULL function pointer and because it
+could potentially warn under some level of strict-ness.
+
+ bool sv_destroyable(SV *sv)
+
+=for hackers
+Found in file util.c
+
=item sv_nosharing
X<sv_nosharing>
PERL_CALLCONV void Perl_sv_nosharing(pTHX_ SV *sv);
/* PERL_CALLCONV void Perl_sv_nolocking(pTHX_ SV *sv); */
+PERL_CALLCONV bool Perl_sv_destroyable(pTHX_ SV *sv);
#ifdef NO_MATHOMS
/* PERL_CALLCONV void Perl_sv_nounlocking(pTHX_ SV *sv); */
#else
}
if (SvOBJECT(sv)) {
- if (PL_defstash) { /* Still have a symbol table? */
+ if (PL_defstash && /* Still have a symbol table? */
+ SvDESTROYABLE(sv))
+ {
dSP;
HV* stash;
do {
PL_lockhook = proto_perl->Ilockhook;
PL_unlockhook = proto_perl->Iunlockhook;
PL_threadhook = proto_perl->Ithreadhook;
+ PL_destroyhook = proto_perl->Idestroyhook;
#ifdef THREADS_HAVE_PIDS
PL_ppid = proto_perl->Ippid;
#define SvSHARE(sv) CALL_FPTR(PL_sharehook)(aTHX_ sv)
#define SvLOCK(sv) CALL_FPTR(PL_lockhook)(aTHX_ sv)
#define SvUNLOCK(sv) CALL_FPTR(PL_unlockhook)(aTHX_ sv)
+#define SvDESTROYABLE(sv) CALL_FPTR(PL_destroyhook)(aTHX_ sv)
#define SvGETMAGIC(x) STMT_START { if (SvGMAGICAL(x)) mg_get(x); } STMT_END
#define SvSETMAGIC(x) STMT_START { if (SvSMAGICAL(x)) mg_set(x); } STMT_END
PERL_UNUSED_ARG(sv);
}
+/*
+
+=for apidoc sv_destroyable
+
+Dummy routine which reports that object can be destroyed when there is no
+sharing module present. It ignores its single SV argument, and returns
+'true'. Exists to avoid test for a NULL function pointer and because it
+could potentially warn under some level of strict-ness.
+
+=cut
+*/
+
+bool
+Perl_sv_destroyable(pTHX_ SV *sv)
+{
+ PERL_UNUSED_CONTEXT;
+ PERL_UNUSED_ARG(sv);
+ return TRUE;
+}
+
U32
Perl_parse_unicode_opts(pTHX_ const char **popt)
{