Re: ORBit2 and const char *



Hi Darin,

On Fri, 27 Jul 2001, Darin Adler wrote:
> I recently took a look at the CORBA C mapping documentation. I noticed
> that it requires use of "char *" for string, not "const char *".

	Hmm, the CORBA C mapping spec is old and stale. I would hope to
see a better approach to this in the new spec.

>      module MyModule {
>          typedef string MyString;
>          interface MyInterface {
>              void MyFunction(in MyString);
>          }
>      }
>
> And it also doesn't do the casting correctly when creating the calls
> to _impl_copy in the skels, so you get warnings at compile time from
> gcc.  What should we do about this? Here are some possible
> "solutions":

	_impl_copy ? surely we can fix it by doing:

	*(const MyString *) = _args [n];

	instead ?

>      2) abandon use of const char * in ORBit2 to comply with the OMG spec.

	This would loose us a lot of useful protection.

>      3) avoid typedefs for string types in IDLs

	This sucks too :-)

>      4) change the casting to get rid of the warnings when compiling skels

	This makes more sense - do you have time to look into it ? we just
need to get the skel's arg munging and the prototype code to agree on the
types I would imagine. The headers, and skel prototype look correct to me.

	Regards,

		Michael.

-- 
 mmeeks@gnu.org  <><, Pseudo Engineer, itinerant idiot





[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]