[omniORB] CORBA::String_var and CORBA::string_alloc (again!)
Bruce Visscher
visschb@rjrt.com
Thu, 20 Jul 2000 19:15:32 -0400
I hate to bring this up again, but...
>From the src/lib/omniORB2(!) directory of an omniORB 3 directory (hope
you can translate the VMSese):
search [...]*.cc string_alloc,string_var/match=and
******************************
OMNI3ROOT:[SRC.LIB.OMNIORB2.DYNAMIC]REQUEST.CC;1
CORBA::String_var repoId(CORBA::string_alloc(repoIdLen -
1));
******************************
OMNI3ROOT:[SRC.LIB.OMNIORB2.ORBCORE]CORBAORB.CC;1
CORBA::String_var id = CORBA::string_alloc(slen);
CORBA::String_var uri = CORBA::string_alloc(slen);
******************************
OMNI3ROOT:[SRC.LIB.OMNIORB2.ORBCORE]INITFILE.CC;1
CORBA::String_var id = CORBA::string_alloc(slen);
CORBA::String_var uri = CORBA::string_alloc(slen);
The first occurence is correct. The others are wrong for reasons that
I've beaten to death in the past. Note that I haven't yet experienced
problems, but unless something has changed that I'm not aware of, this
won't work. The reason is that the CORBA::String_var type does not have
reasonable copy semantics.
Sorry for not catching this sooner. It's been a while since I checked
this.
Bruce
(!) Why was src/lib/omniORB2 never renamed to omniORB3?
--
Bruce Visscher visschb@rjrt.com