[svn.haxx.se] · SVN Dev · SVN Users · SVN Org · TSVN Dev · TSVN Users · Subclipse Dev · Subclipse Users · this month's index

Re: SQLite and callbacks

From: C. Michael Pilato <cmpilato_at_collab.net>
Date: Thu, 13 Jan 2011 10:17:04 -0500

On 01/13/2011 10:10 AM, Stefan Sperling wrote:
> If we decide that the new approach violates our backwards compat rules,
> we'd have to provide a separate implementation to continue supporting
> semantics of old APIs.

Ah, okay. This is precise what I did in BDB recently with the
svn_fs_get_locks() API. It's callback-ish, and the callbacks were being
driven from way deep in the our BDB table cursor-crawling code. To make the
API usable to third-parties (who almost *always* want to do something FS-ish
with the lock information they get), I now -- just inside the API, squirrel
the lock information from the BDB layer away to a tempfile, then read the
tempfile back to drive the public callback system. It's not lovely, it's
not fast, but it saves API consumers from having to essentially do the same
thing anyway.

C. Michael Pilato <cmpilato_at_collab.net>
CollabNet   <>   www.collab.net   <>   Distributed Development On Demand

Received on 2011-01-13 16:17:39 CET

This is an archived mail posted to the Subversion Dev mailing list.