From cf5c65dfba37b6ea3336fd58b0958a0245fda3ee Mon Sep 17 00:00:00 2001 From: Sebastian Harl Date: Thu, 13 Dec 2012 13:37:14 +0100 Subject: [PATCH] object.h: Added SC_OBJECT_WRAPPER_STATIC(). This may be used to initialize static sc_object_wrapper_t objects. --- src/include/core/object.h | 3 +++ 1 file changed, 3 insertions(+) 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 -- 2.30.2