52 #define VuoLog_status(format, ...) VuoLog_statusF(__FILE__, __LINE__, __func__, format, ##__VA_ARGS__)
58 void VuoLog_statusF(
const char *file,
const unsigned int linenumber,
const char *
function,
const char *format, ...);
60 void VuoLog_statusF(
const char *file,
const unsigned int linenumber,
const char *
function,
const char *format, ...)
__attribute__((format(printf, 4, 5)));
69 void VuoLog(
const char *file,
const unsigned int linenumber,
const char *
function,
const char *format, ...);
71 void VuoLog(
const char *file,
const unsigned int linenumber,
const char *
function,
const char *format, ...)
__attribute__((format(printf, 4, 5)));
86 #define VL() VuoLog(__FILE__, __LINE__, __func__, "")
102 #define VLog(format, ...) VuoLog(__FILE__, __LINE__, __func__, format, ##__VA_ARGS__)
109 #define VUserLog(format, ...) VuoLog(__FILE__, __LINE__, __func__, format, ##__VA_ARGS__)
116 #define VDebugLog(format, ...) do { if (VuoIsDebugEnabled()) VuoLog(__FILE__, __LINE__, __func__, format, ##__VA_ARGS__); } while(0)
130 #define VLogHeap(heapPointer) do { \
131 char *description = VuoHeap_getDescription(heapPointer); \
132 VLog("%s = %p (registered at %s)", #heapPointer, heapPointer, description); \
140 #define VUOLOG_PROFILE_BEGIN(object) double VuoLog_time_ ## object = VuoLogGetTime();
141 #define VUOLOG_PROFILE_END(object) VuoLog_recordTime(#object, VuoLogGetTime() - VuoLog_time_ ## object);
154 #define VUOLOG_PROFILE_BEGIN(object)
159 #define VUOLOG_PROFILE_END(object)
176 static inline void VuoDeferCleanup(
void (^*b)(
void)) {
if (*b) (*b)(); }
179 #define VuoDeferMerge(a,b) a##b
182 #define VuoDeferVarName(a) VuoDeferMerge(VuoDeferScopeVar, a)
199 #define VuoDefer __attribute__((cleanup(VuoDeferCleanup),unused)) void (^VuoDeferVarName(__COUNTER__))(void) =