Skip to content

Commit

Permalink
Use locale insensitive casecmp
Browse files Browse the repository at this point in the history
  • Loading branch information
nobu committed Jun 24, 2024
1 parent 5974ac9 commit cfbd6a6
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
3 changes: 3 additions & 0 deletions ext/date/date_parse.c
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,9 @@
#include "ruby/re.h"
#include <ctype.h>

#undef strncasecmp
#define strncasecmp STRNCASECMP

RUBY_EXTERN VALUE rb_int_positive_pow(long x, unsigned long y);
RUBY_EXTERN unsigned long ruby_scan_digits(const char *str, ssize_t len, int base, size_t *retlen, int *overflow);

Expand Down
3 changes: 3 additions & 0 deletions ext/date/date_strptime.c
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,9 @@
#include "ruby/re.h"
#include <ctype.h>

#undef strncasecmp
#define strncasecmp STRNCASECMP

static const char *day_names[] = {
"Sunday", "Monday", "Tuesday", "Wednesday",
"Thursday", "Friday", "Saturday",
Expand Down

0 comments on commit cfbd6a6

Please sign in to comment.