Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
M
mruby
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Libraries
mruby
Commits
8890a992
Commit
8890a992
authored
Apr 29, 2013
by
Yukihiro "Matz" Matsumoto
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
always use unsigned int as mrb_bool even in C++
parent
22469f3b
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
3 additions
and
11 deletions
+3
-11
include/mrbconf.h
include/mrbconf.h
+0
-10
include/mruby/value.h
include/mruby/value.h
+2
-0
src/string.c
src/string.c
+1
-1
No files found.
include/mrbconf.h
View file @
8890a992
...
@@ -132,18 +132,8 @@ typedef short mrb_sym;
...
@@ -132,18 +132,8 @@ typedef short mrb_sym;
# define PRIo64 "I64o"
# define PRIo64 "I64o"
# define PRIx64 "I64x"
# define PRIx64 "I64x"
# define PRIX64 "I64X"
# define PRIX64 "I64X"
# ifdef __cplusplus
typedef
bool
mrb_bool
;
# else
typedef
unsigned
int
mrb_bool
;
# endif
#else
#else
# include <inttypes.h>
# include <inttypes.h>
# ifdef __cplusplus
typedef
bool
mrb_bool
;
# else
typedef
_Bool
mrb_bool
;
# endif
#endif
#endif
#ifdef ENABLE_STDIO
#ifdef ENABLE_STDIO
...
...
include/mruby/value.h
View file @
8890a992
...
@@ -7,6 +7,8 @@
...
@@ -7,6 +7,8 @@
#ifndef MRUBY_VALUE_H
#ifndef MRUBY_VALUE_H
#define MRUBY_VALUE_H
#define MRUBY_VALUE_H
typedef
unsigned
int
mrb_bool
;
#ifndef MRB_NAN_BOXING
#ifndef MRB_NAN_BOXING
enum
mrb_vtype
{
enum
mrb_vtype
{
...
...
src/string.c
View file @
8890a992
...
@@ -1286,7 +1286,7 @@ mrb_str_include(mrb_state *mrb, mrb_value self)
...
@@ -1286,7 +1286,7 @@ mrb_str_include(mrb_state *mrb, mrb_value self)
mrb_get_args
(
mrb
,
"o"
,
&
str2
);
mrb_get_args
(
mrb
,
"o"
,
&
str2
);
if
(
mrb_type
(
str2
)
==
MRB_TT_FIXNUM
)
{
if
(
mrb_type
(
str2
)
==
MRB_TT_FIXNUM
)
{
include_p
=
memchr
(
RSTRING_PTR
(
self
),
mrb_fixnum
(
str2
),
RSTRING_LEN
(
self
)
);
include_p
=
(
memchr
(
RSTRING_PTR
(
self
),
mrb_fixnum
(
str2
),
RSTRING_LEN
(
self
))
!=
NULL
);
}
}
else
{
else
{
str2
=
mrb_str_to_str
(
mrb
,
str2
);
str2
=
mrb_str_to_str
(
mrb
,
str2
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment