From 126aa409cbf8ddb1947f642e5e1fcdb4cc0a4979 Mon Sep 17 00:00:00 2001 From: theraven Date: Mon, 4 Jul 2011 21:26:11 +0000 Subject: [PATCH] op_and_fetch, not fetch_and_op! --- arc.m | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/arc.m b/arc.m index 25a0d63..415ecf2 100644 --- a/arc.m +++ b/arc.m @@ -40,7 +40,7 @@ static inline id retain(id obj) if (objc_test_class_flag(obj->isa, objc_class_flag_fast_arc)) { intptr_t *refCount = ((intptr_t*)obj) - 1; - __sync_fetch_and_add(refCount, 1); + __sync_add_and_fetch(refCount, 1); return obj; } return [obj retain]; @@ -51,7 +51,7 @@ static inline void release(id obj) if (objc_test_class_flag(obj->isa, objc_class_flag_fast_arc)) { intptr_t *refCount = ((intptr_t*)obj) - 1; - if (__sync_fetch_and_sub(refCount, 1) < 0) + if (__sync_sub_and_fetch(refCount, 1) < 0) { objc_delete_weak_refs(obj); [obj dealloc];