lilypond-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Make GET_LISTENER take a pointer arg and deduce its type (issue 5498


From: hanwenn
Subject: Re: Make GET_LISTENER take a pointer arg and deduce its type (issue 549890043 by address@hidden)
Date: Sat, 18 Apr 2020 03:30:26 -0700

https://codereview.appspot.com/549890043/diff/579610043/lily/include/listener.hh
File lily/include/listener.hh (left):

https://codereview.appspot.com/549890043/diff/579610043/lily/include/listener.hh#oldcode140
lily/include/listener.hh:140: #define GET_LISTENER(cl, proc)
get_listener (Callback_wrapper::make_smob<Listener::trampoline<cl,
&cl::proc> > ())
IMO, the problem is that the macro scopes 'proc' to come from 'cl',
which is magical. Couldn't we change the calling convention to be 

  ctx->GET_LISTENER(&SomeContext::func) 

if we call this from within a SomeContext method itself, it could be 

   GET_LISTENER(&func)

If so, would we need a macro at all?

https://codereview.appspot.com/549890043/



reply via email to

[Prev in Thread] Current Thread [Next in Thread]