From 3638833bc3eb9bf7b665993d3a105a29b354948a Mon Sep 17 00:00:00 2001 From: Brendan Ragan Date: Tue, 1 Oct 2013 11:17:04 +0800 Subject: [PATCH 1/3] proper arc detection --- TBXML-Code/TBXML.m | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/TBXML-Code/TBXML.m b/TBXML-Code/TBXML.m index b5b1bec..29a6f6f 100644 --- a/TBXML-Code/TBXML.m +++ b/TBXML-Code/TBXML.m @@ -911,7 +911,7 @@ - (void) dealloc { } } -#ifndef ARC_ENABLED +#if !__has_feature(objc_arc) [super dealloc]; #endif } From 3b34eed09979250649527afc968a92af6e71e36b Mon Sep 17 00:00:00 2001 From: Brendan Ragan Date: Tue, 1 Oct 2013 13:11:56 +0800 Subject: [PATCH 2/3] add ifdef so we can include header files in other header files --- TBXML-Headers/TBXML.h | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/TBXML-Headers/TBXML.h b/TBXML-Headers/TBXML.h index 36a0f67..f03397b 100644 --- a/TBXML-Headers/TBXML.h +++ b/TBXML-Headers/TBXML.h @@ -27,6 +27,9 @@ // THE SOFTWARE. // ================================================================================================ +#ifndef TBXML_H +#define TBXML_H + @class TBXML; @@ -208,3 +211,5 @@ typedef void (^TBXMLIterateAttributeBlock)(TBXMLAttribute *attribute, NSString * @end + +#endif \ No newline at end of file From b5a076ff81d72229b4226e0eb49115672c8e4e71 Mon Sep 17 00:00:00 2001 From: Brendan Ragan Date: Fri, 24 Jan 2014 08:49:04 +0800 Subject: [PATCH 3/3] import handles the ifdefs for us! --- TBXML-Headers/TBXML.h | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/TBXML-Headers/TBXML.h b/TBXML-Headers/TBXML.h index f03397b..f7a9ecf 100644 --- a/TBXML-Headers/TBXML.h +++ b/TBXML-Headers/TBXML.h @@ -27,9 +27,6 @@ // THE SOFTWARE. // ================================================================================================ -#ifndef TBXML_H -#define TBXML_H - @class TBXML; @@ -210,6 +207,4 @@ typedef void (^TBXMLIterateAttributeBlock)(TBXMLAttribute *attribute, NSString * + (void)iterateAttributesOfElement:(TBXMLElement *)anElement withBlock:(TBXMLIterateAttributeBlock)iterateBlock; -@end - -#endif \ No newline at end of file +@end \ No newline at end of file