Skip to content

Instantly share code, notes, and snippets.

@blackball
Created November 8, 2011 05:17
Show Gist options
  • Save blackball/1347069 to your computer and use it in GitHub Desktop.
Save blackball/1347069 to your computer and use it in GitHub Desktop.
demo codes to test Gist
// hooks for future customizing
typedef int (db_log_fnc)(const char *fmt, ... );
typedef void* (db_malloc_fnc)(size_t sz);
typedef void* (db_realloc_fnc)(void *ptr, size_t sz);
typedef void (db_free_fnc)(void *ptr);
typedef void (db_exit_fnc)(int status);
struct _db_hook
{
db_log_fnc *log;
db_malloc_fnc *malloc;
db_realloc_fnc *realloc;
db_free_fnc *free;
db_exit_fnc *exit;
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment