Re: Forwarding to Super
Re: Forwarding to Super
- Subject: Re: Forwarding to Super
- From: Herr Witten <email@hidden>
- Date: Sun, 4 Jul 2004 19:22:38 -0400
Thanks for your help.
On 4 Jul 2004, at 17:03, Louis C. Sacha wrote:
>
1) As far as I know, the array type isn't used as a return type and
>
only exists within struct declarations.
>
The return type would usually be a pointer instead. If you actually
>
run into a case where it uses the type encoding for an array,
>
shouldn't it be handled the same as a pointer anyway (and not using
>
the stret version)?
Of course.
>
>
2) You can't rely on the first letter of the encoded type string being
>
the actual type that is being returned. Qualifiers are also included
>
in the return type in the method signature, so for example the
>
NSString instance method cstring has a encoded return type of "r*"
>
where the first character r indicates the const qualifier.
The switch statement could be replaced with:
switch (type[0])
{
case 'r':
case 'n':
case 'N':
case 'o':
case 'O':
case 'R':
case 'V':
type++;
}
switch (type[0])
{
case _C_UNION_B:
case _C_STRUCT_B:
_method->method_imp = (IMP)_imp_proxy_stret;
break;
default:
_method->method_imp = _imp_proxy;
break;
}
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.