[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Is gcc able to handle anonymous functions?
From: |
Marc Hohl |
Subject: |
Re: Is gcc able to handle anonymous functions? |
Date: |
Wed, 04 Jul 2012 20:10:10 +0200 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:13.0) Gecko/20120615 Thunderbird/13.0.1 |
Am 04.07.2012 13:29, schrieb David Kastrup:
Marc Hohl <address@hidden> writes:
Hello list,
the topic is somewhat over my head, but perhaps someone with more
insight can answer this question?
I think that gcc likely can, don't know about g++, and we don't want to
rely on it anyhow.
Ok.
Well then, is there an alternative?
I want to get rid of bar-line.cc (issue 1320), and I have managed to get all
definitions but Bar_line::non_empty_barline into scheme.
In lily/note-spacing.cc, I have
Grob *bar = Pointer_group_interface::find_grob (right_col,
ly_symbol2scm
("elements"),
Bar_line::non_empty_barline);
The simple approach
bool non_empty_barline =
ly_scm2bool (scm_call_1 (ly_lily_module_constant
("bar-line::non-empty-barline"), right_col->self_scm ()));
with
(define-public (bar-line::non-empty-barline grob)
(and (grob::has-interface grob 'bar-line)
(pair? (ly:grob-extent grob grob X))))
doesn't work.
I see that in lily/pointer-group-interface.cc the function above is
defined as
Grob *
Pointer_group_interface::find_grob (Grob *me, SCM sym, bool (*pred)
(Grob *))
{
[snip]
}
What is bool (*pred) (Grob *)?
Is there a way to get a scheme function in this place, or do I have to put
the remaining definition of bar-line.cc into another file?
Regards,
Marc
- Is gcc able to handle anonymous functions?, Marc Hohl, 2012/07/04
- Re: Is gcc able to handle anonymous functions?, David Kastrup, 2012/07/04
- Re: Is gcc able to handle anonymous functions?,
Marc Hohl <=
- Re: Is gcc able to handle anonymous functions?, address@hidden, 2012/07/04
- Re: Is gcc able to handle anonymous functions?, Marc Hohl, 2012/07/05
- Re: Is gcc able to handle anonymous functions?, Joe Neeman, 2012/07/05
- Re: Is gcc able to handle anonymous functions?, Marc Hohl, 2012/07/05
- Re: Is gcc able to handle anonymous functions?, address@hidden, 2012/07/05
- Re: Is gcc able to handle anonymous functions?, Joe Neeman, 2012/07/05
- Re: Is gcc able to handle anonymous functions?, Marc Hohl, 2012/07/06
- Re: Is gcc able to handle anonymous functions?, David Kastrup, 2012/07/06
- Re: Is gcc able to handle anonymous functions?, Marc Hohl, 2012/07/06
- Re: Is gcc able to handle anonymous functions?, Joe Neeman, 2012/07/06