oxr_logger.cpp: rewrite in C

This commit is contained in:
Drew DeVault 2019-10-08 10:35:16 -04:00 committed by Jakob Bornecrantz
parent 6c275f0aae
commit d7debdb724
3 changed files with 8 additions and 8 deletions

View file

@ -19,12 +19,12 @@ set(OXR_SOURCE_FILES
oxr_api_verify.h
oxr_binding.c
oxr_chain.h
oxr_event.cpp
oxr_event.c
oxr_extension_support.h
oxr_handle_base.c
oxr_input.c
oxr_instance.c
oxr_logger.cpp
oxr_logger.c
oxr_logger.h
oxr_objects.h
oxr_path.c

View file

@ -20,7 +20,7 @@ lib_st_oxr = static_library(
'oxr_handle_base.c',
'oxr_input.c',
'oxr_instance.c',
'oxr_logger.cpp',
'oxr_logger.c',
'oxr_logger.h',
'oxr_objects.h',
'oxr_path.c',

View file

@ -137,7 +137,7 @@ oxr_slog_ensure(struct oxr_sink_logger *slog, size_t extra)
slog->store = (char *)realloc(slog->store, slog->store_size);
}
extern "C" void
void
oxr_slog(struct oxr_sink_logger *slog, const char *fmt, ...)
{
va_list args;
@ -162,7 +162,7 @@ oxr_slog(struct oxr_sink_logger *slog, const char *fmt, ...)
slog->length += ret;
}
extern "C" void
void
oxr_slog_free(struct oxr_sink_logger *slog)
{
free(slog->store);
@ -170,21 +170,21 @@ oxr_slog_free(struct oxr_sink_logger *slog)
slog->store_size = 0;
}
extern "C" void
void
oxr_log_slog(struct oxr_logger *log, struct oxr_sink_logger *slog)
{
oxr_log(log, "%s", slog->store);
oxr_slog_free(slog);
}
extern "C" void
void
oxr_warn_slog(struct oxr_logger *log, struct oxr_sink_logger *slog)
{
oxr_warn(log, "%s", slog->store);
oxr_slog_free(slog);
}
extern "C" XrResult
XrResult
oxr_error_slog(struct oxr_logger *log,
XrResult res,
struct oxr_sink_logger *slog)