Re: Generated -skels.cc file needs an explicit cast



Marc Siegel wrote:

Hi,

The generated xxx-skels.cc file is missing an explicit cast in the call to ORBit_skel_class_register(), as detailed below:

-------------------
--> IDL snippet <--
-------------------
module Ucb {
    interface Server
    {
    }
}

----------------------------
--> ucb-skels.cc snipped <--
----------------------------
void
POA_Ucb_Server__init(PortableServer_Servant servant, CORBA_Environment * env)
{
   static PortableServer_ClassInfo class_info =
      { NULL, (ORBit_small_impl_finder) & get_skel_small_Ucb_Server,
"IDL:Ucb/Server:1.0", &Ucb_Server__classid, NULL, &Ucb_Server__iinterface }; PortableServer_ServantBase__init(((PortableServer_ServantBase *) servant),
                    env);
   ORBit_skel_class_register(&class_info, servant, POA_Ucb_Server__fini,
                 ORBIT_VEPV_OFFSET(POA_Ucb_Server__vepv,
                           Ucb_Server_epv),
                 (CORBA_unsigned_long) 0);
}



I think the needed fix is the 2nd parameter of ORBit_skel_class_register needs an explicit cast to (PortableServer_ServantBase *) as in the above call.

Hi Marc,

It is safest if you leave the leave the .c files as they are and compile them with a C compiler rather than change the extension and compile them with a C++ compiler. There are just enough subtle differences between C and C++ that there is no guarantee that the .c files are going to compile with C++. Besides the C compiler should be able to smaller, possibly more efficient machine code (no exceptions, no RTTI, and so on).

--
Bowie Owens

CSIRO Mathematical & Information Sciences
phone  : +61 3 9545 8055
fax    : +61 3 9545 8080
mobile : 0425 729 875
email  : Bowie Owens csiro au





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