Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

Re: Anyone want to help make zsh/db/gdbm work?

On Fri, 30 Jan 2015 12:03:04 -0800
Bart Schaefer <schaefer@xxxxxxxxxxxxxxxx> wrote:
> If you're actually going to look up the parameter first, you should also
> delay the gdbm_open() until you've verified the parameter.

There's another point here that if unsetting the old parameter happens
to untie an existing database, possibly even the same one, it needs to
be done before the new open.

>} However, this makes me wonder whether it's correct for zuntie to unset
>} the parameter.  Maybe an explicit zuntie should just convert the param
>} into an ordinary hash, closing the database file from under it?  (This
>} I have not implemented yet.)
> I looked at this, but decided that it is impractical because the ztie'd
> parameter reads and writes everything directly from/to the file rather
> than caching any of the values in an internal hashtable.

I don't think there's anything wrong with the current behaviour, anyway.


Peter Stephenson | Principal Engineer Samsung Cambridge Solution Centre
Email: p.stephenson@xxxxxxxxxxx | Phone: +44 1223 434724 |

Messages sorted by: Reverse Date, Date, Thread, Author