summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLars Wirzenius <liw@liw.fi>2010-10-20 20:34:57 +0100
committerLars Wirzenius <liw@liw.fi>2010-10-20 20:34:57 +0100
commitbb7232044cfc09a51b899ab73d9df6d076d130fc (patch)
treebe59d6c3ff62e0bc4038e292e555d23e5d59d260
parent606314cb4919e3931036b09ed18f7fe936c26e42 (diff)
downloaddynstr-bb7232044cfc09a51b899ab73d9df6d076d130fc.tar.gz
Implement the default error handler for malloc.
-rw-r--r--dynstr.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/dynstr.c b/dynstr.c
index 51955c2..41cb6ef 100644
--- a/dynstr.c
+++ b/dynstr.c
@@ -15,9 +15,12 @@ struct Dynstr {
};
+static dynstr_error_handler *error_handler = dynstr_malloc_error_indicate;
+
+
dynstr_error_handler *dynstr_get_malloc_error_handler(void)
{
- return NULL;
+ return error_handler;
}
void dynstr_malloc_error_indicate(int error, size_t size, void *oldptr)