[Python-Dev] Problems with Python's default dlopen flags
Gordon McMillan
gmcm@hypernet.com
Mon, 6 May 2002 10:10:39 -0400
On 5 May 2002 at 18:46, David Abrahams wrote:
[C++ exceptions and gcc 2.95(?)]
> Are you saying that the following prints "fail"?
>
> #include <iostream>
>
> void init_mymodule()
> {
> try {
> throw "hello";
> }
> catch( char const*) {}
> catch(...) {
> std::cout << "fail";
> }
> }
>
> but that this does not?
>
> #include <iostream>
> void throw_hi() { throw "hello"; }
> void init_mymodule()
> {
> try {
> throw_hi();
> }
> catch( char const*) {}
> catch(...) {
> std::cout << "fail";
> }
> }
Yes, if you change "hello" to a non-primitive
type (and Python is not linked by g++).
-- Gordon
http://www.mcmillan-inc.com/