From: Sebastian Harl Date: Thu, 13 Dec 2012 12:37:14 +0000 (+0100) Subject: object.h: Added SC_OBJECT_WRAPPER_STATIC(). X-Git-Tag: sysdb-0.1.0~451 X-Git-Url: https://git.tokkee.org/?p=sysdb.git;a=commitdiff_plain;h=cf5c65dfba37b6ea3336fd58b0958a0245fda3ee object.h: Added SC_OBJECT_WRAPPER_STATIC(). This may be used to initialize static sc_object_wrapper_t objects. --- diff --git a/src/include/core/object.h b/src/include/core/object.h index cd91086..71d0297 100644 --- a/src/include/core/object.h +++ b/src/include/core/object.h @@ -82,6 +82,9 @@ sc_object_create(size_t size, int (*init)(sc_object_t *, va_list), sc_object_t * sc_object_create_wrapper(void *data, void (*destructor)(void *)); +#define SC_OBJECT_WRAPPER_STATIC(obj, destructor) \ + { SC_OBJECT_INIT, (obj), (destructor) } + /* * sc_object_deref: * Dereference the object and free the allocated memory in case the ref-count