Do not export internal unsafe_encode_char()
authorPeter Colberg <peter@colberg.org>
Thu, 29 Oct 2015 04:45:39 +0000 (00:45 -0400)
committerPeter Colberg <peter@colberg.org>
Thu, 29 Oct 2015 04:45:39 +0000 (00:45 -0400)
test/tests.h
utf8proc.c

index 6eb5457d2822d90ac28b2c16911a76e3d817bf7e..43df51fdc057f1dc524e4af1e51d04d3f53ce86c 100644 (file)
@@ -33,7 +33,6 @@ size_t skipspaces(const char *buf, size_t i)
    separated by whitespace, and terminated by any character not in
    [0-9a-fA-F] or whitespace, then stores the corresponding utf8 string
    in dest, returning the number of bytes read from buf */
-utf8proc_ssize_t unsafe_encode_char(utf8proc_int32_t uc, utf8proc_uint8_t *dst);
 size_t encode(char *dest, const char *buf)
 {
      size_t i = 0, j, d = 0;
@@ -48,7 +47,7 @@ size_t encode(char *dest, const char *buf)
           }
           check(sscanf(buf + i, "%x", (unsigned int *)&c) == 1, "invalid hex input %s", buf+i);
           i = j; /* skip to char after hex input */
-          d += unsafe_encode_char(c, (utf8proc_uint8_t *) (dest + d));
+          d += utf8proc_encode_char(c, (utf8proc_uint8_t *) (dest + d));
      }
 }
 
index 80f5ba8fd2ad154b250a7ce5638222cabd995ce0..c302b79e6e2783332d43ccfe52fd4d5991ea5244 100644 (file)
@@ -188,7 +188,7 @@ UTF8PROC_DLLEXPORT utf8proc_ssize_t utf8proc_encode_char(utf8proc_int32_t uc, ut
 }
 
 /* internal "unsafe" version that does not check whether uc is in range */
-utf8proc_ssize_t unsafe_encode_char(utf8proc_int32_t uc, utf8proc_uint8_t *dst) {
+static utf8proc_ssize_t unsafe_encode_char(utf8proc_int32_t uc, utf8proc_uint8_t *dst) {
    if (uc < 0x00) {
       return 0;
    } else if (uc < 0x80) {