From 7c3e35e586771fcdd0ebfe59f67f7dbc68ef8226 Mon Sep 17 00:00:00 2001 From: Daniel Silverstone Date: Sat, 14 Feb 2009 11:54:37 +0000 Subject: Drop css_error_handler and rename css_alloc to css_allocator_fn svn path=/trunk/libcss/; revision=6482 --- include/libcss/computed.h | 4 ++-- include/libcss/functypes.h | 8 +------- include/libcss/libcss.h | 6 ++++-- include/libcss/select.h | 2 +- include/libcss/stylesheet.h | 2 +- 5 files changed, 9 insertions(+), 13 deletions(-) (limited to 'include/libcss') diff --git a/include/libcss/computed.h b/include/libcss/computed.h index dec468a..9c3e2b2 100644 --- a/include/libcss/computed.h +++ b/include/libcss/computed.h @@ -293,11 +293,11 @@ struct css_computed_style { css_computed_aural *aural; /**< Aural properties */ css_computed_page *page; /**< Page properties */ - css_alloc alloc; + css_allocator_fn alloc; void *pw; }; -css_error css_computed_style_create(css_alloc alloc, void *pw, +css_error css_computed_style_create(css_allocator_fn alloc, void *pw, css_computed_style **result); css_error css_computed_style_destroy(css_computed_style *style); diff --git a/include/libcss/functypes.h b/include/libcss/functypes.h index 52cb33f..c091f0b 100644 --- a/include/libcss/functypes.h +++ b/include/libcss/functypes.h @@ -15,13 +15,7 @@ #include /* Type of allocation function for libcss */ -typedef void *(*css_alloc)(void *ptr, size_t size, void *pw); - -/** - * Type of parse error handling function - */ -typedef void (*css_error_handler)(uint32_t line, uint32_t col, - const char *message, void *pw); +typedef void *(*css_allocator_fn)(void *ptr, size_t size, void *pw); #endif diff --git a/include/libcss/libcss.h b/include/libcss/libcss.h index 361304d..84a8be7 100644 --- a/include/libcss/libcss.h +++ b/include/libcss/libcss.h @@ -11,13 +11,15 @@ #include #include #include +#include +#include /* Initialise the CSS library for use */ css_error css_initialise(const char *aliases_file, - css_alloc alloc, void *pw); + css_allocator_fn alloc, void *pw); /* Clean up after LibCSS */ -css_error css_finalise(css_alloc alloc, void *pw); +css_error css_finalise(css_allocator_fn alloc, void *pw); #endif diff --git a/include/libcss/select.h b/include/libcss/select.h index 2dec80f..bb3f1ff 100644 --- a/include/libcss/select.h +++ b/include/libcss/select.h @@ -70,7 +70,7 @@ typedef struct css_select_handler { bool *match); } css_select_handler; -css_error css_select_ctx_create(css_alloc alloc, void *pw, +css_error css_select_ctx_create(css_allocator_fn alloc, void *pw, css_select_ctx **result); css_error css_select_ctx_destroy(css_select_ctx *ctx); diff --git a/include/libcss/stylesheet.h b/include/libcss/stylesheet.h index b70251a..6a89372 100644 --- a/include/libcss/stylesheet.h +++ b/include/libcss/stylesheet.h @@ -21,7 +21,7 @@ css_error css_stylesheet_create(css_language_level level, const char *charset, const char *url, const char *title, css_origin origin, uint64_t media, css_import_handler import_callback, void *import_pw, - css_alloc alloc, void *alloc_pw, css_stylesheet **stylesheet); + css_allocator_fn alloc, void *alloc_pw, css_stylesheet **stylesheet); css_error css_stylesheet_destroy(css_stylesheet *sheet); css_error css_stylesheet_append_data(css_stylesheet *sheet, -- cgit v1.2.3