11.08.2014 10:49, Molnár Attila wrote: > #1 : API call creates object and returned to host > - in this case object has to be readonly (at least buffer like fields)^1 > - host has to support reference counting^2 > > #2 : API call parameterised by a host created object > - see #1 > > 1 : can't write because in that case data contained by the object could be > allocated by > different memory managers
Transferring data by value for integer types and copying data from strings to internal buffers is enough. > 2 : Must have all mayor language/compilers support ref.count and has to be > the same Reference counting is just a matter of calling obj->addRef and obj->Release. Every language that can call object's method is ok. Some languages (like Delphi) do it automagically when interface variable is dying, in others you have to call these methods by hand. That's all. > With this restrictions what gain do you have with OO/Interface API over C > style API? Remember, that new API wasn't designed as a public API. It was supposed to be a new interface between Y-valve and providers, nothing more. ISC API in this place would add too much overhead or require significant changes in engine code. -- WBR, SD. ------------------------------------------------------------------------------ Firebird-Devel mailing list, web interface at https://lists.sourceforge.net/lists/listinfo/firebird-devel