mirror of
https://github.com/mruby/mruby
synced 2026-06-08 16:11:16 +00:00
remove NUM2CHR macro
This commit is contained in:
@@ -302,11 +302,6 @@ void mrb_bug(const char *fmt, ...);
|
||||
|
||||
#define E_KEY_ERROR (mrb_class_obj_get(mrb, "KeyError"))
|
||||
|
||||
#define NUM2CHR_internal(x) (((mrb_type(x) == MRB_TT_STRING)&&(RSTRING_LEN(x)>=1))?\
|
||||
RSTRING_PTR(x)[0]:(char)(mrb_fixnum_number(x)&0xff))
|
||||
#ifdef __GNUC__
|
||||
# define NUM2CHR(x) __extension__ ({mrb_value num2chr_x = (x); NUM2CHR_internal(num2chr_x);})
|
||||
#else
|
||||
/* TODO: there is no definitions of RSTRING_* here, so cannot compile.
|
||||
static inline char
|
||||
NUM2CHR(mrb_value x)
|
||||
|
||||
Reference in New Issue
Block a user