OP *(*pp_padsv)(pTHX);
} lt_op_info;
-STATIC void lt_map_store(const OP *o, SV *orig_pkg, SV *type_pkg, SV *type_meth, OP *(*pp_padsv)(pTHX)) {
+STATIC void lt_map_store(pPTABLE_ const OP *o, SV *orig_pkg, SV *type_pkg, SV *type_meth, OP *(*pp_padsv)(pTHX)) {
+#define lt_map_store(O, OP, TP, TM, PP) lt_map_store(aPTABLE_ (O), (OP), (TP), (TM), (PP))
lt_op_info *oi;
#ifdef USE_ITHREADS
* shared across threads.
* Copyright goes to the original authors, bug reports to me. */
+#ifdef PERL_IMPLICIT_SYS
+# define pPTABLE pTHX
+# define pPTABLE_ pTHX_
+# define aPTABLE aTHX
+# define aPTABLE_ aTHX_
+#else
+# define pPTABLE
+# define pPTABLE_
+# define aPTABLE
+# define aPTABLE_
+#endif
+
typedef struct ptable_ent {
struct ptable_ent *next;
const void * key;
# define PTABLE_VAL_FREE(V)
#endif
-STATIC ptable *ptable_new(void) {
+STATIC ptable *ptable_new(pPTABLE) {
+#define ptable_new() ptable_new(aPTABLE)
ptable *t = PerlMemShared_malloc(sizeof *t);
t->max = 127;
t->items = 0;
return ent ? ent->val : NULL;
}
-STATIC void ptable_split(ptable * const t) {
+STATIC void ptable_split(pPTABLE_ ptable * const t) {
+#define ptable_split(T) ptable_split(aPTABLE_ (T))
ptable_ent **ary = t->ary;
const UV oldsize = t->max + 1;
UV newsize = oldsize * 2;
}
}
-STATIC void ptable_store(ptable * const t, const void * const key, void * const val) {
+STATIC void ptable_store(pPTABLE_ ptable * const t, const void * const key, void * const val) {
+#define ptable_store(T, K, V) ptable_store(aPTABLE_ (T), (K), (V))
ptable_ent *ent = ptable_find(t, key);
if (ent) {
#if 0
-STATIC void ptable_clear(ptable * const t) {
+STATIC void ptable_clear(pPTABLE_ ptable * const t) {
+#define ptable_clear(T) ptable_clear(aPTABLE_ (T))
if (t && t->items) {
register ptable_ent ** const array = t->ary;
UV i = t->max;
}
}
-STATIC void ptable_free(ptable * const t) {
+STATIC void ptable_free(pPTABLE_ ptable * const t) {
+#define ptable_free(T) ptable_free(aPTABLE_ (T))
if (!t)
return;
ptable_clear(t);