mirror of
https://github.com/mruby/mruby
synced 2026-06-08 16:11:16 +00:00
mrb_str_to_inum(): no need to call mrb_string_value_cstr() here; ref 05411ee
This commit is contained in:
+1
-7
@@ -2198,13 +2198,7 @@ mrb_str_to_inum(mrb_state *mrb, mrb_value str, mrb_int base, mrb_bool badcheck)
|
||||
const char *s;
|
||||
mrb_int len;
|
||||
|
||||
if (badcheck) {
|
||||
/* Raises if the string contains a null character (the badcheck) */
|
||||
s = mrb_string_value_cstr(mrb, &str);
|
||||
}
|
||||
else {
|
||||
s = mrb_string_value_ptr(mrb, str);
|
||||
}
|
||||
s = mrb_string_value_ptr(mrb, str);
|
||||
if (s) {
|
||||
len = RSTRING_LEN(str);
|
||||
if (s[len]) { /* no sentinel somehow */
|
||||
|
||||
Reference in New Issue
Block a user