mirror of
https://github.com/gnustep/libs-base.git
synced 2025-04-22 16:33:29 +00:00
fixup for signedness ... charValue always returns a signed char
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@32777 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
parent
d9d0d1b6fd
commit
ee798647d7
2 changed files with 3 additions and 3 deletions
|
@ -491,7 +491,7 @@ if (aValue >= -1 && aValue <= 12)\
|
|||
if (self != NSNumberClass)
|
||||
{
|
||||
return [[[self alloc] initWithBytes: (const void *)&aValue
|
||||
objCType: @encode(char)] autorelease];
|
||||
objCType: @encode(signed char)] autorelease];
|
||||
}
|
||||
return [self numberWithInt: aValue];
|
||||
}
|
||||
|
@ -679,7 +679,7 @@ if (aValue >= -1 && aValue <= 12)\
|
|||
switch (type[0])
|
||||
{
|
||||
case 'c':
|
||||
return [self initWithInteger: *(char *) value];
|
||||
return [self initWithInteger: *(signed char *) value];
|
||||
case 'C':
|
||||
return [self initWithInteger: *(unsigned char *) value];
|
||||
case 's':
|
||||
|
|
|
@ -107,7 +107,7 @@ int main()
|
|||
"NSDecimalNumber doubleValue works")
|
||||
PASS(YES == [val1 boolValue],
|
||||
"NSDecimalNumber boolValue works")
|
||||
PASS((char)200 == [val1 charValue],
|
||||
PASS((signed char)200 == [val1 charValue],
|
||||
"NSDecimalNumber charValue works")
|
||||
PASS(200 == [val1 intValue],
|
||||
"NSDecimalNumber intValue works")
|
||||
|
|
Loading…
Reference in a new issue