/** * call-seq: * close( db ) * * Closes the given opaque database handle. The handle _must_ be one that was * returned by a call to #open. */ static VALUE static_api_close( VALUE module, VALUE db ) { sqlite *handle; /* FIXME: should this be executed atomically? */ GetDB( handle, db ); sqlite_close( handle ); /* don't need to free the handle anymore */ RDATA(db)->dfree = NULL; RDATA(db)->data = NULL; return Qnil; }