• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Forwarding to Super
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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.


  • Follow-Ups:
    • Re: Forwarding to Super
      • From: Herr Witten <email@hidden>
References: 
 >Re: Forwarding to Super (From: Herr Witten <email@hidden>)
 >Re: Forwarding to Super (From: "Louis C. Sacha" <email@hidden>)
 >Re: Forwarding to Super (From: Herr Witten <email@hidden>)
 >Re: Forwarding to Super (From: John Randolph <email@hidden>)
 >Re: Forwarding to Super (From: Herr Witten <email@hidden>)
 >Re: Forwarding to Super (From: "Louis C. Sacha" <email@hidden>)

  • Prev by Date: Getting RTFD data into an NSData object.
  • Next by Date: Re: Getting RTFD data into an NSData object.
  • Previous by thread: Re: Forwarding to Super
  • Next by thread: Re: Forwarding to Super
  • Index(es):
    • Date
    • Thread