diff options
Diffstat (limited to 'TAO/tao')
-rw-r--r-- | TAO/tao/DynamicAny/DynamicAny.pidl | 2 | ||||
-rw-r--r-- | TAO/tao/DynamicAny/DynamicAnyC.cpp | 18 | ||||
-rw-r--r-- | TAO/tao/Sequence_T.cpp | 48 |
3 files changed, 27 insertions, 41 deletions
diff --git a/TAO/tao/DynamicAny/DynamicAny.pidl b/TAO/tao/DynamicAny/DynamicAny.pidl index 09dc9b8e59c..44efe91babb 100644 --- a/TAO/tao/DynamicAny/DynamicAny.pidl +++ b/TAO/tao/DynamicAny/DynamicAny.pidl @@ -20,7 +20,7 @@ * The command used to generate code from this file is: * * tao_idl \ - * -o orig -Gp -Gd -Ge 1 \ + * -o orig -Gp -Gd -Ge 1 -Sa -St \ * -Wb,export_macro=TAO_DynamicAny_Export \ * -Wb,export_include=dynamicany_export.h \ * -Wb,pre_include="ace/pre.h" \ diff --git a/TAO/tao/DynamicAny/DynamicAnyC.cpp b/TAO/tao/DynamicAny/DynamicAnyC.cpp index 5f804c0f95e..2a0730f5778 100644 --- a/TAO/tao/DynamicAny/DynamicAnyC.cpp +++ b/TAO/tao/DynamicAny/DynamicAnyC.cpp @@ -1467,7 +1467,25 @@ DynamicAny::DynAnySeq::DynAnySeq (const DynAnySeq &seq) DynamicAny::DynAnySeq::~DynAnySeq (void) {} +#if defined (ACE_HAS_EXPLICIT_TEMPLATE_INSTANTIATION) + +template class + TAO_Object_Manager< + DynamicAny::DynAny, + DynamicAny::DynAny_var, + DynamicAny::tao_DynAny_life + >; + +#elif defined (ACE_HAS_TEMPLATE_INSTANTIATION_PRAGMA) +# pragma instantiate \ + TAO_Object_Manager< \ + DynamicAny::DynAny, \ + DynamicAny::DynAny_var, \ + DynamicAny::tao_DynAny_life \ + > + +#endif /* !ACE_HAS_EXPLICIT_TEMPLATE_INSTANTIATION */ #if defined (ACE_HAS_EXPLICIT_TEMPLATE_INSTANTIATION) diff --git a/TAO/tao/Sequence_T.cpp b/TAO/tao/Sequence_T.cpp index 2c7bbb97fce..a78e7aa8e10 100644 --- a/TAO/tao/Sequence_T.cpp +++ b/TAO/tao/Sequence_T.cpp @@ -636,23 +636,11 @@ TAO_Abstract_Manager<T,T_var,T_life>::operator= ( if (this->release_) { - if (*this->ptr_ != 0) - { - (*this->ptr_)->_remove_ref (); - } - - *this->ptr_ = *rhs.ptr_; - - if (*this->ptr_ != 0) - { - (*this->ptr_)->_add_ref (); - } - } - else - { - *this->ptr_ = *rhs.ptr_; + T_life::tao_release (*this->ptr_); + T_life::tao_duplicate (*rhs->ptr_); } + *this->ptr_ = *rhs.ptr_; return *this; } @@ -666,18 +654,10 @@ TAO_Abstract_Manager<T,T_var,T_life>::operator= (T * p) // that of a var variable. Therefore we will not duplicate the // user provided pointer before assigning it to the internal // variable. - if (*this->ptr_ != 0) - { - (*this->ptr_)->_remove_ref (); - } - - *this->ptr_ = p; - } - else - { - *this->ptr_ = p; + T_life::tao_release (*this->ptr_); } + *this->ptr_ = p; return *this; } @@ -691,23 +671,11 @@ TAO_Abstract_Manager<T,T_var,T_life>::operator= (const T_var & p) // that of a var variable. Therefore we duplicate p's // pointer before assigning it to the internal // variable. - if (*this->ptr_ != 0) - { - (*this->ptr_)->_remove_ref (); - } - - *this->ptr_ = p.in (); - - if (p != 0) - { - p->_add_ref (); - } - } - else - { - *this->ptr_ = p.in (); + T_life::tao_release (*this->ptr_); + T_life::tao_duplicate (p.in ()); } + *this->ptr_ = p.in (); return *this; } |