From: Sebastian Harl Date: Mon, 31 Mar 2014 20:47:46 +0000 (+0200) Subject: object: Added sdb_object_create_dT() macro. X-Git-Tag: sysdb-0.1.0~169 X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=f124b35d3c6d8d277f0dc30852ec20042a3e3512;p=sysdb.git object: Added sdb_object_create_dT() macro. This may be used to create a simple dynamic object of a specified type. Dynamic type means that it uses a destructor. --- diff --git a/src/include/core/object.h b/src/include/core/object.h index 25e37d1..819d11e 100644 --- a/src/include/core/object.h +++ b/src/include/core/object.h @@ -109,6 +109,13 @@ sdb_object_create_simple(const char *name, size_t size, #define sdb_object_create_T(n,t) \ sdb_object_create_simple((n), sizeof(t), NULL) +/* + * sdb_object_create_dT: + * Create a simple object of dynamic type 't' using destructor 'd'. + */ +#define sdb_object_create_dT(n,t,d) \ + sdb_object_create_simple((n), sizeof(t), d) + /* * sdb_object_create_wrapper: * Create a new sdb_object_t wrapping some arbitrary other object.