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:
Richard Frith-MacDonald 2009-03-09 15:11:51 +00:00
parent 00e2bbb843
commit bc9468c45f
25 changed files with 553 additions and 282 deletions

View file

@ -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