diff -r -u pycxx_5_3_0.orig/CXX/Extensions.hxx pycxx_5_3_0/CXX/Extensions.hxx --- pycxx_5_3_0.orig/CXX/Extensions.hxx Thu Nov 27 08:05:34 2003 +++ pycxx_5_3_0/CXX/Extensions.hxx Wed Jan 12 16:04:30 2005 @@ -37,6 +37,7 @@ virtual ~ExtensionExceptionType(); // call init to create the type + void init( ExtensionModuleBase &module, const std::string& name, ExtensionExceptionType &parent ); void init( ExtensionModuleBase &module, const std::string& name ); }; Only in pycxx_5_3_0.orig/Demo: pycxxdemo.ps diff -r -u pycxx_5_3_0.orig/Src/cxx_extensions.cxx pycxx_5_3_0/Src/cxx_extensions.cxx --- pycxx_5_3_0.orig/Src/cxx_extensions.cxx Wed Jan 12 15:23:28 2005 +++ pycxx_5_3_0/Src/cxx_extensions.cxx Wed Jan 12 16:04:18 2005 @@ -1259,13 +1259,24 @@ { } -void ExtensionExceptionType::init( ExtensionModuleBase &module, const std::string& name ) +void ExtensionExceptionType::init( ExtensionModuleBase &module, const std::string& name, ExtensionExceptionType &parent) { std::string module_name( module.fullName() ); module_name += "."; module_name += name; + set( PyErr_NewException( const_cast( module_name.c_str() ), parent.ptr(), NULL ), true ); + Py_INCREF(this->ptr()); + PyModule_AddObject((module.module()).ptr(), const_cast(name.c_str()), this->ptr()); + } +void ExtensionExceptionType::init( ExtensionModuleBase &module, const std::string& name ) + { + std::string module_name( module.fullName() ); + module_name += "."; + module_name += name; set( PyErr_NewException( const_cast( module_name.c_str() ), NULL, NULL ), true ); + Py_INCREF(this->ptr()); + PyModule_AddObject((module.module()).ptr(), const_cast(name.c_str()), this->ptr()); } ExtensionExceptionType::~ExtensionExceptionType()