Unfortunate repercussion of libbonobo's BonoboObject epv strategy



The BonoboObject in the new libbonobo requires that the epv for the class be
embedded in the class structure. This is unfortunate, because it means that
the size of the epv will now be hardcoded into the class's subclassing
interface. Before this change, C subclasses of BonoboObject could create an
abstraction that would help if the underlying CORBA class changed.

Specifically, if you were implementing a NautilusView in C, you were immune
to changes in the CORBA NautilusView API. All your calls to and from CORBA
went through libnautilus and the details of the CORBA API (number of calls,
parameters, and such) didn't show through in the C interface at all.

If bonobo_type_unique took a pointer to the epv rather than an offset within
the BonoboObject, we would still have the abstraction. The epv could be
declared as a global object -- no need to allocate memory or initialize it
-- just declare it with all the function pointers pre-initialized in there.

Anyway, I figure I probably noticed this too late -- after API freeze -- and
you probably love the way you did it, even after hearing my concern. But I
figured I ought to mention it rather than just staying quiet and cursing my
keyboard.

Sorry I didn't notice this earlier, in the BonoboXObject days.

    -- Darin




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