@@ -202,13 +202,13 @@ #ifdef OF_HAVE_ATOMIC_OPS OFAtomicIntIncrease(&block->flags); #else unsigned hash = SPINLOCK_HASH(block); - OF_ENSURE(OFSpinlockLock(&blockSpinlocks[hash]) == 0); + OFEnsure(OFSpinlockLock(&blockSpinlocks[hash]) == 0); block->flags++; - OF_ENSURE(OFSpinlockUnlock(&blockSpinlocks[hash]) == 0); + OFEnsure(OFSpinlockUnlock(&blockSpinlocks[hash]) == 0); #endif } return block; } @@ -230,22 +230,22 @@ free(block); } #else unsigned hash = SPINLOCK_HASH(block); - OF_ENSURE(OFSpinlockLock(&blockSpinlocks[hash]) == 0); + OFEnsure(OFSpinlockLock(&blockSpinlocks[hash]) == 0); if ((--block->flags & OF_BLOCK_REFCOUNT_MASK) == 0) { - OF_ENSURE(OFSpinlockUnlock(&blockSpinlocks[hash]) == 0); + OFEnsure(OFSpinlockUnlock(&blockSpinlocks[hash]) == 0); if (block->flags & OF_BLOCK_HAS_COPY_DISPOSE) block->descriptor->dispose_helper(block); free(block); return; } - OF_ENSURE(OFSpinlockUnlock(&blockSpinlocks[hash]) == 0); + OFEnsure(OFSpinlockUnlock(&blockSpinlocks[hash]) == 0); #endif } void _Block_object_assign(void *dst_, const void *src_, const int flags_) @@ -295,33 +295,32 @@ *dst = src->forwarding; } #else unsigned hash = SPINLOCK_HASH(src); - OF_ENSURE(OFSpinlockLock(&byrefSpinlocks[hash]) == 0); + OFEnsure(OFSpinlockLock(&byrefSpinlocks[hash]) == 0); if (src->forwarding == src) src->forwarding = *dst; else { src->byref_dispose(*dst); free(*dst); *dst = src->forwarding; } - OF_ENSURE( - OFSpinlockUnlock(&byrefSpinlocks[hash]) == 0); + OFEnsure(OFSpinlockUnlock(&byrefSpinlocks[hash]) == 0); #endif } else *dst = src; #ifdef OF_HAVE_ATOMIC_OPS OFAtomicIntIncrease(&(*dst)->flags); #else unsigned hash = SPINLOCK_HASH(*dst); - OF_ENSURE(OFSpinlockLock(&byrefSpinlocks[hash]) == 0); + OFEnsure(OFSpinlockLock(&byrefSpinlocks[hash]) == 0); (*dst)->flags++; - OF_ENSURE(OFSpinlockUnlock(&byrefSpinlocks[hash]) == 0); + OFEnsure(OFSpinlockUnlock(&byrefSpinlocks[hash]) == 0); #endif break; } } @@ -356,21 +355,20 @@ free(object); } #else unsigned hash = SPINLOCK_HASH(object); - OF_ENSURE(OFSpinlockLock(&byrefSpinlocks[hash]) == 0); + OFEnsure(OFSpinlockLock(&byrefSpinlocks[hash]) == 0); if ((--object->flags & OF_BLOCK_REFCOUNT_MASK) == 0) { - OF_ENSURE( - OFSpinlockUnlock(&byrefSpinlocks[hash]) == 0); + OFEnsure(OFSpinlockUnlock(&byrefSpinlocks[hash]) == 0); if (object->flags & OF_BLOCK_HAS_COPY_DISPOSE) object->byref_dispose(object); free(object); } - OF_ENSURE(OFSpinlockUnlock(&byrefSpinlocks[hash]) == 0); + OFEnsure(OFSpinlockUnlock(&byrefSpinlocks[hash]) == 0); #endif break; } }