From b04bfafc952d2c7532cb35582dd4fd1190758928 Mon Sep 17 00:00:00 2001 From: richard Date: Wed, 30 Sep 1998 08:29:58 +0000 Subject: [PATCH] Don't use MallocAddress git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@2993 72102866-910b-0410-8b05-ffd578937521 --- Source/BinaryCStream.m | 4 ++-- Source/NSCoder.m | 5 ++--- Source/NSConnection.m | 6 +++--- 3 files changed, 7 insertions(+), 8 deletions(-) diff --git a/Source/BinaryCStream.m b/Source/BinaryCStream.m index 810414bb3..aa7cc5656 100644 --- a/Source/BinaryCStream.m +++ b/Source/BinaryCStream.m @@ -27,7 +27,7 @@ #include #include #include -#include +#include #include #include #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; } diff --git a/Source/NSCoder.m b/Source/NSCoder.m index a0672f0df..c101a57ae 100644 --- a/Source/NSCoder.m +++ b/Source/NSCoder.m @@ -24,9 +24,8 @@ #include #include -#include +#include #include -#include @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; } diff --git a/Source/NSConnection.m b/Source/NSConnection.m index b8134fdfa..536d0a73e 100644 --- a/Source/NSConnection.m +++ b/Source/NSConnection.m @@ -36,7 +36,7 @@ #include #include #include -#include +#include #include #include #include @@ -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]; }