mirror of
https://github.com/gnustep/libs-base.git
synced 2025-04-22 16:33:29 +00:00
fix unarchiving bug and tidy
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@23275 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
parent
384ab4003a
commit
cdc0560ce6
5 changed files with 10 additions and 8 deletions
|
@ -7,6 +7,7 @@
|
|||
given a bad position. ([compare:]) fix to match MacOS-X
|
||||
* Source/NSObject.m: implement CRASH_ON_ZOMBIE
|
||||
* Documentation/Base.gsdoc: document it.
|
||||
* Source/NSArray.m: Fix error in decoding from keyed archive.
|
||||
|
||||
2006-08-12 Richard Frith-Macdonald <rfm@gnu.org>
|
||||
|
||||
|
|
|
@ -1045,7 +1045,7 @@ static Class GSInlineArrayClass;
|
|||
NSArray *array = [(NSKeyedUnarchiver*)aCoder _decodeArrayOfObjectsForKey:
|
||||
@"NS.objects"];
|
||||
|
||||
return array;
|
||||
return RETAIN(array);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -1053,7 +1053,8 @@ static Class GSInlineArrayClass;
|
|||
unsigned c;
|
||||
|
||||
[aCoder decodeValueOfObjCType: @encode(unsigned) at: &c];
|
||||
a = (id)NSAllocateObject(GSInlineArrayClass, sizeof(id)*c, GSObjCZone(self));
|
||||
a = (id)NSAllocateObject(GSInlineArrayClass,
|
||||
sizeof(id)*c, GSObjCZone(self));
|
||||
a->_contents_array = (id*)&a[1];
|
||||
if (c > 0)
|
||||
{
|
||||
|
|
|
@ -18,7 +18,8 @@
|
|||
|
||||
You should have received a copy of the GNU Library General Public
|
||||
License along with this library; if not, write to the Free
|
||||
Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111 USA.
|
||||
Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
|
||||
Boston, MA 02111 USA.
|
||||
|
||||
<title>NSArchiver class reference</title>
|
||||
$Date$ $Revision$
|
||||
|
|
|
@ -312,6 +312,7 @@ static NSMapTable globalClassMap = 0;
|
|||
NS_HANDLER
|
||||
{
|
||||
DESTROY(u);
|
||||
DESTROY(o);
|
||||
[localException raise];
|
||||
}
|
||||
NS_ENDHANDLER
|
||||
|
@ -323,12 +324,9 @@ static NSMapTable globalClassMap = 0;
|
|||
NSData *d;
|
||||
id o;
|
||||
|
||||
// CREATE_AUTORELEASE_POOL(pool);
|
||||
d = [NSData dataWithContentsOfFile: aPath];
|
||||
o = [self unarchiveObjectWithData: d];
|
||||
// RETAIN(o);
|
||||
// RELEASE(pool);
|
||||
return AUTORELEASE(o);
|
||||
return o;
|
||||
}
|
||||
|
||||
- (BOOL) allowsKeyedCoding
|
||||
|
|
|
@ -1109,7 +1109,7 @@ quotedFromString(NSString *aString)
|
|||
[args appendString: quotedFromString(arg)];
|
||||
}
|
||||
|
||||
NSLog(@"ARGS: %@", args);
|
||||
NSLog(@"ARGS: '%@'", args);
|
||||
w_args = NSZoneMalloc(NSDefaultMallocZone(),
|
||||
sizeof(wchar_t) * ([args length] + 1));
|
||||
[args getCharacters: (unichar*)w_args];
|
||||
|
@ -1198,6 +1198,7 @@ NSLog(@"ARGS: %@", args);
|
|||
NULL, /* thread attrs */
|
||||
1, /* inherit handles */
|
||||
CREATE_NO_WINDOW|CREATE_UNICODE_ENVIRONMENT, /* creation flags */
|
||||
//CREATE_UNICODE_ENVIRONMENT, /* creation flags */
|
||||
envp, /* env block */
|
||||
(const unichar*)[[self currentDirectoryPath] fileSystemRepresentation],
|
||||
&start_info,
|
||||
|
|
Loading…
Reference in a new issue