Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 1 addition & 2 deletions arc.mm
Original file line number Diff line number Diff line change
Expand Up @@ -786,13 +786,12 @@ static inline id autorelease(id obj)
release(obj);
}

extern "C" OBJC_PUBLIC id objc_storeStrong(id *addr, id value)
extern "C" OBJC_PUBLIC void objc_storeStrong(id *addr, id value)
{
value = objc_retain(value);
id oldValue = *addr;
*addr = value;
objc_release(oldValue);
return value;
}

////////////////////////////////////////////////////////////////////////////////
Expand Down
2 changes: 1 addition & 1 deletion objc/objc-arc.h
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ OBJC_PUBLIC id objc_retainBlock(id b);
* Stores value in addr. This first retains value, then releases the old value
* at addr, and stores the retained value in the address.
*/
OBJC_PUBLIC id objc_storeStrong(id *addr, id value);
OBJC_PUBLIC void objc_storeStrong(id *addr, id value);
/**
* Stores obj in zeroing weak pointer addr. If obj has begun deallocation,
* then this stores nil.
Expand Down