Skip to content

Instantly share code, notes, and snippets.

@dodikk
Created December 17, 2013 10:23
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save dodikk/8002842 to your computer and use it in GitHub Desktop.
Save dodikk/8002842 to your computer and use it in GitHub Desktop.
ObjcMsgSend casting on x64
typedef NSDate* (*AlignMsgSendFunction)( id, SEL, BOOL, NSDate*, NSCalendar* );
AlignMsgSendFunction alignFunction = (AlignMsgSendFunction)objc_msgSend;
NSDate* result_ = alignFunction( [ NSDate class ]
, selector_
, alignToFuture_
, date_
, self );
NSDate* result_ = objc_msgSend( [ NSDate class ]
, selector_
, alignToFuture_
, date_
, self );
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment