mirror of
https://github.com/gnustep/libs-base.git
synced 2025-05-11 00:30:49 +00:00
Minor twekas to fix three bug reports.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@20368 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
parent
02f54e6dd7
commit
94a96ae889
5 changed files with 17 additions and 38 deletions
11
ChangeLog
11
ChangeLog
|
@ -1,3 +1,14 @@
|
||||||
|
2004-11-22 Richard Frith-Macdonald <rfm@gnu.org>
|
||||||
|
|
||||||
|
* Source/NSPropertyList.m: Initialise harmless uninitialised variable
|
||||||
|
to avoid compiler warning in
|
||||||
|
([propertyListFromData:mutabilityOption:format:errorDescription:])
|
||||||
|
fixing bug report #11093
|
||||||
|
* Source/NSMessagePort.m: ifndef toi fix harmless compiler warning
|
||||||
|
reported as bug #11092
|
||||||
|
* NSNotificationCenter.[hm]: Remove non-functional setImmutableInPost
|
||||||
|
method to fix bug report #11080
|
||||||
|
|
||||||
2004-11-20 Richard Frith-Macdonald <rfm@gnu.org>
|
2004-11-20 Richard Frith-Macdonald <rfm@gnu.org>
|
||||||
|
|
||||||
* Source/NSBundle.m: Fix to ensure that a main bundle exists.
|
* Source/NSBundle.m: Fix to ensure that a main bundle exists.
|
||||||
|
|
|
@ -86,21 +86,12 @@
|
||||||
#ifndef NO_GNUSTEP
|
#ifndef NO_GNUSTEP
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Defines some extensions for maximising posting performance - these options
|
* Defines an extension for maximising posting performance - this option
|
||||||
* are NOT adjustable for the default notification center.
|
* is NOT adjustable for the default notification center.
|
||||||
*
|
|
||||||
*/
|
*/
|
||||||
@interface NSNotificationCenter (GNUstep)
|
@interface NSNotificationCenter (GNUstep)
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* You can turn on 'immutability' if you KNOW that the posting of a
|
|
||||||
* notification will never result in an attempt to modify the center.
|
|
||||||
* In this case, the center can optimise delivery of notifications.
|
|
||||||
*/
|
|
||||||
- (BOOL) setImmutableInPost: (BOOL)flag;
|
|
||||||
|
|
||||||
/**
|
|
||||||
*
|
|
||||||
* You can disable locking in a multi-threaded program if you KNOW that only
|
* You can disable locking in a multi-threaded program if you KNOW that only
|
||||||
* one thread will ever use the notification center.
|
* one thread will ever use the notification center.
|
||||||
*/
|
*/
|
||||||
|
|
|
@ -1459,7 +1459,9 @@ static int unique_index = 0;
|
||||||
{
|
{
|
||||||
NSMapEnumerator me;
|
NSMapEnumerator me;
|
||||||
int sock;
|
int sock;
|
||||||
|
#ifndef BROKEN_SO_REUSEADDR
|
||||||
int opt = 1;
|
int opt = 1;
|
||||||
|
#endif
|
||||||
GSMessageHandle *handle = nil;
|
GSMessageHandle *handle = nil;
|
||||||
|
|
||||||
M_LOCK(myLock);
|
M_LOCK(myLock);
|
||||||
|
|
|
@ -1137,30 +1137,6 @@ static NSNotificationCenter *default_center = nil;
|
||||||
|
|
||||||
@implementation NSNotificationCenter (GNUstep)
|
@implementation NSNotificationCenter (GNUstep)
|
||||||
|
|
||||||
- (BOOL) setImmutableInPost: (BOOL)flag
|
|
||||||
{
|
|
||||||
BOOL old;
|
|
||||||
|
|
||||||
lockNCTable(TABLE);
|
|
||||||
|
|
||||||
if (self == default_center)
|
|
||||||
{
|
|
||||||
unlockNCTable(TABLE);
|
|
||||||
[NSException raise: NSInvalidArgumentException
|
|
||||||
format: @"Can't change behavior of default center."];
|
|
||||||
}
|
|
||||||
if (LOCKCOUNT > 1)
|
|
||||||
{
|
|
||||||
unlockNCTable(TABLE);
|
|
||||||
[NSException raise: NSInvalidArgumentException
|
|
||||||
format: @"Can't change behavior during post."];
|
|
||||||
}
|
|
||||||
|
|
||||||
unlockNCTable(TABLE);
|
|
||||||
|
|
||||||
return old;
|
|
||||||
}
|
|
||||||
|
|
||||||
- (BOOL) setLockingDisabled: (BOOL)flag
|
- (BOOL) setLockingDisabled: (BOOL)flag
|
||||||
{
|
{
|
||||||
BOOL old;
|
BOOL old;
|
||||||
|
|
|
@ -2179,7 +2179,7 @@ GSPropertyListMake(id obj, NSDictionary *loc, BOOL xml,
|
||||||
format: (NSPropertyListFormat*)aFormat
|
format: (NSPropertyListFormat*)aFormat
|
||||||
errorDescription: (NSString**)anErrorString
|
errorDescription: (NSString**)anErrorString
|
||||||
{
|
{
|
||||||
NSPropertyListFormat format;
|
NSPropertyListFormat format = 0;
|
||||||
NSString *error = nil;
|
NSString *error = nil;
|
||||||
id result = nil;
|
id result = nil;
|
||||||
const unsigned char *bytes = 0;
|
const unsigned char *bytes = 0;
|
||||||
|
@ -2222,10 +2222,9 @@ GSPropertyListMake(id obj, NSDictionary *loc, BOOL xml,
|
||||||
if (length - index > 2
|
if (length - index > 2
|
||||||
&& bytes[index] == '<' && bytes[index+1] == '?')
|
&& bytes[index] == '<' && bytes[index+1] == '?')
|
||||||
{
|
{
|
||||||
#ifdef HAVE_LIBXML
|
|
||||||
// It begins with '<?' so it is xml
|
// It begins with '<?' so it is xml
|
||||||
format = NSPropertyListXMLFormat_v1_0;
|
format = NSPropertyListXMLFormat_v1_0;
|
||||||
#else
|
#ifndef HAVE_LIBXML
|
||||||
error = @"XML format not supported ... XML support not present.";
|
error = @"XML format not supported ... XML support not present.";
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue