mirror of
https://github.com/gnustep/libs-base.git
synced 2025-05-20 20:26:42 +00:00
tweaks to use new GC API
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@28051 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
parent
8687a2ed40
commit
00e2bbb843
8 changed files with 43 additions and 17 deletions
|
@ -1266,7 +1266,7 @@ setNonBlocking(SOCKET fd)
|
|||
DESTROY(_handler);
|
||||
if (_address != 0)
|
||||
{
|
||||
NSZoneFree(NSDefaultMallocZone(), _address);
|
||||
NSZoneFree(0, _address);
|
||||
}
|
||||
[super dealloc];
|
||||
}
|
||||
|
@ -1517,13 +1517,13 @@ setNonBlocking(SOCKET fd)
|
|||
if (_address != 0
|
||||
&& GSPrivateSockaddrLength(_address) != GSPrivateSockaddrLength(address))
|
||||
{
|
||||
NSZoneFree(NSDefaultMallocZone(), _address);
|
||||
NSZoneFree(0, _address);
|
||||
_address = 0;
|
||||
}
|
||||
if (_address == 0)
|
||||
{
|
||||
_address = (struct sockaddr*)
|
||||
NSZoneMalloc(NSDefaultMallocZone(), GSPrivateSockaddrLength(address));
|
||||
NSAllocateCollectable(GSPrivateSockaddrLength(address), 0);
|
||||
}
|
||||
memcpy(_address, address, GSPrivateSockaddrLength(address));
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue