[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Denemo-devel] Midi shortcuts
From: |
Richard Shann |
Subject: |
Re: [Denemo-devel] Midi shortcuts |
Date: |
Sat, 07 May 2011 17:16:25 +0100 |
I am exceedingly puzzled by this: my code does not have such a static -
it seems to be some version of the code developed by Jeremiah to fix
memory leaks. But I don't know where it has come from, as I have just
committed and so must be up-to-date.
Where have you gotten this from?
(as you say it is wrong, a regression on the release)
Richard
On Sat, 2011-05-07 at 12:06 +0000, Ralf Mattes wrote:
> On Sat, 07 May 2011 11:58:16 +0000, Ralf Mattes wrote:
>
> >
> > gchar *get_midi_control_command(guchar type, guchar value) {
> > static SCM lookup_fun = scm_c_lookup("MIDI-shortcut::controller");
> > gchar r_val = NULL;
> > SCM res;
> >
> > scm_dynwind_begin(0);
> > res = scm_call_2(lookup_fun, SCM_I_MAKINUM(type),
> > SCM_I_MAKINUM(value));
> > if(scm_is_string(res)) {
> > SCM2LSTRING(r_val, res);
> > }
> > scm_dynwind_end();
> > return r_val;
> > }
>
> Just one more comment about this code: as a result the value of
> MIDI-shortcut::controller
> is looked up only once, hence runtime redefinition won't work. If this is
> wanted, just
> remove the static from the definition of lookup_fun.
>
> Cheers, RalfD
>
> >
> > Cheers, RalfD
> >
> >> HTH
> >> Richard
> >>
> >>
> >>
> >>
>
>
>
> _______________________________________________
> Denemo-devel mailing list
> address@hidden
> https://lists.gnu.org/mailman/listinfo/denemo-devel
- [Denemo-devel] Midi shortcuts, Ralf Mattes, 2011/05/07
- Re: [Denemo-devel] Midi shortcuts, Richard Shann, 2011/05/07
- Re: [Denemo-devel] Midi shortcuts, Richard Shann, 2011/05/07
- Re: [Denemo-devel] Midi shortcuts, R. Mattes, 2011/05/07
- Re: [Denemo-devel] Midi shortcuts, Richard Shann, 2011/05/07
- Re: [Denemo-devel] Midi shortcuts, Ralf Mattes, 2011/05/07
- Re: [Denemo-devel] Midi shortcuts, Ralf Mattes, 2011/05/07
- Re: [Denemo-devel] Midi shortcuts,
Richard Shann <=
- Re: [Denemo-devel] Midi shortcuts, R. Mattes, 2011/05/07
- Re: [Denemo-devel] Midi shortcuts, Richard Shann, 2011/05/07
- Re: [Denemo-devel] Midi shortcuts, R. Mattes, 2011/05/08
- Re: [Denemo-devel] Midi shortcuts, Ralf Mattes, 2011/05/08
- Re: [Denemo-devel] Midi shortcuts, Richard Shann, 2011/05/09
- Re: [Denemo-devel] Midi shortcuts, R. Mattes, 2011/05/09
- Re: [Denemo-devel] Midi shortcuts, Richard Shann, 2011/05/10
- Re: [Denemo-devel] Midi shortcuts, R. Mattes, 2011/05/10
- Re: [Denemo-devel] Midi shortcuts, Richard Shann, 2011/05/10
- Re: [Denemo-devel] Midi shortcuts, Richard Shann, 2011/05/10