mirror of
https://github.com/gnustep/libs-base.git
synced 2025-05-30 00:11:26 +00:00
Invocation related fixes
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@12566 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
parent
bccbbac221
commit
3a883d89b5
9 changed files with 102 additions and 72 deletions
|
@ -91,7 +91,7 @@ callframe_from_info (NSArgumentInfo *info, int numargs, void **retval)
|
|||
}
|
||||
pos = full;
|
||||
full += MAX(info[0].size, sizeof(smallret_t));
|
||||
cframe = buf = NSZoneMalloc(NSDefaultMallocZone(), full);
|
||||
cframe = buf = NSZoneCalloc(NSDefaultMallocZone(), full, 1);
|
||||
if (cframe)
|
||||
{
|
||||
*retval = buf + pos;
|
||||
|
@ -99,7 +99,7 @@ callframe_from_info (NSArgumentInfo *info, int numargs, void **retval)
|
|||
}
|
||||
else
|
||||
{
|
||||
cframe = buf = NSZoneMalloc(NSDefaultMallocZone(), size);
|
||||
cframe = buf = NSZoneCalloc(NSDefaultMallocZone(), size, 1);
|
||||
}
|
||||
|
||||
if (cframe)
|
||||
|
@ -633,7 +633,7 @@ callframe_build_return (NSInvocation *inv,
|
|||
retLength = objc_sizeof_type(tmptype);
|
||||
/* Allocate memory to hold the value we're pointing to. */
|
||||
*(void**)retval =
|
||||
NSZoneMalloc(NSDefaultMallocZone(), retLength);
|
||||
NSZoneCalloc(NSDefaultMallocZone(), retLength, 1);
|
||||
/* We are responsible for making sure this memory gets free'd
|
||||
eventually. Ask NSData class to autorelease it. */
|
||||
[NSData dataWithBytesNoCopy: *(void**)retval
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue