From 8b52cc7243c2e0e4ef17db5583999030b8636584 Mon Sep 17 00:00:00 2001 From: Mattias Andrée Date: Fri, 2 Apr 2021 13:17:25 +0200 Subject: First commit MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Mattias Andrée --- common.h | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) create mode 100644 common.h (limited to 'common.h') diff --git a/common.h b/common.h new file mode 100644 index 0000000..bf886cd --- /dev/null +++ b/common.h @@ -0,0 +1,23 @@ +/* See LICENSE file for copyright and license details. */ +#include "libcontacts.h" + +#include +#include +#include +#include +#include +#include +#include +#include +#include + + +#define DESTROY_ALL(LIST, FUNC)\ + do {\ + void *destroy_all_temp__;\ + if ((destroy_all_temp__ = (LIST))) {\ + for (; *(LIST); (LIST)++)\ + FUNC(*(LIST));\ + free(destroy_all_temp__);\ + }\ + } while (0) -- cgit v1.2.3-70-g09d2