C typedef for NS ptrs?
C typedef for NS ptrs?
- Subject: C typedef for NS ptrs?
- From: Andy O'Meara <email@hidden>
- Date: Fri, 2 Apr 2010 16:38:48 -0500
Hey folks, quick question...
A have a couple vanilla NS object ptrs (e.g. NSWindow*) that I have to pass through some cross-plaform C++ code until it ends up in a .mm file where where the NS object is accessed. The problem is that in the .cpp code, there's no obvious way to declare a NSWindow ptr so that thinks will link without complaint. If, for example, in a key header I use:
#ifdef __OBJC__
#define NSWindowPtr NSWindow*
#else
#define NSWindowPtr void*
#endif
then everything of course compiles, but nothing links (since all the .cpp object files are looking for proc arguments with void* while the .mm object files are are declared with the real deal).
So, what can I replace that second macro with such that it meshes with ObjC's typedef mangling scheme?
Thanks in advance,
Andy
_______________________________________________
Cocoa-dev mailing list (email@hidden)
Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden