summaryrefslogtreecommitdiffhomepage
path: root/src/string.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/string.c')
-rw-r--r--src/string.c9
1 files changed, 2 insertions, 7 deletions
diff --git a/src/string.c b/src/string.c
index 1c577188e..e8c37180d 100644
--- a/src/string.c
+++ b/src/string.c
@@ -5,12 +5,7 @@
*/
#include <ctype.h>
-#ifndef SIZE_MAX
- /* Some versions of VC++
- * has SIZE_MAX in stdint.h
- */
-# include <limits.h>
-#endif
+#include <limits.h>
#include <stddef.h>
#include <stdlib.h>
#include <string.h>
@@ -1248,7 +1243,7 @@ mrb_str_include(mrb_state *mrb, mrb_value self)
mrb_bool include_p;
mrb_get_args(mrb, "o", &str2);
- if (mrb_type(str2) == MRB_TT_FIXNUM) {
+ if (mrb_fixnum_p(str2)) {
include_p = (memchr(RSTRING_PTR(self), mrb_fixnum(str2), RSTRING_LEN(self)) != NULL);
}
else {