From a80ff7305569a05a4aabdc53d9e6b6d238cc204b Mon Sep 17 00:00:00 2001 From: KelaKing Date: Tue, 13 Mar 2018 11:20:20 +0800 Subject: [PATCH] Assigning to Out Parameters in Blocks Is Unsafe --- Aspects.m | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Aspects.m b/Aspects.m index c907066..506e991 100644 --- a/Aspects.m +++ b/Aspects.m @@ -114,7 +114,7 @@ @implementation NSObject (Aspects) /////////////////////////////////////////////////////////////////////////////////////////// #pragma mark - Private Helper -static id aspect_add(id self, SEL selector, AspectOptions options, id block, NSError **error) { +static id aspect_add(id self, SEL selector, AspectOptions options, id block, NSError * __autoreleasing *error) { NSCParameterAssert(self); NSCParameterAssert(selector); NSCParameterAssert(block); @@ -135,7 +135,7 @@ static id aspect_add(id self, SEL selector, AspectOptions options, id block, NSE return identifier; } -static BOOL aspect_remove(AspectIdentifier *aspect, NSError **error) { +static BOOL aspect_remove(AspectIdentifier *aspect, NSError * __autoreleasing *error) { NSCAssert([aspect isKindOfClass:AspectIdentifier.class], @"Must have correct type."); __block BOOL success = NO;