[omniORB] strange omniidl c++ result

Rene Jager renej_frog at users.sourceforge.net
Fri Jul 23 18:36:54 BST 2004


On Fri, 2004-07-23 at 17:12, Duncan Grisby wrote:
> On Friday 9 July, Rene Jager wrote:
> 
> > module Test
> > {
> >     typedef double Array[3];
> > };
> >  
> > module Test2
> > {
> >     typedef Test::Array Array2;
> > };
> 
> [...]
> >   static Array2_slice* Array2_alloc() { return Test::Array_alloc(); }
> >   static Array2_slice* Array2_dup(const Array2_slice* p) { return Test::Array_dup(p); }
> >   static void Array2_copy( Array2_slice* _to, const Array2_slice* _from ) { Test::Array_copy(_to, _from); }
> >   static void Array2_free( Array2_slice* p) { Test::Array_free(p); }
> >
> > "static" should be "inline" IMHO
> 
> You're right, that code is strange. It's not as simple as static
> should be inline, though.

but "static inline" would, right?

>  If the array is defined inside an interface,
> the functions are defined in a C++ class, so they really do need to be
> static. Similarly, omniORB still supports archaic compilers that have
> no namespace support, meaning IDL modules are mapped to C++ classes,
> again requiring the static.

so "static inline" would always work then?

>  There are already omniORB macros to deal
> with this stuff, so I've updated omniidl to output code that uses
> them.

ok, thanx
> 
> Thanks for reporting the issue.
> 
> Cheers,
> 
> Duncan.
-- 




More information about the omniORB-list mailing list