Re: [C++-sig] question on boost.python exception mechanisms

2013-04-29 Thread Niall Douglas
> I feel a bit out of my depths here now wrt to all that boost magic > but I've definitely learned a bunch :) Much of the "boost magic" we talked about is now plain C++11. It's very worth while to read "The C++ standard library" by Josuttis from cover to cover (it's about 1000 pages, get the C++

Re: [C++-sig] question on boost.python exception mechanisms

2013-04-29 Thread Holger Joukl
Hi, > From: "Niall Douglas" > On 17 Apr 2013 at 17:13, Holger Joukl wrote: > > > // the global per-thread exception storage > > boost::unordered_map exception_map; > > You can't assume pthread_t is of integral type. You can a thread_t > (from C11) I believe. You may not care on your supported pla

Re: [C++-sig] question on boost.python exception mechanisms

2013-04-18 Thread Holger Joukl
Before trying out Niall's wealth of suggestions, just to fix up my own erroneous example: > From: Holger Joukl > A bit of a simplified example version using Boost's partial C++11 exception > support > would then be s.th. like: > > 0 $ cat dispatch_main_exception_map.cpp > // File: dispatch_main_e

Re: [C++-sig] question on boost.python exception mechanisms

2013-04-17 Thread Niall Douglas
On 17 Apr 2013 at 17:13, Holger Joukl wrote: > // the global per-thread exception storage > boost::unordered_map exception_map; You can't assume pthread_t is of integral type. You can a thread_t (from C11) I believe. You may not care on your supported platforms though. > throw std::runtime

Re: [C++-sig] question on boost.python exception mechanisms

2013-04-17 Thread Holger Joukl
Hi, > From: "Niall Douglas" > On 10 Apr 2013 at 13:48, Holger Joukl wrote: > > > > If you don't have C++11 in your C++, Boost provides an okay partial > > > implementation of C++11 exception support. I'm currently using gcc 4.6.1 which supports the necessary features using -std=c++0x but also So

Re: [C++-sig] question on boost.python exception mechanisms

2013-04-17 Thread Holger Joukl
Hi, Giuseppe Corbelli wrote on 09.04.2013 09:09:14: > On 08/04/2013 14:11, Holger Joukl wrote: > >> I have found a couple of references. > >> http://gcc.gnu.org/onlinedocs/gcc/Link-Options.html (see static-libgcc) > >> http://gcc.gnu.org/wiki/Visibility > > > > Thanks, I'll need to look into the

Re: [C++-sig] question on boost.python exception mechanisms

2013-04-13 Thread Niall Douglas
On 10 Apr 2013 at 13:48, Holger Joukl wrote: > > If you don't have C++11 in your C++, Boost provides an okay partial > > implementation of C++11 exception support. > > I'll look into this. This would then mean instrumenting some object with a > place > to store the caught exception to re-raise up

Re: [C++-sig] question on boost.python exception mechanisms

2013-04-10 Thread Holger Joukl
Hi, "Cplusplus-sig" wrote on 09.04.2013 03:04:33: > From: "Niall Douglas" > On 8 Apr 2013 at 14:11, Holger Joukl wrote: > > > > I have found a couple of references. > > > http://gcc.gnu.org/onlinedocs/gcc/Link-Options.html (see static-libgcc) > > > http://gcc.gnu.org/wiki/Visibility > > > > Th

Re: [C++-sig] question on boost.python exception mechanisms

2013-04-09 Thread Niall Douglas
On 8 Apr 2013 at 14:11, Holger Joukl wrote: > > I have found a couple of references. > > http://gcc.gnu.org/onlinedocs/gcc/Link-Options.html (see static-libgcc) > > http://gcc.gnu.org/wiki/Visibility > > Thanks, I'll need to look into these. I wrote the second one. Really not sure how that helps

Re: [C++-sig] question on boost.python exception mechanisms

2013-04-09 Thread Giuseppe Corbelli
On 08/04/2013 14:11, Holger Joukl wrote: I have found a couple of references. http://gcc.gnu.org/onlinedocs/gcc/Link-Options.html (see static-libgcc) http://gcc.gnu.org/wiki/Visibility Thanks, I'll need to look into these. The proprietary lib is shared, right? linked to? shared? static? Sha

Re: [C++-sig] question on boost.python exception mechanisms

2013-04-08 Thread Holger Joukl
Hi, Giuseppe Corbelli wrote on 08.04.2013 11:29:10: > On 03/04/2013 10:08, Holger Joukl wrote: > > Hi Giuseppe, > > > > thanks for answering and sorry for the delayed response. Easter > > holidays :-) > > To punish you here's another late reply. ;-) > >>> However, on Linux compiled with GCC, i

Re: [C++-sig] question on boost.python exception mechanisms

2013-04-08 Thread Giuseppe Corbelli
On 03/04/2013 10:08, Holger Joukl wrote: Hi Giuseppe, thanks for answering and sorry for the delayed response. Easter holidays :-) To punish you here's another late reply. Giuseppe Corbelli wrote on 28.03.2013 09:37:39: On 26/03/2013 18:51, Holger Joukl wrote: Hi, I'm wrapping a C++ li

Re: [C++-sig] question on boost.python exception mechanisms

2013-04-03 Thread Holger Joukl
Hi Giuseppe, thanks for answering and sorry for the delayed response. Easter holidays :-) Giuseppe Corbelli wrote on 28.03.2013 09:37:39: > On 26/03/2013 18:51, Holger Joukl wrote: > > > > Hi, > > > > I'm wrapping a C++ library that's actually just a thin wrapper around a C > > lib. > > > > Thr

Re: [C++-sig] question on boost.python exception mechanisms

2013-03-28 Thread Giuseppe Corbelli
On 26/03/2013 18:51, Holger Joukl wrote: Hi, I'm wrapping a C++ library that's actually just a thin wrapper around a C lib. Through a dispatch() method of a Dispatcher class there's an invocation of callbacks which get implemented on the Python side, by subclassing callback classes exposed thr

[C++-sig] question on boost.python exception mechanisms

2013-03-26 Thread Holger Joukl
Hi, I'm wrapping a C++ library that's actually just a thin wrapper around a C lib. Through a dispatch() method of a Dispatcher class there's an invocation of callbacks which get implemented on the Python side, by subclassing callback classes exposed through Boost.Python. Now, for performing the