<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=Content-Type content="text/html; charset=iso-8859-1">
<STYLE type=text/css>DIV {
MARGIN: 0px
}
</STYLE>
<META content="MSHTML 6.00.6000.16762" name=GENERATOR></HEAD>
<BODY bgColor=#ffffff>
<DIV><FONT face=Arial size=2>FWIW, it seems I can't reproduce the problem with
current boost svn trunk code, the problem still existed in boost_1_37_0 though.
I could not spot the changes made that fixed the problem.</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2>I took a look at the shared_ptr aliasing
constructor, and made a patch to my boost_1_37_0 that solves the problem without
altering shared_ptr code. All boost.python tests still pass after that. It may
be useful to someone (the test case from Chad is attached)</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2>---
python_1_37\converter\shared_ptr_from_python.hpp 2008-12-12
15:49:04.156250000 +0100<BR>+++ python\converter\shared_ptr_from_python.hpp
2008-12-12 14:24:24.781250000 +0100<BR>@@ -45,10 +45,14
@@<BR> if (data->convertible
==
source)<BR>
new (storage)
shared_ptr<T>();<BR>
else<BR>+
{<BR>+
boost::shared_ptr<void> hold_convertible_ref_count( (void*)0,
shared_ptr_deleter(handle<>(borrowed(source)))
);<BR>+ // use
aliasing
constructor<BR>
new (storage)
shared_ptr<T>(<BR>-
static_cast<T*>(data->convertible),<BR>-
shared_ptr_deleter(handle<>(borrowed(source)))<BR>+
hold_convertible_ref_count,<BR>+
static_cast<T*>(data->convertible)<BR>
);<BR>+ }</FONT></DIV>
<DIV> </DIV>
<DIV><FONT face=Arial size=2>
data->convertible = storage;<BR> }</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2>---</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2>to include the test in python test pass
:</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2>Index:
libs/python/test/Jamfile.v2<BR>===================================================================<BR>---
libs/python/test/Jamfile.v2 (revision 72)<BR>+++ libs/python/test/Jamfile.v2
(working copy)<BR>@@ -75,6 +75,7 @@<BR> [ bpl-test return_arg ]<BR> [
bpl-test staticmethod ]<BR> [ bpl-test shared_ptr ]<BR>+[ bpl-test
enable_shared_from_this ]<BR> [ bpl-test andreas_beyer ]<BR> [
bpl-test polymorphism ]<BR> [ bpl-test polymorphism2 ]</FONT></DIV>
<DIV> </DIV></BODY></HTML>