[C++-sig] seg fault on IRIX

Stefan Seefeld seefeld at sympatico.ca
Fri Oct 11 20:41:47 CEST 2002


Stefan Seefeld wrote:

> Bar *Foo_GetBar(Foo &foo)
> {
>    return foo.getBar();
> }
> 
> ...
> 
> python::class_<Foo, boost::noncopyable> foo("Foo", python::no_init);
> foo.def("getBar", Foo_GetBar, python::return_internal_reference<>());

could anybody please confirm that the above generates a segmentation 
fault when compiled and run on IRIX/mipspro ?

When I replace the return_internal_reference with

python::return_value_policy<python::manage_new_object>()

it doesn't crash any more (but it would ultimately crash whenever python 
happens to free the bar wrapper...)

Thanks,
		Stefan





More information about the Cplusplus-sig mailing list