mirror of
https://github.com/mdbtools/mdbtools.git
synced 2026-03-10 00:20:54 +08:00
Move statistics functions to stats.c
This commit is contained in:
@@ -48,19 +48,3 @@ void mdb_exit()
|
||||
{
|
||||
mdb_remove_backends();
|
||||
}
|
||||
|
||||
/* private function */
|
||||
MdbStatistics *mdb_alloc_stats(MdbHandle *mdb)
|
||||
{
|
||||
mdb->stats = g_malloc0(sizeof(MdbStatistics));
|
||||
return mdb->stats;
|
||||
/* private function */
|
||||
}
|
||||
/* private function */
|
||||
void
|
||||
mdb_free_stats(MdbHandle *mdb)
|
||||
{
|
||||
if (!mdb->stats) return;
|
||||
g_free(mdb->stats);
|
||||
mdb->stats = NULL;
|
||||
}
|
||||
|
||||
@@ -23,6 +23,20 @@
|
||||
#include "dmalloc.h"
|
||||
#endif
|
||||
|
||||
/* private function */
|
||||
MdbStatistics *mdb_alloc_stats(MdbHandle *mdb)
|
||||
{
|
||||
mdb->stats = g_malloc0(sizeof(MdbStatistics));
|
||||
return mdb->stats;
|
||||
}
|
||||
/* private function */
|
||||
void mdb_free_stats(MdbHandle *mdb)
|
||||
{
|
||||
if (!mdb->stats) return;
|
||||
g_free(mdb->stats);
|
||||
mdb->stats = NULL;
|
||||
}
|
||||
|
||||
/**
|
||||
* mdb_stats_on:
|
||||
* @mdb: Handle to the (open) MDB file to collect stats on.
|
||||
|
||||
Reference in New Issue
Block a user