File size: 907 Bytes
92264aa | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 | /**************************************************************************************************
* ZipVoice AXERA C++ Port
*
* Utility: checker macros
*
* Adapted from melotts.axera-main
**************************************************************************************************/
#pragma once
#include "utils/logger.h"
#define CHECK_PTR(p) \
do { \
if (!p) { \
ALOGE("%s nil pointer\n", #p); \
return -1; \
} \
} while (0)
#define CHECK_INITED(p) \
do { \
if (!p->HasInit()) { \
ALOGE("%s has not init\n", #p); \
return -1; \
} \
} while (0)
|