Re: Corba_string object
- From: Jan Kratochvil <rcpt-orbit-list AT gnome org jankratochvil net>
- To: some one <solrak29 yahoo com>
- Cc: orbit-list gnome org
- Subject: Re: Corba_string object
- Date: Fri, 14 Nov 2003 18:05:23 +0100
Hi,
On Fri, 14 Nov 2003 17:59:42 +0100, some one wrote:
...
> struct employee
> {
> CORBA_string name;
> }
>
> Can I just do this?
>
> struct employee thisemployee;
> thisemployee.name = "someone";
Only as long as you do not permit any CORBA/ORBit to free it.
Otherwise / the more correct way is to use:
/usr/include/orbit-2.0/orbit/orb-core/corba-string.h:
CORBA_char *CORBA_string_dup (const CORBA_char *str);
or
CORBA_char *CORBA_string_alloc (CORBA_unsigned_long len);
therefore
thisemployee.name = CORBA_string_dup ("someone");
Regards,
Lace
--
Jan Kratochvil; Captive: free r/w NTFS Filesystem; http://www.jankratochvil.net/
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]