mirror of
https://github.com/gnustep/libs-base.git
synced 2025-05-18 11:41:06 +00:00
Use NSZone functions for memory allocation
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@7780 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
parent
72e4399351
commit
6c0137925a
3 changed files with 5 additions and 4 deletions
|
@ -88,7 +88,8 @@ GSNumberInfoFromObject(NSNumber *o)
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
info = (GSNumberInfo*)objc_malloc(sizeof(GSNumberInfo));
|
info = (GSNumberInfo*)NSZoneMalloc(NSDefaultMallocZone(),
|
||||||
|
(sizeof(GSNumberInfo)));
|
||||||
info->typeLevel = order;
|
info->typeLevel = order;
|
||||||
|
|
||||||
info->getValue = (void (*)(NSNumber*, SEL, void*))
|
info->getValue = (void (*)(NSNumber*, SEL, void*))
|
||||||
|
|
|
@ -149,7 +149,7 @@ typedef struct {
|
||||||
{
|
{
|
||||||
_isUnicode = NO;
|
_isUnicode = NO;
|
||||||
_string = [GSCString_class allocWithZone: NSDefaultMallocZone()];
|
_string = [GSCString_class allocWithZone: NSDefaultMallocZone()];
|
||||||
_string = [_string initWithCString: ((ivars)aString)->_contents.u
|
_string = [_string initWithCString: ((ivars)aString)->_contents.c
|
||||||
length: ((ivars)aString)->_count];
|
length: ((ivars)aString)->_count];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -582,7 +582,7 @@ GSCheckTasks()
|
||||||
[args appendString: @" "];
|
[args appendString: @" "];
|
||||||
[args appendString: arg];
|
[args appendString: arg];
|
||||||
}
|
}
|
||||||
c_args = objc_malloc([args cStringLength]+1);
|
c_args = NSZoneMalloc(NSDefaultMallocZone(), [args cStringLength]+1);
|
||||||
[args getCString: c_args];
|
[args getCString: c_args];
|
||||||
|
|
||||||
memset (&start_info, 0, sizeof(start_info));
|
memset (&start_info, 0, sizeof(start_info));
|
||||||
|
@ -602,7 +602,7 @@ GSCheckTasks()
|
||||||
[[self currentDirectoryPath] fileSystemRepresentation],
|
[[self currentDirectoryPath] fileSystemRepresentation],
|
||||||
&start_info,
|
&start_info,
|
||||||
&proc_info);
|
&proc_info);
|
||||||
objc_free(c_args);
|
NSZoneFree(NSDefaultMallocZone(), c_args);
|
||||||
if (result == 0)
|
if (result == 0)
|
||||||
{
|
{
|
||||||
NSLog(@"Error launching task: %@", lpath);
|
NSLog(@"Error launching task: %@", lpath);
|
||||||
|
|
Loading…
Reference in a new issue