mirror of
https://github.com/gnustep/libs-base.git
synced 2025-04-23 17:10:48 +00:00
Add undocumented MacOS-X compatibility feature.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@26318 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
parent
4c90ec5088
commit
aa884e1a44
2 changed files with 15 additions and 0 deletions
|
@ -2,6 +2,8 @@
|
|||
|
||||
* Source/NSDebug.m: Trap sigbus if gcc functions to get stack frame
|
||||
info run off the end of the stack.
|
||||
* Source/NSString.m: Implement ([-decimalValue]) ... undocumented
|
||||
feature of MacOS-X foundation.
|
||||
|
||||
2008-03-16 Richard Frith-Macdonald <rfm@gnu.org>
|
||||
|
||||
|
|
|
@ -55,6 +55,7 @@
|
|||
#include "Foundation/NSAutoreleasePool.h"
|
||||
#include "Foundation/NSString.h"
|
||||
#include "Foundation/NSCalendarDate.h"
|
||||
#include "Foundation/NSDecimal.h"
|
||||
#include "Foundation/NSArray.h"
|
||||
#include "Foundation/NSCharacterSet.h"
|
||||
#include "Foundation/NSException.h"
|
||||
|
@ -2637,6 +2638,18 @@ handle_printf_atsign (FILE *stream,
|
|||
return NO;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the string's content as a decimal.<br />
|
||||
* Undocumented feature of Aplle Foundation.
|
||||
*/
|
||||
- (NSDecimal) decimalValue
|
||||
{
|
||||
NSDecimal result;
|
||||
|
||||
NSDecimalFromString(&result, self, nil);
|
||||
return result;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the string's content as a double. Skips leading whitespace.<br />
|
||||
* Conversion is not localised (i.e. uses '.' as the decimal separator).<br />
|
||||
|
|
Loading…
Reference in a new issue