mirror of
https://github.com/gnustep/libs-base.git
synced 2025-05-31 08:41:03 +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);
|
GSClassSwizzle(self, dataBlock);
|
||||||
|
bytes = buf;
|
||||||
|
length = len;
|
||||||
ASSIGN(deallocator, (id)deallocBlock);
|
ASSIGN(deallocator, (id)deallocBlock);
|
||||||
return self;
|
return self;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue