Re: concerns when integrating C++ code into guile?

2015-01-07 Thread Matt Wette
On Jan 7, 2015, at 2:09 AM, Hans Aberg wrote: >> On 7 Jan 2015, at 03:32, Matt Wette wrote: >> >> What are the concerns when integrating C++ code into guile? >> >> I'm guessing interleaved C++ exception handling, but are there others. >> >> Assuming the C++ code calls no guile code, should al

Re: concerns when integrating C++ code into guile?

2015-01-07 Thread Hans Aberg
> On 7 Jan 2015, at 03:32, Matt Wette wrote: > > What are the concerns when integrating C++ code into guile? > > I'm guessing interleaved C++ exception handling, but are there others. > > Assuming the C++ code calls no guile code, should all C++ exceptions be > caught at the interface? In th

Re: concerns when integrating C++ code into guile?

2015-01-07 Thread Hans Aberg
> On 7 Jan 2015, at 14:52, Matt Wette wrote: > > Python is written in C yet Qt has been integrated in to produce PyQt. I > wonder how that is done. I will take a look. If Python can be compiled as C++, that might be one way. For proper C, the example below compiles with: gcc -lstdc++ mai

Re: concerns when integrating C++ code into guile?

2015-01-07 Thread Chris Vine
On Tue, 06 Jan 2015 18:32:10 -0800 Matt Wette wrote: > What are the concerns when integrating C++ code into guile? > > I'm guessing interleaved C++ exception handling, but are there others. > > Assuming the C++ code calls no guile code, should all C++ exceptions > be caught at the interface? Th

Re: concerns when integrating C++ code into guile?

2015-01-07 Thread Hans Aberg
> On 7 Jan 2015, at 03:32, Matt Wette wrote: > > What are the concerns when integrating C++ code into guile? There is a FAQ about mixing C and C++ here: https://isocpp.org/wiki/faq/mixing-c-and-cpp

Re: concerns when integrating C++ code into guile?

2015-01-07 Thread Ludovic Courtès
If Scheme code calls C++ code that throws an exception, then the stack will be unwound by libstdc++ and Guile’s ‘dynamic-wind’ handlers and such will not run. That’s probably the main difficulty. Likewise when C++ code calls Scheme code. TeXmacs and LilyPond both embed Guile in a C++ code base s

Re: concerns when integrating C++ code into guile?

2015-01-07 Thread Hans Aberg
> On 7 Jan 2015, at 21:24, Ludovic Courtès wrote: > > If Scheme code calls C++ code that throws an exception, then the stack > will be unwound by libstdc++ and Guile’s ‘dynamic-wind’ handlers and > such will not run. If one tries to pass a C++ exception through Guile code, it will not catch i

Re: concerns when integrating C++ code into guile?

2015-01-07 Thread Chris Vine
On Wed, 7 Jan 2015 23:15:07 +0100 Hans Aberg wrote: > > > On 7 Jan 2015, at 21:24, Ludovic Courtès wrote: > > > > If Scheme code calls C++ code that throws an exception, then the > > stack will be unwound by libstdc++ and Guile’s ‘dynamic-wind’ > > handlers and such will not run. > > If one

Re: concerns when integrating C++ code into guile?

2015-01-07 Thread Matt Wette
On Jan 7, 2015, at 6:45 AM, Hans Aberg wrote: > >> On 7 Jan 2015, at 14:52, Matt Wette wrote: >> >> Python is written in C yet Qt has been integrated in to produce PyQt. I >> wonder how that is done. I will take a look. > > If Python can be compiled as C++, that might be one way. PyQt d