Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions lib/regcomp.c
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ tre_regncomp(regex_t *preg, const char *regex, size_t n, int cflags)
#endif /* HAVE_MBSTATE_T */
while (n > 0)
{
consumed = tre_mbrtowc(wcptr, regex, n, &state);
consumed = (int)tre_mbrtowc(wcptr, regex, n, &state);

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This should no longer be needed, #128 changed consumed to size_t.


switch (consumed)
{
Expand All @@ -77,7 +77,7 @@ tre_regncomp(regex_t *preg, const char *regex, size_t n, int cflags)
case -2:
/* The last character wasn't complete. Let's not call it a
fatal error. */
consumed = n;
consumed = (int)n;

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

See above.

break;
}
regex += consumed;
Expand Down
2 changes: 1 addition & 1 deletion lib/tre-compile.c
Original file line number Diff line number Diff line change
Expand Up @@ -1884,7 +1884,7 @@ tre_compile(regex_t *preg, const tre_char_t *regex, size_t n, int cflags)
parse_ctx.mem = mem;
parse_ctx.stack = stack;
parse_ctx.re = regex;
parse_ctx.len = n;
parse_ctx.len = (int)n;

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This should no longer be needed once #129 goes in

parse_ctx.cflags = cflags;
parse_ctx.max_backref = -1;
/* Use 8-bit optimizations in 8-bit mode */
Expand Down
Loading