Hi! To not check class version in each method call, cloop-based interfaces implement class-upgrade at return and argument passing.
If everything is simple, it (the mechanics) works. But not everything is simple. We have structs (Dtc::start - with DtcStart) with interfaces and pointers to classes (DbCryptPlugin::setKey), where a number of elements may be passed. It's not impossible, but I feel as a great level of complication to add to cloop things like IN/OUT parameters and instruction of how to decode length of buffers. And later we'll add another set of complication to deal. Also, I really don't believe that class-upgrade are going to work. There are various problems, like who allocate/deallocate memory for vtables, how to call a standard upgrade function (must be in IMaster/IUtl), but it's not always accessible (you can't just call fb_get_master, multiple client library may be dynamically loaded). I propose something different. Methods appeared in the first version of an interface must never be checked, as they will be always there. Methods added later are generally not "core-methods" and not very performance sensitive. I propose we check they versions (it's an if) when calling them. If you feel necessary, we can fill vtables with doNotImplemented method for 5 or so more methods than the initial method count of the first version, so the next 5 methods added in subsequent versions will not need the if-check and may be called directly. Adriano ------------------------------------------------------------------------------ Firebird-Devel mailing list, web interface at https://lists.sourceforge.net/lists/listinfo/firebird-devel