From 618003649d7801d0290b13c0742802ed02e51f6b Mon Sep 17 00:00:00 2001 From: theraven Date: Sat, 12 Feb 2011 20:51:24 +0000 Subject: [PATCH] Made sync enter / exit functions return int (0). This is how their prototypes are declared on OS X, although neither clang nor gcc actually generates code that tests the return value... --- sync.m | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/sync.m b/sync.m index a695f92..634f0a3 100644 --- a/sync.m +++ b/sync.m @@ -110,7 +110,7 @@ static void deallocLockClass(id obj, SEL _cmd) // TODO: This should probably have a special case for classes conforming to the // NSLocking protocol, just sending them a -lock message. -void objc_sync_enter(id obj) +int objc_sync_enter(id obj) { Class lockClass = findLockClass(obj); if (Nil == lockClass) @@ -126,11 +126,13 @@ void objc_sync_enter(id obj) } mutex_t *lock = object_getIndexedIvars(lockClass); LOCK(lock); + return 0; } -void objc_sync_exit(id obj) +int objc_sync_exit(id obj) { Class lockClass = findLockClass(obj); mutex_t *lock = object_getIndexedIvars(lockClass); UNLOCK(lock); + return 0; }