51 #define VuoLog_status(format, ...) VuoLog_statusF(__FILE__, __LINE__, __func__, format, ##__VA_ARGS__)
57 void VuoLog_statusF(
const char *file,
const unsigned int linenumber,
const char *
function,
const char *format, ...);
59 void VuoLog_statusF(
const char *file,
const unsigned int linenumber,
const char *
function,
const char *format, ...)
__attribute__((format(printf, 4, 5)));
68 void VuoLog(
const char *file,
const unsigned int linenumber,
const char *
function,
const char *format, ...);
70 void VuoLog(
const char *file,
const unsigned int linenumber,
const char *
function,
const char *format, ...)
__attribute__((format(printf, 4, 5)));
85 #define VL() VuoLog(__FILE__, __LINE__, __func__, "")
101 #define VLog(format, ...) VuoLog(__FILE__, __LINE__, __func__, format, ##__VA_ARGS__)
108 #define VUserLog(format, ...) VuoLog(__FILE__, __LINE__, __func__, format, ##__VA_ARGS__)
115 #define VDebugLog(format, ...) do { if (VuoIsDebugEnabled()) VuoLog(__FILE__, __LINE__, __func__, format, ##__VA_ARGS__); } while(0)
129 #define VLogHeap(heapPointer) do { \
130 char *description = VuoHeap_getDescription(heapPointer); \
131 VLog("%s = %p (registered at %s)", #heapPointer, heapPointer, description); \
139 #define VUOLOG_PROFILE_BEGIN(object) double VuoLog_time_ ## object = VuoLogGetTime();
140 #define VUOLOG_PROFILE_END(object) VuoLog_recordTime(#object, VuoLogGetTime() - VuoLog_time_ ## object);
153 #define VUOLOG_PROFILE_BEGIN(object)
158 #define VUOLOG_PROFILE_END(object)
175 static inline void VuoDeferCleanup(
void (^*b)(
void)) {
if (*b) (*b)(); }
178 #define VuoDeferMerge(a,b) a##b
181 #define VuoDeferVarName(a) VuoDeferMerge(VuoDeferScopeVar, a)
198 #define VuoDefer __attribute__((cleanup(VuoDeferCleanup),unused)) void (^VuoDeferVarName(__COUNTER__))(void) =