Monotone-Parent: a1ad485763dbb256f42488a0cf3e8c8061604d83

Monotone-Revision: d656a1a3c9e97c1b1a23a7959821aa3c54780d86

Monotone-Author: wsourdeau@inverse.ca
Monotone-Date: 2009-11-18T23:15:34
Monotone-Branch: ca.inverse.sogo
This commit is contained in:
Wolfgang Sourdeau
2009-11-18 23:15:34 +00:00
parent bf127ecc18
commit 2dcdcb2e89
5 changed files with 10 additions and 5 deletions

View File

@@ -1,5 +1,10 @@
2009-11-18 Wolfgang Sourdeau <wsourdeau@inverse.ca>
* SoObjects/SOGo/NSDictionary+BSJSONAdditions.m
(+dictionaryWithJSONString:): this constructor now explicitly
returns an NSMutableDictionary to avoid messing with mutable
copies and useless allocation/deallocation in the callers.
* Main/SOGo.m (+initialize): removed the "debugObjectAllocation" global
variable since "debugLeaks" has the same meaning. Instantiate a
"SOGoStartupLogger" object in order to avoid using NSLog when the

View File

@@ -28,7 +28,7 @@ extern const int jsonDoNotIndent;
@interface NSDictionary (BSJSONAdditions)
+ (NSDictionary *)dictionaryWithJSONString:(NSString *)jsonString;
+ (NSMutableDictionary *)dictionaryWithJSONString:(NSString *)jsonString;
- (NSString *)jsonStringValue;
@end

View File

@@ -35,10 +35,10 @@ const int jsonDoNotIndent = -1;
@implementation NSDictionary (BSJSONAdditions)
+ (NSDictionary *)dictionaryWithJSONString:(NSString *)jsonString
+ (NSMutableDictionary *)dictionaryWithJSONString:(NSString *)jsonString
{
NSScanner *scanner = [[NSScanner alloc] initWithString:jsonString];
NSDictionary *dictionary = nil;
NSMutableDictionary *dictionary = nil;
[scanner scanJSONObject:&dictionary];
[scanner release];
return dictionary;

View File

@@ -45,7 +45,7 @@ extern NSString *jsonNullString;
@interface NSScanner (PrivateBSJSONAdditions)
- (BOOL)scanJSONObject:(NSDictionary **)dictionary;
- (BOOL)scanJSONObject:(NSMutableDictionary **)dictionary;
- (BOOL)scanJSONArray:(NSArray **)array;
- (BOOL)scanJSONString:(NSString **)string;
- (BOOL)scanJSONValue:(id *)value;

View File

@@ -48,7 +48,7 @@ NSString *jsonNullString = @"null";
@implementation NSScanner (PrivateBSJSONAdditions)
- (BOOL)scanJSONObject:(NSDictionary **)dictionary
- (BOOL)scanJSONObject:(NSMutableDictionary **)dictionary
{
//[self setCharactersToBeSkipped:nil];