@@ -345,7 +345,7 @@ - (BOOL)_buildString
345345 // don't remove spaces at end of document
346346 _preserverDocumentTrailingSpaces = [[_options objectForKey: DTDocumentPreserveTrailingSpaces] boolValue ];
347347
348- __weak typeof (self) weakSelf = self;
348+ DT_WEAK_VARIABLE typeof (self) weakSelf = self;
349349 __block BOOL result;
350350 dispatch_group_async (_dataParsingGroup, _dataParsingQueue, ^{ result = [weakSelf.self ->_parser parse ]; });
351351
@@ -702,7 +702,7 @@ - (void)_registerTagEndHandlers
702702
703703- (void )parser : (DTHTMLParser *)parser didStartElement : (NSString *)elementName attributes : (NSDictionary *)attributeDict
704704{
705- __weak typeof (self) weakSelf = self;
705+ DT_WEAK_VARIABLE typeof (self) weakSelf = self;
706706 dispatch_group_async (_treeBuildingGroup, _treeBuildingQueue, ^{
707707 DTHTMLAttributedStringBuilder *strongSelf = weakSelf;
708708
@@ -814,7 +814,7 @@ - (void)parser:(DTHTMLParser *)parser didStartElement:(NSString *)elementName at
814814- (void )parser : (DTHTMLParser *)parser didEndElement : (NSString *)elementName
815815{
816816
817- __weak typeof (self) weakSelf = self;
817+ DT_WEAK_VARIABLE typeof (self) weakSelf = self;
818818 dispatch_group_async (_treeBuildingGroup, _treeBuildingQueue, ^{
819819 @autoreleasepool {
820820 DTHTMLAttributedStringBuilder *strongSelf = weakSelf;
@@ -904,7 +904,7 @@ - (void)parser:(DTHTMLParser *)parser didEndElement:(NSString *)elementName
904904
905905- (void )parser : (DTHTMLParser *)parser foundCharacters : (NSString *)string
906906{
907- __weak typeof (self) weakSelf = self;
907+ DT_WEAK_VARIABLE typeof (self) weakSelf = self;
908908 dispatch_group_async (_treeBuildingGroup, _treeBuildingQueue, ^{
909909 DTHTMLAttributedStringBuilder *strongSelf = weakSelf;
910910 if (strongSelf->_ignoreParseEvents )
@@ -971,7 +971,7 @@ - (void)parser:(DTHTMLParser *)parser foundCharacters:(NSString *)string
971971
972972- (void )parser : (DTHTMLParser *)parser foundCDATA : (NSData *)CDATABlock
973973{
974- __weak typeof (self) weakSelf = self;
974+ DT_WEAK_VARIABLE typeof (self) weakSelf = self;
975975 dispatch_group_async (_treeBuildingGroup, _treeBuildingQueue, ^{
976976 DTHTMLAttributedStringBuilder *strongSelf = weakSelf;
977977
@@ -993,7 +993,7 @@ - (void)parser:(DTHTMLParser *)parser foundCDATA:(NSData *)CDATABlock
993993
994994- (void )parserDidEndDocument : (DTHTMLParser *)parser
995995{
996- __weak typeof (self) weakSelf = self;
996+ DT_WEAK_VARIABLE typeof (self) weakSelf = self;
997997 dispatch_group_async (_treeBuildingGroup, _treeBuildingQueue, ^{
998998 DTHTMLAttributedStringBuilder *strongSelf = weakSelf;
999999
0 commit comments