From ccdb5c54d02cc4c0926d76df55e29e95bac81e79 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9D=8E=E9=80=9A=E6=B4=B2?= Date: Wed, 11 Jan 2023 13:55:06 +0800 Subject: [PATCH] Linux: enable FF_*_AUTO_DESTROY They have been on Windows and macOS for sometime and worked well. --- src/util/FFlist.h | 4 +--- src/util/FFstrbuf.h | 4 +--- 2 files changed, 2 insertions(+), 6 deletions(-) diff --git a/src/util/FFlist.h b/src/util/FFlist.h index 86b20bc5c..e65180d3a 100644 --- a/src/util/FFlist.h +++ b/src/util/FFlist.h @@ -51,8 +51,6 @@ static inline void ffListSort(FFlist* list, int(*compar)(const void*, const void itemVarName - (itemType*)(listVar).data < (listVar).length; \ ++itemVarName) -#if defined(_WIN32) || defined(__APPLE__) - #define FF_LIST_AUTO_DESTROY FFlist __attribute__((__cleanup__(ffListDestroy))) -#endif +#define FF_LIST_AUTO_DESTROY FFlist __attribute__((__cleanup__(ffListDestroy))) #endif diff --git a/src/util/FFstrbuf.h b/src/util/FFstrbuf.h index 94adc6b03..7755225a7 100644 --- a/src/util/FFstrbuf.h +++ b/src/util/FFstrbuf.h @@ -310,8 +310,6 @@ static inline FF_C_NODISCARD bool ffStrbufEndsWithIgnCase(const FFstrbuf* strbuf return ffStrbufEndsWithIgnCaseNS(strbuf, end->length, end->chars); } -#if defined(_WIN32) || defined(__APPLE__) - #define FF_STRBUF_AUTO_DESTROY FFstrbuf __attribute__((__cleanup__(ffStrbufDestroy))) -#endif +#define FF_STRBUF_AUTO_DESTROY FFstrbuf __attribute__((__cleanup__(ffStrbufDestroy))) #endif