macro: introduce DEFINE_TRIVIAL_DESTRUCTOR() macro
This commit is contained in:
@@ -458,6 +458,11 @@ static inline int __coverity_check__(int condition) {
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#define DEFINE_TRIVIAL_DESTRUCTOR(name, type, func) \
|
||||
static inline void name(type *p) { \
|
||||
func(p); \
|
||||
}
|
||||
|
||||
#define DEFINE_TRIVIAL_CLEANUP_FUNC(type, func) \
|
||||
static inline void func##p(type *p) { \
|
||||
if (*p) \
|
||||
|
||||
Reference in New Issue
Block a user