Re: Accessing self in a C static function within an implementation definition

2014-04-07 Thread Quincey Morris
On Apr 7, 2014, at 03:00 , jonat...@mugginsoft.com wrote: > I have a function like macro: > > #define DBDispatchMonoEvent(KLASS, NAME) \ > do { \ >[DBManagedEvent dispatchEventFromMonoSender:monoSender \ > eventArgs:monoEventArgs \ >

Re: Accessing self in a C static function within an implementation definition

2014-04-07 Thread Uli Kusterer
On 07 Apr 2014, at 12:00, jonat...@mugginsoft.com wrote: > In every case the dispatch macro targets the surrounding class. > So I would like to reduce the call site invocation to: > > static void managedEvent_ItemAdded(MonoObject* monoSender, MonoObject* > monoEventArgs) > { >DBDispatchMono

Re: Accessing self in a C static function within an implementation definition

2014-04-07 Thread Maxthon Chan
No, you can’t. There is no way to accomplish that. If that is event-based callbacks, try use delegation and/or target-action. On Apr 7, 2014, at 18:00, jonat...@mugginsoft.com wrote: > I have a function like macro: > > #define DBDispatchMonoEvent(KLASS, NAME) \ > do { \ >[DBManagedEvent dis

Accessing self in a C static function within an implementation definition

2014-04-07 Thread jonat...@mugginsoft.com
I have a function like macro: #define DBDispatchMonoEvent(KLASS, NAME) \ do { \ [DBManagedEvent dispatchEventFromMonoSender:monoSender \ eventArgs:monoEventArgs \ targetClass:[KLASS class] \