Permalink
Browse files

Fix method naming

  • Loading branch information...
1 parent 2dd1f9a commit fd6dd84a7e472e42e591a06d1ae6fd94c6272f73 Joe Nardone committed Mar 17, 2012
Showing with 7 additions and 4 deletions.
  1. +6 −3 src/zt_uuid.c
  2. +1 −1 src/zt_uuid.h
View
@@ -116,15 +116,18 @@ int
zt_uuid_tostr(zt_uuid_t * uuid, char ** uuids, zt_uuid_flags_t flags) {
size_t zero = 0;
+ /* tostr essentially treats **uuids as an 'out' param, so we always
+ want to be sure the pointer points to NULL so we alloc the
+ memory we want */
if (uuids != NULL) {
*uuids = NULL;
}
- return zt_uuid_tostr2(uuid, uuids, &zero, flags);
+ return zt_uuid_fillstr(uuid, uuids, &zero, flags);
} /* zt_uuid_tostr */
int
-zt_uuid_tostr2(zt_uuid_t * uuid, char ** uuids, size_t * uuids_size, zt_uuid_flags_t flags) {
+zt_uuid_fillstr(zt_uuid_t * uuid, char ** uuids, size_t * uuids_size, zt_uuid_flags_t flags) {
char uuids_hex[UUID_SHORT_STR_LEN];
char * result = NULL;
bool myalloc = false;
@@ -217,7 +220,7 @@ zt_uuid_tostr2(zt_uuid_t * uuid, char ** uuids, size_t * uuids_size, zt_uuid_fla
*uuids = result;
return i;
-} /* zt_uuid_tostr2 */
+} /* zt_uuid_fillstr */
int
zt_uuid_fromstr(char * uuidstr, zt_uuid_t * uuid, zt_uuid_flags_t flags) {
View
@@ -58,7 +58,7 @@ typedef enum zt_uuid_ns zt_uuid_ns;
int zt_uuid4(zt_uuid_t * uuid);
int zt_uuid5(char * value, size_t vlen, zt_uuid_ns type, zt_uuid_t * uuid);
int zt_uuid_tostr(zt_uuid_t * uuid, char ** uuids, zt_uuid_flags_t flags);
-int zt_uuid_tostr2(zt_uuid_t * uuid, char ** uuids, size_t * uuids_size, zt_uuid_flags_t flags);
+int zt_uuid_fillstr(zt_uuid_t * uuid, char ** uuids, size_t * uuids_size, zt_uuid_flags_t flags);
int zt_uuid_fromstr(char * value, zt_uuid_t * uuid, zt_uuid_flags_t flags);
int zt_uuid_cmp(zt_uuid_t * uuid, zt_uuid_t * uuid2);
int zt_uuid_isvalid(char * uuid, zt_uuid_flags_t flags);

0 comments on commit fd6dd84

Please sign in to comment.