[ZOOM] Value Returned from Set Option (Was: Catching up)
adam at indexdata.dk
Thu Nov 15 12:52:59 CET 2001
On Thu, Nov 15, 2001 at 09:59:57AM +0000, Mike Taylor wrote:
> > Date: Wed, 14 Nov 2001 23:35:03 +0100
> > From: "Jacob Chr. Poulsen" <ja7 at dbc.dk>
> Adam, what does your code do? No, hang on <rummage, rummage>. OK, by
> inspection, Adam's C binding has:
> Z3950_options_set() stores a _copy_ of the option value passed
> in, and returns nothing -- which I think is the solution we're
> converging on for the C++ binding too?
> const char *Z3950_options_get() returns a reference to the
> option-clump's own copy of the value -- which is therefore
> valid until the option-clump is deleted. Again, I think this
> is what we're converging on for C++.
That's how I did it for the underlying Options layer which is
somewhat outside the scope of ZOOM.
For the connections and result-sets I used the form as of the
abstract API. And that is both wrong in my implementation
and we don't seem to want it (return previous value that is).
C doesn't do overloading so making functions set/get for
options makes sense. If I don't hear anybody shout that's
what I'll do, before next YAZ release.
Other than that I've made Z3950_record_dup (should it be called
close?). And, the result set methods returns record refernces
that are volatile and "owned" by the result set (and should be
copied using dup/clone to release that ownership).
Other than that I'm ready to make a new YAZ release again.
I've written more about how ZOOM C maps to the protocol
in the YAZ manual at http://www.indexdata.dk/yaz/doc/zoom.php
More information about the ZOOM