summaryrefslogtreecommitdiff
path: root/util.h
diff options
context:
space:
mode:
authorMikhail Burakov <mburakov@mailbox.org>2023-04-08 13:49:13 +0200
committerMikhail Burakov <mburakov@mailbox.org>2023-04-09 10:26:16 +0200
commitb4996b76e99ab602ff87df31d61074cfa72f9f61 (patch)
treed8ec2684929e1e2b98394d31896b1e048b8adaa3 /util.h
parent0fe1d5648f5ee5f1548eb887e96ca149f9e6481c (diff)
Get rid of auto variables
Diffstat (limited to 'util.h')
-rw-r--r--util.h8
1 files changed, 0 insertions, 8 deletions
diff --git a/util.h b/util.h
index 47c4008..fe5fa56 100644
--- a/util.h
+++ b/util.h
@@ -22,17 +22,9 @@
#define STR(x) STR_IMPL(x)
#define LOG(fmt, ...) \
fprintf(stderr, __FILE__ ":" STR(__LINE__) " " fmt "\n", ##__VA_ARGS__)
-#define AUTO(x) x __attribute__((__cleanup__(x##Destroy)))
-#define RELEASE(x) Release((void**)&x)
#define LENGTH(x) (sizeof(x) / sizeof *(x))
#define MAX(a, b) ((a) > (b) ? (a) : (b))
#define MIN(a, b) ((a) < (b) ? (a) : (b))
#define _(...) __VA_ARGS__
-static inline void* Release(void** x) {
- void* result = *x;
- *x = 0;
- return result;
-}
-
#endif // STREAMER_UTIL_H_