Re: Forwarding to Super
Re: Forwarding to Super
- Subject: Re: Forwarding to Super
- From: "Louis C. Sacha" <email@hidden>
- Date: Sun, 4 Jul 2004 14:03:45 -0700
Hello...
Just reading through your code, there are still a couple of issues:
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)?
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.
There is a list of the encoded versions of the qualifiers in the
objective-C language documentation at
http://developer.apple.com/documentation/Cocoa/Conceptual/ObjectiveC/4objc_runtime_overview/chapter_4_section_6.html#//apple_ref/doc/uid/20001425/TPXREF165
Louis
I have included a more complete implementation, which handles
structures as return types and has other changes:
_______________________________________________
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.