Skip to content

Commit

Permalink
casts for msvc
Browse files Browse the repository at this point in the history
  • Loading branch information
tkelman committed Apr 5, 2015
1 parent b9e165b commit 444c60e
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/flisp/julia_extensions.c
Original file line number Diff line number Diff line change
Expand Up @@ -163,17 +163,17 @@ static char *normalize(char *s)
const int options = UTF8PROC_NULLTERM|UTF8PROC_STABLE|UTF8PROC_COMPOSE;
ssize_t result;
size_t newlen;
result = utf8proc_decompose((uint8_t*) s, 0, NULL, 0, options);
result = utf8proc_decompose((uint8_t*) s, 0, NULL, 0, (utf8proc_option_t)options);
if (result < 0) goto error;
newlen = result * sizeof(int32_t) + 1;
if (newlen > buflen) {
buflen = newlen * 2;
buf = realloc(buf, buflen);
if (!buf) lerror(OutOfMemoryError, "error allocating UTF8 buffer");
}
result = utf8proc_decompose((uint8_t*)s,0, (int32_t*)buf,result, options);
result = utf8proc_decompose((uint8_t*)s,0, (int32_t*)buf,result, (utf8proc_option_t)options);
if (result < 0) goto error;
result = utf8proc_reencode((int32_t*)buf,result, options);
result = utf8proc_reencode((int32_t*)buf,result, (utf8proc_option_t)options);
if (result < 0) goto error;
return (char*) buf;
error:
Expand Down

0 comments on commit 444c60e

Please sign in to comment.