1 2 3 4 5 6 7 8 9 10 11 12 13
#include <stdarg.h> #include <stdio.h> extern void rust_log(const char* msg); void xcb_log_wrapper(const char *fmt, ...) { char buf[512]; va_list argp; va_start(argp, fmt); vsnprintf(buf, sizeof(buf), fmt, argp); va_end(argp); rust_log(buf); }