[omniORB] strange omniidl c++ result

Duncan Grisby duncan at grisby.org
Fri Jul 23 17:12:43 BST 2004


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. 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. There are already omniORB macros to deal
with this stuff, so I've updated omniidl to output code that uses
them.

Thanks for reporting the issue.

Cheers,

Duncan.

-- 
 -- Duncan Grisby         --
  -- duncan at grisby.org     --
   -- http://www.grisby.org --



More information about the omniORB-list mailing list