From 6346765e3211228531aea1e5222096b90e46a998 Mon Sep 17 00:00:00 2001 From: Abdelrahman Date: Sun, 10 May 2026 02:13:41 +0100 Subject: [PATCH] Fix UUID for C++ --- VERSION | 2 +- src/uuid/uuid.h | 4 ++++ 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/VERSION b/VERSION index 3eefcb9..7dea76e 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -1.0.0 +1.0.1 diff --git a/src/uuid/uuid.h b/src/uuid/uuid.h index 1ee0686..82b05e4 100644 --- a/src/uuid/uuid.h +++ b/src/uuid/uuid.h @@ -26,7 +26,11 @@ struct WUUID { /* Low level UUID API */ +#ifdef WAPP_PLATFORM_CPP +#define wapp_uuid_create() ([&](){ return WUUID{wapp_str8_buf(UUID_BUF_LENGTH)}; }) +#else #define wapp_uuid_create() ((WUUID){.uuid = wapp_str8_buf(UUID_BUF_LENGTH)}) +#endif // Just returns the same pointer that was passed in with the UUID initialised. // Fails when passed a NULL pointer.