Re: Non-abstract interface methods



On Sat, Aug 4, 2018 at 12:23 PM Tony Houghton <h realh co uk> wrote:
In C it seems possible to define a GInterface with default method implementations (by setting the function pointer slots in the interface's default_init function). In C you can even have public functions that look like a method but don't have a virtual function slot.

The first case is supported in recent versions of Java etc, but the latter would only be possible with a static method and explicit use of "this".

Should I assume that both of these cases are unsupported in gi and likely to break if I try to bind the API to a higher level language?

They are supported in GI, although not all languages implement all the capabilities of GI. I'm pretty sure it's supported in JS and Python.

Regards,
Philip C


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