[omniORB] omniORB3 string_member mapping for structured types.

David Riddoch djr@uk.research.att.com
Thu, 27 Jan 2000 16:34:18 +0000 (GMT)



Done (2.8 and 3pre).  Should be available via CVS from tomorrow...

David


On 26 Jan 2000, Sai-Lai Lo wrote:

> Thanks for pointing out this change in the 2.3 mapping.
> 
> This is a change in CORBA 2.3 mapping. Prior to 2.3, the mapping is to
> initialise the string member to NULL, which is what omniORB has been doing
> all along. Somehow this change does not have the change bar attached to the
> text so it has been overlooked.
> 
> I suggest you not to rely on this behaviour. Instead, always initialise the
> member yourself. It seems to me this change is inconsistent with the rest
> of the string mapping. For instance, the string pointer managed by a
> String_var is initialised to a NULL pointer. The mapping of a string is a
> char* which obviously is not initialised to anything. To avoid confusion, I
> think it is better to initialise a string member of a struct, union or
> sequence explicitly.
> 
> The ORB already checks if a string member is a NULL pointer when it
> marshals a struct. If it is, the ORB marshals an empty string. But again,
> don't rely on this behaviour if you want your code to be fully portable.
> 
> We'll update the string member to initialise to an empty string (""). I'll
> probably initialise it to point to a statically allocated empty string so
> as to avoid heap allocating an empty string everytime.