50 string->internal.len = APR_UUID_FORMATTED_LENGTH + 1;
54 apr_uuid_format((
char *)string->internal.s, &uuid);
71 apr_uuid_format(buffer, &uuid);
80 const afw_uuid_t *uuid,
87 apr_uuid_format(buffer, uuid);
101 char uuid_str[APR_UUID_FORMATTED_LENGTH + 1];
103 if (s->len != APR_UUID_FORMATTED_LENGTH)
goto error;
104 memcpy(uuid_str, s->s, s->len);
105 uuid_str[s->len] = 0;
106 rv = apr_uuid_parse(uuid, uuid_str);
107 if (rv != APR_SUCCESS)
goto error;
122 char uuid_str[APR_UUID_FORMATTED_LENGTH + 1];
125 if (s->len > APR_UUID_FORMATTED_LENGTH)
goto error;
126 memcpy(uuid_str, s->s, s->len);
127 uuid_str[s->len] = 0;
129 rv = apr_uuid_parse(uuid, uuid_str);
130 if (rv != APR_SUCCESS)
goto error;
AFW_DEFINE(const afw_object_t *)
Adaptive Framework Core Internal.
afw_value_allocate_string(const afw_pool_t *p, afw_xctx_t *xctx)
Allocate function for unmanaged data type string value.
#define AFW_UTF8_Z_LEN
String is NUL (0) terminate.
#define AFW_THROW_ERROR_RV_Z(code, rv_source_id, rv, message_z, xctx)
Macro used to set error and rv in xctx and throw it.
#define afw_pool_malloc(instance, size, xctx)
Call method malloc of interface afw_pool.
#define afw_pool_malloc_type(instance, type, xctx)
Macro to allocate uncleared memory to hold type in pool.
#define afw_utf8_create(s, len, p, xctx)
Create utf-8 string without copy unless necessary in pool specified.
afw_uuid_from_utf8(const afw_utf8_t *s, const afw_pool_t *p, afw_xctx_t *xctx)
Convert standard format UUID utf-8 string to uuid.
afw_uuid_parse(afw_uuid_t *uuid, const afw_utf8_t *s, afw_xctx_t *xctx)
Parse a standard format UUID string to a uuid.
afw_uuid_create(const afw_pool_t *p, afw_xctx_t *xctx)
Create a UUID.
afw_uuid_create_string(const afw_pool_t *p, afw_xctx_t *xctx)
Create a UUID as a standard format UUID utf-8 string value.
afw_uuid_create_utf8(const afw_pool_t *p, afw_xctx_t *xctx)
Create a UUID as a standard format UUID utf-8 string.
afw_uuid_generate(afw_uuid_t *uuid, afw_xctx_t *xctx)
Generate a new UUID.
afw_uuid_to_utf8(const afw_uuid_t *uuid, const afw_pool_t *p, afw_xctx_t *xctx)
Convert uuid to a standard format UUID utf-8 string.
Interface afw_pool public struct.
NFC normalized UTF-8 string.
Interface afw_value public struct.
struct for data type string values.
Interface afw_xctx public struct.