From 269ee5d9ab582ae29807ff4d98ddf07ca033bc74 Mon Sep 17 00:00:00 2001 From: Abdelrahman Date: Sun, 8 Feb 2026 23:57:05 +0000 Subject: [PATCH] Revert "Update uuid C++ implementation" This reverts commit 610df6869f3d4b03b75ee0327f7a2cfc0f926210. --- src/uuid/uuid.h | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/src/uuid/uuid.h b/src/uuid/uuid.h index 7f17dcc..ed493e8 100644 --- a/src/uuid/uuid.h +++ b/src/uuid/uuid.h @@ -20,14 +20,13 @@ struct WUUID { Str8 uuid; }; +#define wapp_uuid_gen_uuid4() *(wapp_uuid_init_uuid4(&wapp_uuid_create())) + +/* Low level UUID API */ + #ifdef WAPP_PLATFORM_CPP -#define wapp_uuid_gen_uuid4() ([&](){ - wapp_persist WUUID id = wapp_uuid_create(); - return *wapp_uuid_init_uuid4(&id); -}()) #define wapp_uuid_create() (WUUID{wapp_str8_buf(UUID_BUF_LENGTH)}) #else -#define wapp_uuid_gen_uuid4() *(wapp_uuid_init_uuid4(&wapp_uuid_create())) #define wapp_uuid_create() ((WUUID){.uuid = wapp_str8_buf(UUID_BUF_LENGTH)}) #endif