From 8baa9de5294357e48286dedc637ee9a432994028 Mon Sep 17 00:00:00 2001 From: Philipp Schafft Date: Sat, 14 Sep 2019 21:45:23 +0000 Subject: [PATCH] Update: Migrated away from igloo_ro_new() --- include/igloo/buffer.h | 8 -------- src/buffer.c | 5 ----- src/objecthandler.c | 2 +- src/reportxml.c | 4 ++-- 4 files changed, 3 insertions(+), 16 deletions(-) diff --git a/include/igloo/buffer.h b/include/igloo/buffer.h index 77f2dd0..3c33161 100644 --- a/include/igloo/buffer.h +++ b/include/igloo/buffer.h @@ -47,14 +47,6 @@ igloo_RO_FORWARD_TYPE(igloo_buffer_t); */ igloo_buffer_t * igloo_buffer_new(ssize_t preallocation, const char *name, igloo_ro_t associated, igloo_ro_t instance); -/* Depreciated: This creates a new buffer with defaults. - * Do NOT use this. Use refobject_new(igloo_buffer_t) - * - * This is the same as: - * igloo_buffer_new(-1, NULL, NULL, REFOBJECT_NULL) - */ -igloo_buffer_t * igloo_buffer_new_simple(void); - /* This function preallocates space for later use. * Parameters: * buffer diff --git a/src/buffer.c b/src/buffer.c index 20d296f..5726982 100644 --- a/src/buffer.c +++ b/src/buffer.c @@ -59,11 +59,6 @@ igloo_buffer_t * igloo_buffer_new(ssize_t preallocation, const char *name, iglo return buffer; } -igloo_buffer_t * igloo_buffer_new_simple(void) -{ - return igloo_ro_new(igloo_buffer_t); -} - void igloo_buffer_preallocate(igloo_buffer_t *buffer, size_t request) { void *n; diff --git a/src/objecthandler.c b/src/objecthandler.c index 0ec03bc..e8160f9 100644 --- a/src/objecthandler.c +++ b/src/objecthandler.c @@ -134,7 +134,7 @@ int igloo_objecthandler_push_filter(igloo_objecthandler_t *handler, igloo_filter igloo_thread_rwlock_wlock(&(handler->rwlock)); if (!handler->filter_list && handler->filter_a && handler->filter_b) { - handler->filter_list = igloo_ro_new(igloo_list_t); + handler->filter_list = igloo_ro_new_ext(igloo_list_t, NULL, igloo_RO_NULL, handler); if (!handler->filter_list) { igloo_thread_rwlock_unlock(&(handler->rwlock)); return -1; diff --git a/src/reportxml.c b/src/reportxml.c index 9c06c33..cbba975 100644 --- a/src/reportxml.c +++ b/src/reportxml.c @@ -1287,7 +1287,7 @@ igloo_reportxml_t * igloo_reportxml_database_build_report(igloo_report } else if (count == 0) { /* Empty definition? Not exactly an exciting report... */ igloo_ro_unref(definition); - return igloo_ro_new(igloo_reportxml_t); + return igloo_ro_new_ext(igloo_reportxml_t, NULL, igloo_RO_NULL, db); } if (type == igloo_REPORTXML_NODE_TYPE__ERROR) { @@ -1313,7 +1313,7 @@ igloo_reportxml_t * igloo_reportxml_database_build_report(igloo_report break; } - ret = igloo_ro_new(igloo_reportxml_t); + ret = igloo_ro_new_ext(igloo_reportxml_t, NULL, igloo_RO_NULL, db); if (!ret) { igloo_ro_unref(definition); return NULL;