/* ... Thread safety and multiplicity ...................................... */
+/* Always safe when the workaround isn't needed */
+#if !A_WORKAROUND_REQUIRE_PROPAGATION
+# undef A_FORKSAFE
+# define A_FORKSAFE 1
+/* Otherwise, safe unless Makefile.PL says it's Win32 */
+#elif !defined(A_FORKSAFE)
+# define A_FORKSAFE 1
+#endif
+
#ifndef A_MULTIPLICITY
# if defined(MULTIPLICITY) || defined(PERL_IMPLICIT_CONTEXT)
# define A_MULTIPLICITY 1
IV require_tag;
} a_hint_t;
-#define A_HINT_BITS(H) ((H)->bits)
-
#define A_HINT_FREE(H) PerlMemShared_free(H)
#if A_THREADSAFE
return;
h2 = PerlMemShared_malloc(sizeof *h2);
+ h2->bits = h1->bits;
h2->require_tag = PTR2IV(a_clone(INT2PTR(SV *, h1->require_tag), ud->owner));
ptable_hints_store(ud->tbl, ent->key, h2);
if (a_require_tag() != h->require_tag)
return 0;
- return A_HINT_BITS(h);
+ return h->bits;
}
#else /* A_WORKAROUND_REQUIRE_PROPAGATION */
newCONSTSUB(stash, "A_HINT_EXISTS", newSVuv(A_HINT_EXISTS));
newCONSTSUB(stash, "A_HINT_DELETE", newSVuv(A_HINT_DELETE));
newCONSTSUB(stash, "A_HINT_MASK", newSVuv(A_HINT_MASK));
+ newCONSTSUB(stash, "A_THREADSAFE", newSVuv(A_THREADSAFE));
+ newCONSTSUB(stash, "A_FORKSAFE", newSVuv(A_FORKSAFE));
}
}