mirror of
https://github.com/gnustep/libs-base.git
synced 2025-04-24 01:11:01 +00:00
25 lines
510 B
C
25 lines
510 B
C
#define INTEGER_MACRO(encoding, type, name, ignored) \
|
|
- (type) name ## Value\
|
|
{\
|
|
return (type)VALUE;\
|
|
}
|
|
#include "GSNumberTypes.h"
|
|
- (BOOL) boolValue
|
|
{
|
|
return (VALUE == 0) ? NO : YES;
|
|
}
|
|
- (const char *) objCType
|
|
{
|
|
return @encode(__typeof__(VALUE));
|
|
}
|
|
- (NSString*) descriptionWithLocale: (id)aLocale
|
|
{
|
|
return [[[NSString alloc] initWithFormat: FORMAT
|
|
locale: aLocale, VALUE] autorelease];
|
|
}
|
|
- (void) getValue: (void*)buffer
|
|
{
|
|
__typeof__(VALUE) *ptr = buffer;
|
|
*ptr = VALUE;
|
|
}
|
|
#undef FORMAT
|