]> pd.if.org Git - uuid/blobdiff - internal.c
improve test case names for t/uuidgen.t
[uuid] / internal.c
index c9a72f6da25eefc10d23d75bcb3697fb9175b9a0..597dc7417ad2e1203073d2a756515391e1789ca2 100644 (file)
@@ -489,7 +489,9 @@ int pd_uuid_make_v5(struct pd_uuid_state *s, pd_uuid_t *uuid, pd_uuid_t *ns, voi
 }
 
 /*
- * s must point to enough space
+ * s must point to enough space, i.e. at least 37 bytes.
+ * this is constrained enough that sprintf could
+ * probably be avoided
  */
 char *pd_uuid_get_string(pd_uuid_t *uuid, char *s) {
        char *r;
@@ -508,6 +510,11 @@ char *pd_uuid_get_string(pd_uuid_t *uuid, char *s) {
        return s;
 }
 
+/*
+ * might be faster to sscanf in four bytes at a time
+ * and using htonl()
+ * A nybble loop might be faster yet.
+ */
 int pd_uuid_set_string(pd_uuid_t *uuid, char *s) {
        unsigned int byte;
        int i;