mirror of
https://github.com/gnustep/libs-base.git
synced 2025-05-20 12:16:40 +00:00
More moves towards OSX 10.5 GC compatibility.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@28054 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
parent
00e2bbb843
commit
bc9468c45f
25 changed files with 553 additions and 282 deletions
|
@ -142,7 +142,11 @@ static char *buildURL(parsedURL *base, parsedURL *rel, BOOL standardize)
|
|||
len += strlen(rel->fragment) + 1; // #fragment
|
||||
}
|
||||
|
||||
ptr = buf = (char*)NSZoneMalloc(GSAtomicMallocZone(), len);
|
||||
#if GS_WITH_GC
|
||||
ptr = buf = (char*)NSAllocateCollectable(len, 0);
|
||||
#else
|
||||
ptr = buf = (char*)NSZoneMalloc(NSDefaultMallocZone(), len);
|
||||
#endif
|
||||
|
||||
if (rel->scheme != 0)
|
||||
{
|
||||
|
@ -698,7 +702,11 @@ static unsigned urlAlign;
|
|||
BOOL canBeGeneric = YES;
|
||||
|
||||
size += sizeof(parsedURL) + urlAlign + 1;
|
||||
buf = _data = (parsedURL*)NSZoneMalloc(GSAtomicMallocZone(), size);
|
||||
#if GS_WITH_GC
|
||||
buf = _data = (parsedURL*)NSAllocateCollectable(size, 0);
|
||||
#else
|
||||
buf = _data = (parsedURL*)NSZoneMalloc(NSDefaultMallocZone(), size);
|
||||
#endif
|
||||
memset(buf, '\0', size);
|
||||
start = end = ptr = (char*)&buf[1];
|
||||
[_urlString getCString: start
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue