• 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: Fri, 23 Jul 2004 13:16:49 -0400

Sorry to beat a decaying horse, but I found that the return value was
not correct with the original code. This new code, however, works:

id _imp_proxy(id theReceiver, SEL theSelector, ...)
{
struct objc_super superContext;
superContext.receiver = theReceiver;
superContext.class = [theReceiver superclass];

void* args = __builtin_apply_args();

void* ptr = &superContext;

memmove((int*)args + 1, &ptr, sizeof(int*));

_method->method_imp = _method_imp_old;

//Don't use __builtin_return
id result = *((id*)__builtin_apply((void(*)())objc_msgSendSuper, args,
method_getSizeOfArguments(_method)));

return result;
}
_______________________________________________
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: Ben Dougall <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>)
 >Re: Forwarding to Super (From: Herr Witten <email@hidden>)

  • Prev by Date: Re: NSTimer firing issue
  • Next by Date: Re: Windows and Default Notification Center
  • Previous by thread: Re: Forwarding to Super
  • Next by thread: Re: Forwarding to Super
  • Index(es):
    • Date
    • Thread