mirror of
https://github.com/gnustep/libs-base.git
synced 2025-05-30 00:11:26 +00:00
Fix NSData initWithBytesNoCopy:length:deallocator:
The previous implementation simply swizzled `NSData` into `NSDataWithDeallocatorBlock`, and forgot to actually assign `bytes` and `length`.
This commit is contained in:
parent
47480d781a
commit
d439847ba6
1 changed files with 2 additions and 0 deletions
|
@ -3548,6 +3548,8 @@ getBytes(void* dst, void* src, unsigned len, unsigned limit, unsigned *pos)
|
|||
}
|
||||
|
||||
GSClassSwizzle(self, dataBlock);
|
||||
bytes = buf;
|
||||
length = len;
|
||||
ASSIGN(deallocator, (id)deallocBlock);
|
||||
return self;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue