BarryServer : Git

All the code for all my projects
// BarryServer : Git / libBLOC / commit / c5a8d166e141bc66615bbf6d3f16e6c1ab6accf6 / list / list_add.c

// Related

libBLOC

Barry Adding object metadata functions c5a8d16 (2 years, 11 months ago)
diff --git a/list/list_add.c b/list/list_add.c
index 276a158..ad5ddec 100644
--- a/list/list_add.c
+++ b/list/list_add.c
@@ -20,7 +20,6 @@
 #include <BLOC/object.h>
 #include <BLOC/list.h>
 #include "../assert.h"
-#include "../object.h"
 #include "list.h"
 
 /* Add an object to a list */
@@ -29,9 +28,8 @@ list_add(List *list, void *obj)
 {
 	ASSERT(list);
 	ASSERT(obj);
-	struct ObjectHeader *header = object_header(obj);
-	ASSERT(header->magic == OBJECT_MAGIC);
-	if (list->type && list->type != header->type)
+	ASSERT(obj_verify(obj));
+	if (list->type && list->type != obj_type(obj))
 		return;
 
 	struct IterableEntry *entry;