ds: uuid: update to_string() to use new b_stream interface
This commit is contained in:
@@ -36,10 +36,7 @@ BLUE_API b_uuid *b_uuid_create_from_uuid_bytes(const b_uuid_bytes *bytes);
|
||||
BLUE_API b_uuid *b_uuid_create_from_string(const b_string *string);
|
||||
BLUE_API b_uuid *b_uuid_create_from_cstr(const char *s);
|
||||
|
||||
BLUE_API b_status b_uuid_to_string(const b_uuid *uuid, b_string *out);
|
||||
BLUE_API b_status b_uuid_to_cstr(const b_uuid *uuid, char out[B_UUID_STRING_MAX]);
|
||||
BLUE_API b_status b_uuid_to_stringstream(
|
||||
const b_uuid *uuid, struct b_stringstream *out);
|
||||
BLUE_API void b_uuid_get_bytes(
|
||||
const b_uuid *uuid, unsigned char bytes[B_UUID_NBYTES]);
|
||||
BLUE_API void b_uuid_get_uuid_bytes(const b_uuid *uuid, b_uuid_bytes *bytes);
|
||||
|
||||
20
ds/uuid.c
20
ds/uuid.c
@@ -191,24 +191,6 @@ b_uuid *b_uuid_create_from_string(const b_string *string)
|
||||
return b_uuid_create_from_cstr(b_string_ptr(string));
|
||||
}
|
||||
|
||||
b_status b_uuid_to_stringstream(const b_uuid *uuid, struct b_stringstream *out)
|
||||
{
|
||||
char str[B_UUID_STRING_MAX];
|
||||
b_uuid_to_cstr(uuid, str);
|
||||
b_stringstream_add(out, str);
|
||||
|
||||
return B_SUCCESS;
|
||||
}
|
||||
|
||||
b_status b_uuid_to_string(const b_uuid *uuid, b_string *out)
|
||||
{
|
||||
char str[B_UUID_STRING_MAX];
|
||||
b_uuid_to_cstr(uuid, str);
|
||||
b_string_append_cstr(out, str);
|
||||
|
||||
return B_SUCCESS;
|
||||
}
|
||||
|
||||
/*** VIRTUAL FUNCTIONS ********************************************************/
|
||||
|
||||
static void uuid_init(b_object *obj, void *priv)
|
||||
@@ -221,7 +203,7 @@ static void uuid_fini(b_object *obj, void *priv)
|
||||
struct b_uuid_p *uuid = priv;
|
||||
}
|
||||
|
||||
static void uuid_to_string(const b_object *uuid, struct b_stream *out)
|
||||
static void uuid_to_string(const b_object *uuid, b_stream *out)
|
||||
{
|
||||
char str[B_UUID_STRING_MAX];
|
||||
b_uuid_to_cstr(uuid, str);
|
||||
|
||||
Reference in New Issue
Block a user