Fix wapp_uuid_gen_uuid4 for C++
All checks were successful
Release / release (push) Successful in 5s
All checks were successful
Release / release (push) Successful in 5s
This commit is contained in:
@@ -22,7 +22,14 @@ struct WUUID {
|
|||||||
|
|
||||||
// TODO (Abdelrahman): Update UUID implementation to work properly with C++ and tests for validation
|
// TODO (Abdelrahman): Update UUID implementation to work properly with C++ and tests for validation
|
||||||
|
|
||||||
|
#ifdef WAPP_PLATFORM_CPP
|
||||||
|
#define wapp_uuid_gen_uuid4() ([&](){ \
|
||||||
|
wapp_persist WUUID uuid = wapp_uuid_create(); \
|
||||||
|
return *(wapp_uuid_init_uuid4(&uuid)) \
|
||||||
|
})
|
||||||
|
#else
|
||||||
#define wapp_uuid_gen_uuid4() *(wapp_uuid_init_uuid4(&wapp_uuid_create()))
|
#define wapp_uuid_gen_uuid4() *(wapp_uuid_init_uuid4(&wapp_uuid_create()))
|
||||||
|
#endif
|
||||||
|
|
||||||
/* Low level UUID API */
|
/* Low level UUID API */
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user