[51252] users/toby/objcports/MPPort.m

toby at macports.org toby at macports.org
Thu May 21 12:57:51 PDT 2009


Revision: 51252
          http://trac.macports.org/changeset/51252
Author:   toby at macports.org
Date:     2009-05-21 12:57:51 -0700 (Thu, 21 May 2009)
Log Message:
-----------
use NSPropertyListSerialization instead

Modified Paths:
--------------
    users/toby/objcports/MPPort.m

Modified: users/toby/objcports/MPPort.m
===================================================================
--- users/toby/objcports/MPPort.m	2009-05-21 19:53:30 UTC (rev 51251)
+++ users/toby/objcports/MPPort.m	2009-05-21 19:57:51 UTC (rev 51252)
@@ -12,6 +12,7 @@
 
 - (id)initWithURL:(NSURL *)url options:(NSDictionary *)options
 {
+	NSData *vdata;
 	self = [super init];
 	_url = [url retain];
 
@@ -19,8 +20,12 @@
 	_variants = [[NSMutableDictionary alloc] initWithCapacity:0];
 
 	_variables = [[NSMutableDictionary alloc] initWithCapacity:0];
-	_variableInfo = [[NSMutableDictionary alloc] initWithContentsOfFile:@"variables.plist"];
 
+	//_variableInfo = [[NSMutableDictionary alloc] initWithContentsOfFile:@"variables.plist"];
+	vdata = [[NSData alloc] initWithContentsOfMappedFile:@"variables.plist"];
+	_variableInfo = [[NSPropertyListSerialization propertyListWithData:vdata options:kCFPropertyListMutableContainersAndLeaves format:NULL error:NULL] retain];
+	[vdata release];
+
 	NSArray *commands = [NSArray arrayWithObjects:
 		@"cvs", // portfetch.tcl
 		@"svn", // portfetch.tcl
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/macports-changes/attachments/20090521/7a5dd611/attachment.html>


More information about the macports-changes mailing list