mirror of
https://github.com/gnustep/libs-base.git
synced 2025-05-31 00:30:53 +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
ddc3ee78c2
commit
8ab351aa1e
5 changed files with 17 additions and 38 deletions
|
@ -1459,7 +1459,9 @@ static int unique_index = 0;
|
|||
{
|
||||
NSMapEnumerator me;
|
||||
int sock;
|
||||
#ifndef BROKEN_SO_REUSEADDR
|
||||
int opt = 1;
|
||||
#endif
|
||||
GSMessageHandle *handle = nil;
|
||||
|
||||
M_LOCK(myLock);
|
||||
|
|
|
@ -1137,30 +1137,6 @@ static NSNotificationCenter *default_center = nil;
|
|||
|
||||
@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 old;
|
||||
|
|
|
@ -2179,7 +2179,7 @@ GSPropertyListMake(id obj, NSDictionary *loc, BOOL xml,
|
|||
format: (NSPropertyListFormat*)aFormat
|
||||
errorDescription: (NSString**)anErrorString
|
||||
{
|
||||
NSPropertyListFormat format;
|
||||
NSPropertyListFormat format = 0;
|
||||
NSString *error = nil;
|
||||
id result = nil;
|
||||
const unsigned char *bytes = 0;
|
||||
|
@ -2222,10 +2222,9 @@ GSPropertyListMake(id obj, NSDictionary *loc, BOOL xml,
|
|||
if (length - index > 2
|
||||
&& bytes[index] == '<' && bytes[index+1] == '?')
|
||||
{
|
||||
#ifdef HAVE_LIBXML
|
||||
// It begins with '<?' so it is xml
|
||||
format = NSPropertyListXMLFormat_v1_0;
|
||||
#else
|
||||
#ifndef HAVE_LIBXML
|
||||
error = @"XML format not supported ... XML support not present.";
|
||||
#endif
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue