Help with C externals

Paul D. DeRocco pderocco at
Thu Mar 8 02:04:18 EST 2012

> From: Pete
> I'm seriously considering trying to use the C API for sqlite 
> databases instead of the rev db functions.  I'm finding too 
> many little inconsistencies and inefficiencies in the rev routines.
> The problem is I know nothing about using external libraries 
> with LC or the sqlite C API.  I'm hoping there's someone out 
> there who can at least tell me if this is feasible.  Check 
> out for documentation 
> of the C APIs for sqlite

My experience with externals is that it is just a load of busywork to write
an interface layer that calls external functions. The difficulty arises when
you need to deal with callbacks, and I assume SQLite uses some mechanism
like this for reporting progress or timeouts, or allowing long operations to
be aborted. So that's what you should investigate first, to decide whether
you can do everything you need with an external.

In the past, I've dealt with the issue of callbacks from asynchronous events
by having those callbacks record their state in a variable or fifo, and then
use timer messages to poll the variable or fifo at a rate sufficient to the
application. But that doesn't deal with callbacks that occur during the time
when a function called by your code is in progress, since you're not
handling timer messages during that time.


Ciao,               Paul D. DeRocco
Paul                mailto:pderocco at 

More information about the Use-livecode mailing list