# endif
#endif
+#ifdef DEBUGGING
+# define I_ASSERT(C) assert(C)
+#else
+# define I_ASSERT(C)
+#endif
+
#ifndef I_WORKAROUND_REQUIRE_PROPAGATION
# define I_WORKAROUND_REQUIRE_PROPAGATION !I_HAS_PERL(5, 10, 1)
#endif
int global_setup = 0;
if (indirect_loaded <= 0) {
- assert(indirect_loaded == 0);
- assert(!indirect_loaded_cxts);
+ I_ASSERT(indirect_loaded == 0);
+ I_ASSERT(!indirect_loaded_cxts);
indirect_loaded_cxts = ptable_new();
global_setup = 1;
}
++indirect_loaded;
- assert(indirect_loaded_cxts);
+ I_ASSERT(indirect_loaded_cxts);
ptable_loaded_store(indirect_loaded_cxts, cxt, cxt);
return global_setup;
int global_teardown = 0;
if (indirect_loaded > 1) {
- assert(indirect_loaded_cxts);
+ I_ASSERT(indirect_loaded_cxts);
ptable_loaded_delete(indirect_loaded_cxts, cxt);
--indirect_loaded;
} else if (indirect_loaded_cxts) {
- assert(indirect_loaded == 1);
+ I_ASSERT(indirect_loaded == 1);
ptable_loaded_free(indirect_loaded_cxts);
indirect_loaded_cxts = NULL;
indirect_loaded = 0;
int global_setup;
I_LOADED_LOCK;
global_setup = indirect_set_loaded_locked(&MY_CXT);
- assert(!global_setup);
+ I_ASSERT(!global_setup);
I_LOADED_UNLOCK;
}
}