2
0
mirror of https://github.com/boostorg/python.git synced 2026-01-21 17:12:22 +00:00

fixed reference counting bug

[SVN r7973]
This commit is contained in:
Ullrich Köthe
2000-10-17 18:59:41 +00:00
parent 3f0eb18183
commit ab5f450e45
2 changed files with 3 additions and 2 deletions

View File

@@ -397,7 +397,7 @@ class ExtensionClass
{
BaseClassInfo baseInfo(base, &ConversionFunction<S, T>::downcast_ptr);
ClassRegistry<T>::register_base_class(baseInfo);
add_base(Ptr(as_object(base)));
add_base(Ptr(as_object(base), Ptr::new_ref));
SubClassInfo subInfo(this, &ConversionFunction<T, S>::upcast_ptr);
ClassRegistry<S>::register_sub_class(subInfo);
@@ -410,7 +410,7 @@ class ExtensionClass
{
BaseClassInfo baseInfo(base, 0);
ClassRegistry<T>::register_base_class(baseInfo);
add_base(Ptr(as_object(base)));
add_base(Ptr(as_object(base), Ptr::new_ref));
SubClassInfo subInfo(this, &ConversionFunction<T, S>::upcast_ptr);
ClassRegistry<S>::register_sub_class(subInfo);

View File

@@ -363,6 +363,7 @@ static int getX(OverloadTest * u)
return u->x();
}
/************************************************************/
/* */
/* classes to test base declarations and conversions */