1
1
Fork 0
mirror of https://github.com/NixOS/nix.git synced 2025-11-20 01:09:37 +01:00

test/libutil: Add OBSERVE_STRING macro

Makes string callback easier to pass, without mistakes.
This commit is contained in:
Robert Hensing 2024-04-08 13:13:02 +02:00
parent 876e70bc9a
commit a512f4eebc
4 changed files with 33 additions and 20 deletions

View file

@ -0,0 +1,9 @@
#include "string_callback.hh"
namespace nix::testing {
void observe_string_cb(const char * start, unsigned int n, std::string * user_data) {
*user_data = std::string(start);
}
}