Browse Source

IOS-2794 Rename copyOfBytes -> bytes

IOS-2794
Dirk Zimmermann 1 year ago
parent
commit
3a5ba594b8
3 changed files with 7 additions and 7 deletions
  1. +1
    -1
      pantomime-lib/Framework/Pantomime/CWService+Protected.m
  2. +2
    -2
      pantomime-lib/Framework/Pantomime/Utils/CWThreadSafeData.h
  3. +4
    -4
      pantomime-lib/Framework/Pantomime/Utils/CWThreadSafeData.m

+ 1
- 1
pantomime-lib/Framework/Pantomime/CWService+Protected.m View File

@ -60,7 +60,7 @@
unsigned char *bytes;
NSInteger count, len;
bytes = (unsigned char*)[_wbuf copyOfBytes];
bytes = (unsigned char*)[_wbuf bytes];
len = [_wbuf length];
#ifdef MACOSX


+ 2
- 2
pantomime-lib/Framework/Pantomime/Utils/CWThreadSafeData.h View File

@ -49,9 +49,9 @@ NS_ASSUME_NONNULL_BEGIN
- (void)truncateLeadingBytes:(NSUInteger)numBytes;
/**
@return a copy of the inner byte array.
@return a pointer to the inner byte array.
*/
- (const char*)copyOfBytes;
- (const char *)bytes;
/**
@discussion This method is used to obtain the subdata to <i>index</i>


+ 4
- 4
pantomime-lib/Framework/Pantomime/Utils/CWThreadSafeData.m View File

@ -77,16 +77,16 @@ NS_ASSUME_NONNULL_BEGIN
});
}
- (const char*)copyOfBytes
- (const char *)bytes
{
__block const char* copyOfBytes = nil;
__block const char *theBytes = nil;
__weak typeof(self) weakSelf = self;
dispatch_sync(self.queue, ^{
typeof(self) strongSelf = weakSelf;
copyOfBytes = strongSelf.data.bytes;
theBytes = strongSelf.data.bytes;
});
return copyOfBytes;
return theBytes;
}
- (NSData *)subdataToIndex:(NSUInteger)index


Loading…
Cancel
Save