diff options
author | parsons <parsons@ae88bc3d-4319-0410-8dbf-d08b4c9d3795> | 1999-01-30 02:15:33 +0000 |
---|---|---|
committer | parsons <parsons@ae88bc3d-4319-0410-8dbf-d08b4c9d3795> | 1999-01-30 02:15:33 +0000 |
commit | 384fa09383fb11345982c28c40b855ea1e87fe79 (patch) | |
tree | 0a01b83634b988a74b4d96a5ca217340183a332d /TAO/tao/NVList.cpp | |
parent | 2f8ce7359d91b891b3d73e11de5e57a64ca95bc4 (diff) | |
download | ATCD-384fa09383fb11345982c28c40b855ea1e87fe79.tar.gz |
*** empty log message ***
Diffstat (limited to 'TAO/tao/NVList.cpp')
-rw-r--r-- | TAO/tao/NVList.cpp | 21 |
1 files changed, 6 insertions, 15 deletions
diff --git a/TAO/tao/NVList.cpp b/TAO/tao/NVList.cpp index fb7b8b40fb6..673f070fd56 100644 --- a/TAO/tao/NVList.cpp +++ b/TAO/tao/NVList.cpp @@ -123,21 +123,12 @@ CORBA_NVList::add_value (const char *name, { // now initialize the fields nv->name_ = CORBA::string_dup (name); - if (ACE_BIT_ENABLED (flags, CORBA::IN_COPY_VALUE)) - // IN_COPY_VALUE means that the parameter is not "borrowed" by - // the ORB, but rather that the ORB copies its value. - // - // Initialize the newly allocated memory using a copy - // constructor that places the new "Any" value at just the - // right place, and makes a "deep copy" of the data. - nv->any_ = value; - else - { - // The normal behavior for parameters is that the ORB - // "borrows" their memory for the duration of calls. - CORBA::TypeCode_var type = value.type (); - nv->any_.replace (type.in (), value.value_, 0, env); - } + nv->any_ = value; + // We ignore the CORBA::IN_COPY_VALUE flag here because + // the value (void*) of the Any may be 0, in which case + // the ORB must copy the value anyway. Calling replace() + // with a 0 void* will cause a crash when replace() tries + // to encode the null pointer into a CDR stream. return nv; } |