aboutsummaryrefslogtreecommitdiffstats
path: root/src/jalv_internal.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/jalv_internal.h')
-rw-r--r--src/jalv_internal.h8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/jalv_internal.h b/src/jalv_internal.h
index 3bfc102..0932460 100644
--- a/src/jalv_internal.h
+++ b/src/jalv_internal.h
@@ -58,6 +58,12 @@
# define REALTIME
#endif
+#ifdef __GNUC__
+# define JALV_LOG_FUNC(fmt, arg1) __attribute__((format(printf, fmt, arg1)))
+#else
+# define JALV_LOG_FUNC(fmt, arg1)
+#endif
+
#ifdef __cplusplus
extern "C" {
#endif
@@ -526,11 +532,13 @@ jalv_strjoin(const char* a, const char* b)
return out;
}
+JALV_LOG_FUNC(3, 4)
int
jalv_printf(LV2_Log_Handle handle,
LV2_URID type,
const char* fmt, ...);
+JALV_LOG_FUNC(3, 0)
int
jalv_vprintf(LV2_Log_Handle handle,
LV2_URID type,