mirror of
https://github.com/gnustep/libs-base.git
synced 2025-05-30 00:11:26 +00:00
use dataFromPropertyList for the addition
This commit is contained in:
parent
ce7ff5709b
commit
6ac9271fbc
2 changed files with 13 additions and 10 deletions
|
@ -318,15 +318,17 @@ plFormatFromName(NSString *name)
|
|||
int
|
||||
dumpToFile(id obj, NSPropertyListFormat fmt, NSString *outfile)
|
||||
{
|
||||
NSError * anError;
|
||||
NSString * errorString = nil;
|
||||
NSFileHandle *fh;
|
||||
NSData * outdata = [NSPropertyListSerialization dataWithPropertyList:obj
|
||||
format:fmt
|
||||
options:0
|
||||
error:&anError];
|
||||
NSData * outdata =
|
||||
[NSPropertyListSerialization dataFromPropertyList:obj
|
||||
format:fmt
|
||||
options:0
|
||||
errorDescription:&errorString];
|
||||
if (anError)
|
||||
{
|
||||
GSPrintf(stderr, @"Dumping %@ as format %@ - %@\n", obj, fmt, anError);
|
||||
GSPrintf(stderr, @"Dumping %@ as format %@ - %@\n", obj, fmt,
|
||||
errorString);
|
||||
return EXIT_FAILURE;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue