Simplify the KVC getter code and make it return structs boxed in NSValues

(Apple-compatible).  This is currently slow, because we go via NSInvocation.
We could probably make it faster, but I am not inclined to optimise for
something that I sincerely hope is a very unusual use case.

Richard: Please check I haven't done something silly here...



git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@31411 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
theraven 2010-09-24 19:20:16 +00:00
parent 8214f1edf0
commit 6eab2fe937
4 changed files with 102 additions and 373 deletions

View file

@ -411,7 +411,7 @@ static NSBoolNumber *boolN; // Boolean NO (integer 0)
return 0; // Not reached
}
#define INTEGER_MACRO(type, ignored, name) \
#define INTEGER_MACRO(encoding,type, ignored, name) \
- (id) initWith ## name: (type)aValue \
{\
DESTROY(self);\
@ -735,7 +735,7 @@ if (aValue >= -1 && aValue <= 12)\
* exception here matches OS X behaviour, although they throw an invalid
* argument exception.
*/
#define INTEGER_MACRO(type, name, ignored) \
#define INTEGER_MACRO(encoding, type, name, ignored) \
- (type) name ## Value\
{\
[self subclassResponsibility: _cmd];\