mirror of
https://github.com/gnustep/libs-base.git
synced 2025-05-29 16:01:38 +00:00
Don't use MallocAddress
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@2993 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
parent
f90baf26c9
commit
b04bfafc95
3 changed files with 7 additions and 8 deletions
|
@ -27,7 +27,7 @@
|
|||
#include <gnustep/base/NSString.h>
|
||||
#include <gnustep/base/StdioStream.h>
|
||||
#include <gnustep/base/TextCStream.h>
|
||||
#include <gnustep/base/MallocAddress.h>
|
||||
#include <Foundation/NSData.h>
|
||||
#include <Foundation/NSException.h>
|
||||
#include <math.h>
|
||||
#ifndef __WIN32__
|
||||
|
@ -491,7 +491,7 @@ static int debug_binary_coder = 0;
|
|||
(*(char**)d)[length] = '\0';
|
||||
/* Autorelease the newly malloc'ed pointer? Grep for (*objc_free)
|
||||
to see the places the may have to be changed
|
||||
[MallocAddress autoreleaseMallocAddress: *(char**)d]; */
|
||||
[NSData dataWithBytesNoCopy: *(void**)d length: length+1]; */
|
||||
break;
|
||||
}
|
||||
|
||||
|
|
|
@ -24,9 +24,8 @@
|
|||
|
||||
#include <config.h>
|
||||
#include <gnustep/base/preface.h>
|
||||
#include <gnustep/base/MallocAddress.h>
|
||||
#include <Foundation/NSData.h>
|
||||
#include <Foundation/NSCoder.h>
|
||||
#include <gnustep/base/NSCoder.h>
|
||||
|
||||
@implementation NSCoder
|
||||
|
||||
|
@ -189,7 +188,7 @@
|
|||
while (count-- > 0)
|
||||
[self decodeValueOfObjCType:type at:where++];
|
||||
|
||||
[[[MallocAddress alloc] initWithAddress: array] autorelease];
|
||||
[NSData dataWithBytesNoCopy: array length: count];
|
||||
return array;
|
||||
}
|
||||
|
||||
|
|
|
@ -36,7 +36,7 @@
|
|||
#include <gnustep/base/TcpPort.h>
|
||||
#include <gnustep/base/mframe.h>
|
||||
#include <gnustep/base/NotificationDispatcher.h>
|
||||
#include <gnustep/base/MallocAddress.h>
|
||||
#include <Foundation/NSData.h>
|
||||
#include <Foundation/NSRunLoop.h>
|
||||
#include <Foundation/NSArray.h>
|
||||
#include <Foundation/NSDictionary.h>
|
||||
|
@ -1224,7 +1224,7 @@ static int messages_received_count;
|
|||
so we don't have a memory leak. Request here that it be
|
||||
autorelease'ed. Also autorelease created objects. */
|
||||
if (*type == _C_CHARPTR)
|
||||
[MallocAddress autoreleaseMallocAddress: *(char**)datum];
|
||||
[NSData dataWithBytesNoCopy: *(void**)datum length: 1];
|
||||
else if (*type == _C_ID)
|
||||
[*(id*)datum autorelease];
|
||||
}
|
||||
|
@ -1268,7 +1268,7 @@ static int messages_received_count;
|
|||
so we don't have a memory leak. Request here that it be
|
||||
autorelease'ed. Also autorelease created objects. */
|
||||
if (*type == _C_CHARPTR)
|
||||
[MallocAddress autoreleaseMallocAddress: *(char**)datum];
|
||||
[NSData dataWithBytesNoCopy: *(void**)datum length: 1];
|
||||
else if (*type == _C_ID)
|
||||
[*(id*)datum autorelease];
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue