view close.cpp @ 434:7af140bf8a0a api-inversion

adb_t-ize most of audioDB::set_up_db. All of this "adding code" nonsense (mostly because of the conversion from C++ non-local exits using audioDB::error into lame C "must return and check integer error code") has to have a payoff sometime. That day will come. That day will come.
author mas01cr
date Wed, 24 Dec 2008 10:55:52 +0000
parents 62a0515f59be
children 16c5c51a4c32
line wrap: on
line source
#include "audioDB.h"
extern "C" {
#include "audioDB_API.h"
#include "audioDB-internals.h"
}

void audiodb_close(adb_t *adb) {
  free(adb->path);
  free(adb->header);
  delete adb->keys;
  delete adb->track_lengths;
  close(adb->fd);
  free(adb);
}