X-Git-Url: https://git.tokkee.org/?a=blobdiff_plain;f=src%2Finclude%2Fcore%2Fobject.h;h=3c00fb51abe807d00799d931278e2d5dddc8ffd6;hb=9b4a5ef2a407895415153f78b69a954ed414715b;hp=016e718110090038ad5549e77c28a27aa0f1de34;hpb=1fee763a36a0c9af761244bbce8cd6c233ddbe2a;p=sysdb.git diff --git a/src/include/core/object.h b/src/include/core/object.h index 016e718..3c00fb5 100644 --- a/src/include/core/object.h +++ b/src/include/core/object.h @@ -46,9 +46,8 @@ struct sdb_type { int (*init)(sdb_object_t *, va_list); void (*destroy)(sdb_object_t *); - sdb_object_t *(*clone)(const sdb_object_t *); }; -#define SDB_TYPE_INIT { 0, NULL, NULL, NULL } +#define SDB_TYPE_INIT { 0, NULL, NULL } struct sdb_object { sdb_type_t type; @@ -89,6 +88,8 @@ typedef struct { */ sdb_object_t * sdb_object_create(const char *name, sdb_type_t type, ...); +sdb_object_t * +sdb_object_vcreate(const char *name, sdb_type_t type, va_list ap); /* * sdb_object_create_wrapper: @@ -121,19 +122,6 @@ sdb_object_deref(sdb_object_t *obj); void sdb_object_ref(sdb_object_t *obj); -/* - * sdb_object_clone: - * Clone an existing object using its type's 'clone' callback. The callback is - * responsible for correctly initializing a new object (which may be done - * using the object create function or the object's type's init function). - * - * Returns: - * - the cloned object on success - * - NULL on error or if no clone callback is available - */ -sdb_object_t * -sdb_object_clone(const sdb_object_t *obj); - /* * sdb_object_cmp_by_name: * Compare two objects by their name ignoring the case of the characters.