diff options
| author | Yukihiro "Matz" Matsumoto <[email protected]> | 2012-09-12 00:05:15 -0700 |
|---|---|---|
| committer | Yukihiro "Matz" Matsumoto <[email protected]> | 2012-09-12 00:05:15 -0700 |
| commit | e6a582a623c023c35c41b239f7888f0db7c2baca (patch) | |
| tree | 7b0d752b7082234eaee908d964f5167ad5bb9e8f /include | |
| parent | 54101eec43821a16a83db00840a9cc8034d8f3a1 (diff) | |
| parent | 32b88c72afbeb5758be57f09ebdf4820b7994c6d (diff) | |
| download | mruby-e6a582a623c023c35c41b239f7888f0db7c2baca.tar.gz mruby-e6a582a623c023c35c41b239f7888f0db7c2baca.zip | |
Merge pull request #466 from iij/pr-signed-char
two more wrapper macros for ctype.h
Diffstat (limited to 'include')
| -rw-r--r-- | include/mruby.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/include/mruby.h b/include/mruby.h index 2f2f3753d..b741e6444 100644 --- a/include/mruby.h +++ b/include/mruby.h @@ -274,6 +274,8 @@ mrb_value mrb_check_funcall(mrb_state *mrb, mrb_value recv, mrb_sym mid, int arg #define ISALPHA(c) (ISASCII(c) && isalpha((int)(unsigned char)(c))) #define ISDIGIT(c) (ISASCII(c) && isdigit((int)(unsigned char)(c))) #define ISXDIGIT(c) (ISASCII(c) && isxdigit((int)(unsigned char)(c))) +#define TOUPPER(c) (ISASCII(c) ? toupper((int)(unsigned char)(c)) : (c)) +#define TOLOWER(c) (ISASCII(c) ? tolower((int)(unsigned char)(c)) : (c)) #endif mrb_value mrb_exc_new(mrb_state *mrb, struct RClass *c, const char *ptr, long len); |
