mirror of
https://github.com/gnustep/libs-base.git
synced 2025-04-26 02:01:03 +00:00
Minor fixes
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@10674 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
parent
a0ef32c1ec
commit
7d4e3075ea
3 changed files with 131 additions and 108 deletions
|
@ -1,3 +1,8 @@
|
|||
2001-08-10 Richard Frith-Macdonald <rfm@gnu.org>
|
||||
|
||||
* Source/NSDistantObject.m: Tidy method lookup code.
|
||||
* Source/NSString.m: Handle nil content when parsing xml elements.
|
||||
|
||||
2001-08-06 Willem Rein Oudshoorn <wim@xs4all.nl>
|
||||
|
||||
* Source/GSFFCallInvocation.m: Forwarding:
|
||||
|
|
|
@ -773,6 +773,24 @@ enum
|
|||
}
|
||||
else
|
||||
{
|
||||
/*
|
||||
* Evil hack to prevent recursion - if we are asking a remote
|
||||
* object for a method signature, we can't ask it for the
|
||||
* signature of methodSignatureForSelector:, so we hack in
|
||||
* the signature required manually :-(
|
||||
*/
|
||||
if (sel_eq(aSelector, _cmd))
|
||||
{
|
||||
static NSMethodSignature *sig = nil;
|
||||
|
||||
if (sig == nil)
|
||||
{
|
||||
sig = [NSMethodSignature signatureWithObjCTypes: "@@::"];
|
||||
RETAIN(sig);
|
||||
}
|
||||
return sig;
|
||||
}
|
||||
|
||||
if (_protocol != nil)
|
||||
{
|
||||
const char *types = 0;
|
||||
|
@ -799,28 +817,10 @@ enum
|
|||
id m;
|
||||
const char *types;
|
||||
#ifdef USE_FFCALL
|
||||
/*
|
||||
* Evil hack to prevent recursion - if we are asking a remote
|
||||
* object for a method signature, we can't ask it for the
|
||||
* signature of methodSignatureForSelector:, so we hack in
|
||||
* the signature required manually :-(
|
||||
*/
|
||||
if (sel_eq(aSelector, _cmd))
|
||||
{
|
||||
static NSMethodSignature *sig = nil;
|
||||
id inv;
|
||||
id sig;
|
||||
|
||||
if (sig == nil)
|
||||
{
|
||||
sig = [NSMethodSignature signatureWithObjCTypes: "@@::"];
|
||||
RETAIN(sig);
|
||||
}
|
||||
return sig;
|
||||
}
|
||||
else
|
||||
{
|
||||
id inv, sig;
|
||||
DO_FORWARD_INVOCATION(methodSignatureForSelector:, aSelector);
|
||||
}
|
||||
#else
|
||||
arglist_t args;
|
||||
void *retframe;
|
||||
|
@ -838,7 +838,6 @@ enum
|
|||
m = retframe_id(retframe);
|
||||
#endif
|
||||
types = [m methodType];
|
||||
|
||||
return [NSMethodSignature signatureWithObjCTypes: types];
|
||||
}
|
||||
}
|
||||
|
|
|
@ -4369,6 +4369,12 @@ nodeToObject(GSXMLNode* node)
|
|||
|
||||
if ([name isEqualToString: @"string"]
|
||||
|| [name isEqualToString: @"key"])
|
||||
{
|
||||
if (content == nil)
|
||||
{
|
||||
content = @"";
|
||||
}
|
||||
else
|
||||
{
|
||||
NSRange r;
|
||||
|
||||
|
@ -4476,6 +4482,7 @@ nodeToObject(GSXMLNode* node)
|
|||
}
|
||||
content = [NSString stringWithCharacters: buf length: len];
|
||||
}
|
||||
}
|
||||
return content;
|
||||
}
|
||||
else if ([name isEqualToString: @"true"])
|
||||
|
@ -4488,14 +4495,26 @@ nodeToObject(GSXMLNode* node)
|
|||
}
|
||||
else if ([name isEqualToString: @"integer"])
|
||||
{
|
||||
if (content == nil)
|
||||
{
|
||||
content = @"0";
|
||||
}
|
||||
return [NSNumber numberWithInt: [content intValue]];
|
||||
}
|
||||
else if ([name isEqualToString: @"real"])
|
||||
{
|
||||
if (content == nil)
|
||||
{
|
||||
content = @"0.0";
|
||||
}
|
||||
return [NSNumber numberWithDouble: [content doubleValue]];
|
||||
}
|
||||
else if ([name isEqualToString: @"date"])
|
||||
{
|
||||
if (content == nil)
|
||||
{
|
||||
content = @"";
|
||||
}
|
||||
return [NSCalendarDate dateWithString: content
|
||||
calendarFormat: @"%Y-%m-%d %H:%M:%S %z"];
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue