@@ -16,10 +16,12 @@ #import "OFObject.h" #include #include +#include +#include #if defined(OF_APPLE_RUNTIME) # import #endif @@ -76,10 +78,17 @@ # define OF_PPC_ASM # elif defined(__arm__) || defined(__ARM__) # define OF_ARM_ASM # endif #endif + +#define OF_ENSURE(cond) \ + if (!(cond)) { \ + fprintf(stderr, "Failed to ensure condition in " \ + __FILE__ ":%d:\n" #cond "\n", __LINE__); \ + abort(); \ + } #ifdef OF_OBJFW_RUNTIME # define objc_lookUpClass objc_lookup_class #endif