]>
git.saurik.com Git - apple/security.git/blob - utilities/src/SecDispatchRelease.h
2 // SecDispatchRelease.h
5 // Created by Mitch Adler on 11/26/12.
6 // Copyright (c) 2012 Apple Inc. All rights reserved.
10 #ifndef _SECDISPATCHRELEASE_H_
11 #define _SECDISPATCHRELEASE_H_
13 #include <dispatch/dispatch.h>
16 #define dispatch_retain_safe(DO) { \
17 __typeof__(DO) _do = (DO); \
19 dispatch_retain(_do); \
22 #define dispatch_release_safe(DO) { \
23 __typeof__(DO) _do = (DO); \
25 dispatch_release(_do); \
28 #define dispatch_release_null(DO) { \
29 __typeof__(DO) _do = (DO); \
32 dispatch_release(_do); \
37 #define xpc_retain_safe(XO) { \
38 __typeof__(XO) _xo = (XO); \
43 #define xpc_release_safe(XO) { \
44 __typeof__(XO) _xo = (XO); \
49 #define xpc_release_null(XO) { \
50 __typeof__(XO) _xo = (XO); \