mirror of
https://github.com/gnustep/libs-base.git
synced 2025-05-29 16:01:38 +00:00
OSX compat tweaks
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@32323 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
parent
e3a0b4cab8
commit
c0674078c9
19 changed files with 60 additions and 31 deletions
|
@ -5287,7 +5287,7 @@ appendString(NSMutableData *m, NSUInteger offset, NSUInteger fold,
|
|||
{
|
||||
return NO;
|
||||
}
|
||||
if (NO == [[self content] isEqual: [other content]])
|
||||
if (NO == [[self content] isEqual: [(GSMimeDocument*)other content]])
|
||||
{
|
||||
return NO;
|
||||
}
|
||||
|
|
|
@ -1245,7 +1245,7 @@ compare(id elem1, id elem2, void* context)
|
|||
* Returns the result of invoking -descriptionWithLocale:indent:
|
||||
* with a zero indent.
|
||||
*/
|
||||
- (NSString*) descriptionWithLocale: (NSDictionary*)locale
|
||||
- (NSString*) descriptionWithLocale: (id)locale
|
||||
{
|
||||
return [self descriptionWithLocale: locale indent: 0];
|
||||
}
|
||||
|
@ -1260,7 +1260,7 @@ compare(id elem1, id elem2, void* context)
|
|||
* The items in the property list string appear in the same order as
|
||||
* they appear in the receiver.
|
||||
*/
|
||||
- (NSString*) descriptionWithLocale: (NSDictionary*)locale
|
||||
- (NSString*) descriptionWithLocale: (id)locale
|
||||
indent: (NSUInteger)level
|
||||
{
|
||||
NSString *result = nil;
|
||||
|
|
|
@ -197,9 +197,11 @@ static NSRecursiveLock *classLock = nil;
|
|||
+ (id) currentCalendar
|
||||
{
|
||||
NSCalendar *result;
|
||||
NSLocale *locale;
|
||||
NSCalendar *cal;
|
||||
|
||||
cal = [[NSLocale currentLocale] objectForKey: NSLocaleCalendar];
|
||||
locale = [NSLocale currentLocale];
|
||||
cal = [locale objectForKey: NSLocaleCalendar];
|
||||
result =
|
||||
[[NSCalendar alloc] initWithCalendarIdentifier: [cal calendarIdentifier]];
|
||||
|
||||
|
|
|
@ -2460,7 +2460,7 @@ static void outputValueWithFormat(int v, char *fldfmt, DescriptionInfo *info)
|
|||
* the specified locale dictionary.<br />
|
||||
* Calls -descriptionWithCalendarFormat:locale: to do this.
|
||||
*/
|
||||
- (NSString*) descriptionWithLocale: (NSDictionary *)locale
|
||||
- (NSString*) descriptionWithLocale: (id)locale
|
||||
{
|
||||
return [self descriptionWithCalendarFormat: _calendar_format locale: locale];
|
||||
}
|
||||
|
|
|
@ -1192,7 +1192,7 @@ otherTime(NSDate* other)
|
|||
* Returns a string representation of the receiver formatted according
|
||||
* to the default format string and time zone, but using the given locale.
|
||||
*/
|
||||
- (NSString *) descriptionWithLocale: (NSDictionary *)locale
|
||||
- (NSString *) descriptionWithLocale: (id)locale
|
||||
{
|
||||
// Easiest to just have NSCalendarDate do the work for us
|
||||
NSString *s;
|
||||
|
|
|
@ -29,6 +29,7 @@
|
|||
#define EXPOSE_NSDateFormatter_IVARS 1
|
||||
#import "Foundation/NSArray.h"
|
||||
#import "Foundation/NSDate.h"
|
||||
#import "Foundation/NSDictionary.h"
|
||||
#import "Foundation/NSCalendar.h"
|
||||
#import "Foundation/NSCalendarDate.h"
|
||||
#import "Foundation/NSLocale.h"
|
||||
|
@ -458,11 +459,11 @@ static NSDateFormatterBehavior _defaultBehavior = 0;
|
|||
NSMutableDictionary *dict;
|
||||
NSLocale *locale;
|
||||
|
||||
dict = [[NSLocale componentsFromLocaleIdentifier: [internal->_locale localeIdentifier]]
|
||||
mutableCopy];
|
||||
dict = [[NSLocale componentsFromLocaleIdentifier:
|
||||
[internal->_locale localeIdentifier]] mutableCopy];
|
||||
[dict setValue: calendar forKey: NSLocaleCalendar];
|
||||
locale = [[NSLocale alloc] initWithLocaleIdentifier:
|
||||
[NSLocale localeIdentifierFromComponents: (NSDictionary *)dict]];
|
||||
[NSLocale localeIdentifierFromComponents: dict]];
|
||||
[self setLocale: locale];
|
||||
/* Don't have to use udat_setCalendar here because -setLocale: will take care
|
||||
of setting the calendar when it resets the formatter. */
|
||||
|
|
|
@ -33,6 +33,7 @@
|
|||
#import "GNUstepBase/GSLock.h"
|
||||
#import "Foundation/NSArray.h"
|
||||
#import "Foundation/NSData.h"
|
||||
#import "Foundation/NSDictionary.h"
|
||||
#import "Foundation/NSLock.h"
|
||||
#import "Foundation/NSNotification.h"
|
||||
#import "Foundation/NSNotificationQueue.h"
|
||||
|
@ -878,13 +879,14 @@ static jbuf_type *
|
|||
jbuf()
|
||||
{
|
||||
NSMutableData *d;
|
||||
NSMutableDictionary *dict;
|
||||
|
||||
d = [[[NSThread currentThread] threadDictionary] objectForKey: @"GSjbuf"];
|
||||
dict = [[NSThread currentThread] threadDictionary];
|
||||
d = [dict objectForKey: @"GSjbuf"];
|
||||
if (d == nil)
|
||||
{
|
||||
d = [[NSMutableData alloc] initWithLength: sizeof(jbuf_type)];
|
||||
[[[NSThread currentThread] threadDictionary] setObject: d
|
||||
forKey: @"GSjbuf"];
|
||||
[dict setObject: d forKey: @"GSjbuf"];
|
||||
RELEASE(d);
|
||||
}
|
||||
return (jbuf_type*)[d mutableBytes];
|
||||
|
|
|
@ -602,7 +602,7 @@ static NSDecimalNumber *one;
|
|||
isNegative: NO];
|
||||
}
|
||||
|
||||
- (NSString*) descriptionWithLocale: (NSDictionary*)locale
|
||||
- (NSString*) descriptionWithLocale: (id)locale
|
||||
{
|
||||
return NSDecimalString(&data, locale);
|
||||
}
|
||||
|
|
|
@ -1057,7 +1057,7 @@ compareIt(id o1, id o2, void* context)
|
|||
* Returns the result of invoking -descriptionWithLocale:indent: with
|
||||
* a zero indent.
|
||||
*/
|
||||
- (NSString*) descriptionWithLocale: (NSDictionary*)locale
|
||||
- (NSString*) descriptionWithLocale: (id)locale
|
||||
{
|
||||
return [self descriptionWithLocale: locale indent: 0];
|
||||
}
|
||||
|
@ -1073,7 +1073,7 @@ compareIt(id o1, id o2, void* context)
|
|||
* listed by key in ascending order. If not, the order in which the
|
||||
* items are listed is undefined.
|
||||
*/
|
||||
- (NSString*) descriptionWithLocale: (NSDictionary*)locale
|
||||
- (NSString*) descriptionWithLocale: (id)locale
|
||||
indent: (NSUInteger)level
|
||||
{
|
||||
NSMutableString *result = nil;
|
||||
|
|
|
@ -2137,12 +2137,12 @@ objc_create_block_classes_as_subclasses_of(Class super) __attribute__((weak));
|
|||
* the -description method and discards the locale
|
||||
* information.
|
||||
*/
|
||||
- (NSString*) descriptionWithLocale: (NSDictionary*)aLocale
|
||||
- (NSString*) descriptionWithLocale: (id)aLocale
|
||||
{
|
||||
return [self description];
|
||||
}
|
||||
|
||||
+ (NSString*) descriptionWithLocale: (NSDictionary*)aLocale
|
||||
+ (NSString*) descriptionWithLocale: (id)aLocale
|
||||
{
|
||||
return [self description];
|
||||
}
|
||||
|
@ -2152,13 +2152,13 @@ objc_create_block_classes_as_subclasses_of(Class super) __attribute__((weak));
|
|||
* the -descriptionWithLocale: method and discards the
|
||||
* level information.
|
||||
*/
|
||||
- (NSString*) descriptionWithLocale: (NSDictionary*)aLocale
|
||||
- (NSString*) descriptionWithLocale: (id)aLocale
|
||||
indent: (NSUInteger)level
|
||||
{
|
||||
return [self descriptionWithLocale: aLocale];
|
||||
}
|
||||
|
||||
+ (NSString*) descriptionWithLocale: (NSDictionary*)aLocale
|
||||
+ (NSString*) descriptionWithLocale: (id)aLocale
|
||||
indent: (NSUInteger)level
|
||||
{
|
||||
return [self descriptionWithLocale: aLocale];
|
||||
|
|
|
@ -619,7 +619,7 @@ static Class NSMutableSet_concrete_class;
|
|||
/**
|
||||
* Returns listing of objects in set.
|
||||
*/
|
||||
- (NSString*) descriptionWithLocale: (NSDictionary*)locale
|
||||
- (NSString*) descriptionWithLocale: (id)locale
|
||||
{
|
||||
return [[self allObjects] descriptionWithLocale: locale];
|
||||
}
|
||||
|
|
|
@ -66,10 +66,10 @@ typedef struct {
|
|||
{
|
||||
NSString *k;
|
||||
|
||||
e = [headers keyEnumerator];
|
||||
e = [(NSDictionary*)headers keyEnumerator];
|
||||
while ((k = [e nextObject]) != nil)
|
||||
{
|
||||
v = [headers objectForKey: k];
|
||||
v = [(NSDictionary*)headers objectForKey: k];
|
||||
[self _setValue: v forHTTPHeaderField: k];
|
||||
}
|
||||
}
|
||||
|
@ -77,7 +77,7 @@ typedef struct {
|
|||
{
|
||||
GSMimeHeader *h;
|
||||
|
||||
e = [headers objectEnumerator];
|
||||
e = [(NSArray*)headers objectEnumerator];
|
||||
while ((h = [e nextObject]) != nil)
|
||||
{
|
||||
NSString *n = [h namePreservingCase: YES];
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue