Add Pal::message. (#467)

This provides a single place for reporting messages to the user.

While here, be consistent about using stderr for things that should go
to stderr.  We were previously using a mix of stderr and stdout.
This commit is contained in:
David Chisnall
2022-03-03 09:08:44 +00:00
committed by GitHub
parent c73846e418
commit 8fc42d1698
6 changed files with 50 additions and 14 deletions

View File

@@ -19,7 +19,7 @@ namespace snmalloc
{ \
current_test = __PRETTY_FUNCTION__; \
MessageBuilder<1024> mb{"Starting test: " msg "\n", ##__VA_ARGS__}; \
fputs(mb.get_message(), stderr); \
Pal::message(mb.get_message()); \
} while (0)
/**
@@ -33,7 +33,7 @@ namespace snmalloc
do \
{ \
MessageBuilder<1024> mb{msg "\n", ##__VA_ARGS__}; \
fputs(mb.get_message(), stderr); \
Pal::message(mb.get_message()); \
} while (0)
}