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
8e428686
Commit
8e428686
authored
Jul 15, 2013
by
Jun Hiroe
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Repalace int with mrb_bool because a return value is boolean.
parent
18c167b8
Changes
11
Hide whitespace changes
Inline
Side-by-side
Showing
11 changed files
with
32 additions
and
32 deletions
+32
-32
include/mruby.h
include/mruby.h
+9
-9
include/mruby/string.h
include/mruby/string.h
+1
-1
mrbgems/mruby-bin-mirb/tools/mirb/mirb.c
mrbgems/mruby-bin-mirb/tools/mirb/mirb.c
+1
-1
mrbgems/mruby-range-ext/src/range.c
mrbgems/mruby-range-ext/src/range.c
+2
-2
src/class.c
src/class.c
+3
-3
src/codegen.c
src/codegen.c
+1
-1
src/kernel.c
src/kernel.c
+3
-3
src/object.c
src/object.c
+5
-5
src/range.c
src/range.c
+3
-3
src/string.c
src/string.c
+2
-2
src/symbol.c
src/symbol.c
+2
-2
No files found.
include/mruby.h
View file @
8e428686
...
@@ -176,13 +176,13 @@ void mrb_undef_class_method(mrb_state*, struct RClass*, const char*);
...
@@ -176,13 +176,13 @@ void mrb_undef_class_method(mrb_state*, struct RClass*, const char*);
mrb_value
mrb_instance_new
(
mrb_state
*
mrb
,
mrb_value
cv
);
mrb_value
mrb_instance_new
(
mrb_state
*
mrb
,
mrb_value
cv
);
struct
RClass
*
mrb_class_new
(
mrb_state
*
mrb
,
struct
RClass
*
super
);
struct
RClass
*
mrb_class_new
(
mrb_state
*
mrb
,
struct
RClass
*
super
);
struct
RClass
*
mrb_module_new
(
mrb_state
*
mrb
);
struct
RClass
*
mrb_module_new
(
mrb_state
*
mrb
);
int
mrb_class_defined
(
mrb_state
*
mrb
,
const
char
*
name
);
mrb_bool
mrb_class_defined
(
mrb_state
*
mrb
,
const
char
*
name
);
struct
RClass
*
mrb_class_get
(
mrb_state
*
mrb
,
const
char
*
name
);
struct
RClass
*
mrb_class_get
(
mrb_state
*
mrb
,
const
char
*
name
);
struct
RClass
*
mrb_class_get_under
(
mrb_state
*
mrb
,
struct
RClass
*
outer
,
const
char
*
name
);
struct
RClass
*
mrb_class_get_under
(
mrb_state
*
mrb
,
struct
RClass
*
outer
,
const
char
*
name
);
mrb_value
mrb_obj_dup
(
mrb_state
*
mrb
,
mrb_value
obj
);
mrb_value
mrb_obj_dup
(
mrb_state
*
mrb
,
mrb_value
obj
);
mrb_value
mrb_check_to_integer
(
mrb_state
*
mrb
,
mrb_value
val
,
const
char
*
method
);
mrb_value
mrb_check_to_integer
(
mrb_state
*
mrb
,
mrb_value
val
,
const
char
*
method
);
int
mrb_obj_respond_to
(
struct
RClass
*
c
,
mrb_sym
mid
);
mrb_bool
mrb_obj_respond_to
(
struct
RClass
*
c
,
mrb_sym
mid
);
struct
RClass
*
mrb_define_class_under
(
mrb_state
*
mrb
,
struct
RClass
*
outer
,
const
char
*
name
,
struct
RClass
*
super
);
struct
RClass
*
mrb_define_class_under
(
mrb_state
*
mrb
,
struct
RClass
*
outer
,
const
char
*
name
,
struct
RClass
*
super
);
struct
RClass
*
mrb_define_module_under
(
mrb_state
*
mrb
,
struct
RClass
*
outer
,
const
char
*
name
);
struct
RClass
*
mrb_define_module_under
(
mrb_state
*
mrb
,
struct
RClass
*
outer
,
const
char
*
name
);
...
@@ -264,13 +264,13 @@ void mrb_p(mrb_state*, mrb_value);
...
@@ -264,13 +264,13 @@ void mrb_p(mrb_state*, mrb_value);
mrb_int
mrb_obj_id
(
mrb_value
obj
);
mrb_int
mrb_obj_id
(
mrb_value
obj
);
mrb_sym
mrb_obj_to_sym
(
mrb_state
*
mrb
,
mrb_value
name
);
mrb_sym
mrb_obj_to_sym
(
mrb_state
*
mrb
,
mrb_value
name
);
int
mrb_obj_eq
(
mrb_state
*
,
mrb_value
,
mrb_value
);
mrb_bool
mrb_obj_eq
(
mrb_state
*
,
mrb_value
,
mrb_value
);
int
mrb_obj_equal
(
mrb_state
*
,
mrb_value
,
mrb_value
);
mrb_bool
mrb_obj_equal
(
mrb_state
*
,
mrb_value
,
mrb_value
);
int
mrb_equal
(
mrb_state
*
mrb
,
mrb_value
obj1
,
mrb_value
obj2
);
mrb_bool
mrb_equal
(
mrb_state
*
mrb
,
mrb_value
obj1
,
mrb_value
obj2
);
mrb_value
mrb_Integer
(
mrb_state
*
mrb
,
mrb_value
val
);
mrb_value
mrb_Integer
(
mrb_state
*
mrb
,
mrb_value
val
);
mrb_value
mrb_Float
(
mrb_state
*
mrb
,
mrb_value
val
);
mrb_value
mrb_Float
(
mrb_state
*
mrb
,
mrb_value
val
);
mrb_value
mrb_inspect
(
mrb_state
*
mrb
,
mrb_value
obj
);
mrb_value
mrb_inspect
(
mrb_state
*
mrb
,
mrb_value
obj
);
int
mrb_eql
(
mrb_state
*
mrb
,
mrb_value
obj1
,
mrb_value
obj2
);
mrb_bool
mrb_eql
(
mrb_state
*
mrb
,
mrb_value
obj1
,
mrb_value
obj2
);
void
mrb_garbage_collect
(
mrb_state
*
);
void
mrb_garbage_collect
(
mrb_state
*
);
void
mrb_incremental_gc
(
mrb_state
*
);
void
mrb_incremental_gc
(
mrb_state
*
);
...
@@ -292,7 +292,7 @@ const char * mrb_obj_classname(mrb_state *mrb, mrb_value obj);
...
@@ -292,7 +292,7 @@ const char * mrb_obj_classname(mrb_state *mrb, mrb_value obj);
struct
RClass
*
mrb_obj_class
(
mrb_state
*
mrb
,
mrb_value
obj
);
struct
RClass
*
mrb_obj_class
(
mrb_state
*
mrb
,
mrb_value
obj
);
mrb_value
mrb_class_path
(
mrb_state
*
mrb
,
struct
RClass
*
c
);
mrb_value
mrb_class_path
(
mrb_state
*
mrb
,
struct
RClass
*
c
);
mrb_value
mrb_convert_type
(
mrb_state
*
mrb
,
mrb_value
val
,
enum
mrb_vtype
type
,
const
char
*
tname
,
const
char
*
method
);
mrb_value
mrb_convert_type
(
mrb_state
*
mrb
,
mrb_value
val
,
enum
mrb_vtype
type
,
const
char
*
tname
,
const
char
*
method
);
int
mrb_obj_is_kind_of
(
mrb_state
*
mrb
,
mrb_value
obj
,
struct
RClass
*
c
);
mrb_bool
mrb_obj_is_kind_of
(
mrb_state
*
mrb
,
mrb_value
obj
,
struct
RClass
*
c
);
mrb_value
mrb_obj_inspect
(
mrb_state
*
mrb
,
mrb_value
self
);
mrb_value
mrb_obj_inspect
(
mrb_state
*
mrb
,
mrb_value
self
);
mrb_value
mrb_obj_clone
(
mrb_state
*
mrb
,
mrb_value
self
);
mrb_value
mrb_obj_clone
(
mrb_state
*
mrb
,
mrb_value
self
);
...
@@ -369,8 +369,8 @@ void mrb_define_global_const(mrb_state *mrb, const char *name, mrb_value val);
...
@@ -369,8 +369,8 @@ void mrb_define_global_const(mrb_state *mrb, const char *name, mrb_value val);
mrb_value
mrb_block_proc
(
void
);
mrb_value
mrb_block_proc
(
void
);
mrb_value
mrb_attr_get
(
mrb_state
*
mrb
,
mrb_value
obj
,
mrb_sym
id
);
mrb_value
mrb_attr_get
(
mrb_state
*
mrb
,
mrb_value
obj
,
mrb_sym
id
);
int
mrb_respond_to
(
mrb_state
*
mrb
,
mrb_value
obj
,
mrb_sym
mid
);
mrb_bool
mrb_respond_to
(
mrb_state
*
mrb
,
mrb_value
obj
,
mrb_sym
mid
);
int
mrb_obj_is_instance_of
(
mrb_state
*
mrb
,
mrb_value
obj
,
struct
RClass
*
c
);
mrb_bool
mrb_obj_is_instance_of
(
mrb_state
*
mrb
,
mrb_value
obj
,
struct
RClass
*
c
);
/* memory pool implementation */
/* memory pool implementation */
typedef
struct
mrb_pool
mrb_pool
;
typedef
struct
mrb_pool
mrb_pool
;
...
...
include/mruby/string.h
View file @
8e428686
...
@@ -57,7 +57,7 @@ mrb_value mrb_str_to_str(mrb_state *mrb, mrb_value str);
...
@@ -57,7 +57,7 @@ mrb_value mrb_str_to_str(mrb_state *mrb, mrb_value str);
mrb_int
mrb_str_hash
(
mrb_state
*
mrb
,
mrb_value
str
);
mrb_int
mrb_str_hash
(
mrb_state
*
mrb
,
mrb_value
str
);
mrb_value
mrb_str_buf_append
(
mrb_state
*
mrb
,
mrb_value
str
,
mrb_value
str2
);
mrb_value
mrb_str_buf_append
(
mrb_state
*
mrb
,
mrb_value
str
,
mrb_value
str2
);
mrb_value
mrb_str_inspect
(
mrb_state
*
mrb
,
mrb_value
str
);
mrb_value
mrb_str_inspect
(
mrb_state
*
mrb
,
mrb_value
str
);
int
mrb_str_equal
(
mrb_state
*
mrb
,
mrb_value
str1
,
mrb_value
str2
);
mrb_bool
mrb_str_equal
(
mrb_state
*
mrb
,
mrb_value
str1
,
mrb_value
str2
);
mrb_value
mrb_str_dump
(
mrb_state
*
mrb
,
mrb_value
str
);
mrb_value
mrb_str_dump
(
mrb_state
*
mrb
,
mrb_value
str
);
mrb_value
mrb_str_cat
(
mrb_state
*
mrb
,
mrb_value
str
,
const
char
*
ptr
,
size_t
len
);
mrb_value
mrb_str_cat
(
mrb_state
*
mrb
,
mrb_value
str
,
const
char
*
ptr
,
size_t
len
);
mrb_value
mrb_str_append
(
mrb_state
*
mrb
,
mrb_value
str
,
mrb_value
str2
);
mrb_value
mrb_str_append
(
mrb_state
*
mrb
,
mrb_value
str
,
mrb_value
str2
);
...
...
mrbgems/mruby-bin-mirb/tools/mirb/mirb.c
View file @
8e428686
...
@@ -38,7 +38,7 @@ p(mrb_state *mrb, mrb_value obj, int prompt)
...
@@ -38,7 +38,7 @@ p(mrb_state *mrb, mrb_value obj, int prompt)
/* Guess if the user might want to enter more
/* Guess if the user might want to enter more
* or if he wants an evaluation of his code now */
* or if he wants an evaluation of his code now */
int
mrb_bool
is_code_block_open
(
struct
mrb_parser_state
*
parser
)
is_code_block_open
(
struct
mrb_parser_state
*
parser
)
{
{
int
code_block_open
=
FALSE
;
int
code_block_open
=
FALSE
;
...
...
mrbgems/mruby-range-ext/src/range.c
View file @
8e428686
#include "mruby.h"
#include "mruby.h"
#include "mruby/range.h"
#include "mruby/range.h"
static
int
static
mrb_bool
r_le
(
mrb_state
*
mrb
,
mrb_value
a
,
mrb_value
b
)
r_le
(
mrb_state
*
mrb
,
mrb_value
a
,
mrb_value
b
)
{
{
mrb_value
r
=
mrb_funcall
(
mrb
,
a
,
"<=>"
,
1
,
b
);
/* compare result */
mrb_value
r
=
mrb_funcall
(
mrb
,
a
,
"<=>"
,
1
,
b
);
/* compare result */
...
@@ -15,7 +15,7 @@ r_le(mrb_state *mrb, mrb_value a, mrb_value b)
...
@@ -15,7 +15,7 @@ r_le(mrb_state *mrb, mrb_value a, mrb_value b)
return
FALSE
;
return
FALSE
;
}
}
static
int
static
mrb_bool
r_lt
(
mrb_state
*
mrb
,
mrb_value
a
,
mrb_value
b
)
r_lt
(
mrb_state
*
mrb
,
mrb_value
a
,
mrb_value
b
)
{
{
mrb_value
r
=
mrb_funcall
(
mrb
,
a
,
"<=>"
,
1
,
b
);
mrb_value
r
=
mrb_funcall
(
mrb
,
a
,
"<=>"
,
1
,
b
);
...
...
src/class.c
View file @
8e428686
...
@@ -203,7 +203,7 @@ mrb_vm_define_class(mrb_state *mrb, mrb_value outer, mrb_value super, mrb_sym id
...
@@ -203,7 +203,7 @@ mrb_vm_define_class(mrb_state *mrb, mrb_value outer, mrb_value super, mrb_sym id
return
c
;
return
c
;
}
}
int
mrb_bool
mrb_class_defined
(
mrb_state
*
mrb
,
const
char
*
name
)
mrb_class_defined
(
mrb_state
*
mrb
,
const
char
*
name
)
{
{
mrb_value
sym
=
mrb_check_intern_cstr
(
mrb
,
name
);
mrb_value
sym
=
mrb_check_intern_cstr
(
mrb
,
name
);
...
@@ -1172,7 +1172,7 @@ mrb_bob_missing(mrb_state *mrb, mrb_value mod)
...
@@ -1172,7 +1172,7 @@ mrb_bob_missing(mrb_state *mrb, mrb_value mod)
return
mrb_nil_value
();
return
mrb_nil_value
();
}
}
int
mrb_bool
mrb_obj_respond_to
(
struct
RClass
*
c
,
mrb_sym
mid
)
mrb_obj_respond_to
(
struct
RClass
*
c
,
mrb_sym
mid
)
{
{
khiter_t
k
;
khiter_t
k
;
...
@@ -1196,7 +1196,7 @@ mrb_obj_respond_to(struct RClass* c, mrb_sym mid)
...
@@ -1196,7 +1196,7 @@ mrb_obj_respond_to(struct RClass* c, mrb_sym mid)
return
FALSE
;
/* no method */
return
FALSE
;
/* no method */
}
}
int
mrb_bool
mrb_respond_to
(
mrb_state
*
mrb
,
mrb_value
obj
,
mrb_sym
mid
)
mrb_respond_to
(
mrb_state
*
mrb
,
mrb_value
obj
,
mrb_sym
mid
)
{
{
return
mrb_obj_respond_to
(
mrb_class
(
mrb
,
obj
),
mid
);
return
mrb_obj_respond_to
(
mrb_class
(
mrb
,
obj
),
mid
);
...
...
src/codegen.c
View file @
8e428686
...
@@ -683,7 +683,7 @@ scope_body(codegen_scope *s, node *tree)
...
@@ -683,7 +683,7 @@ scope_body(codegen_scope *s, node *tree)
return
idx
-
s
->
idx
;
return
idx
-
s
->
idx
;
}
}
static
int
static
mrb_bool
nosplat
(
node
*
t
)
nosplat
(
node
*
t
)
{
{
while
(
t
)
{
while
(
t
)
{
...
...
src/kernel.c
View file @
8e428686
...
@@ -26,7 +26,7 @@ typedef enum {
...
@@ -26,7 +26,7 @@ typedef enum {
NOEX_RESPONDS
=
0x80
NOEX_RESPONDS
=
0x80
}
mrb_method_flag_t
;
}
mrb_method_flag_t
;
int
mrb_bool
mrb_obj_basic_to_s_p
(
mrb_state
*
mrb
,
mrb_value
obj
)
mrb_obj_basic_to_s_p
(
mrb_state
*
mrb
,
mrb_value
obj
)
{
{
struct
RProc
*
me
=
mrb_method_search
(
mrb
,
mrb_class
(
mrb
,
obj
),
mrb_intern2
(
mrb
,
"to_s"
,
4
));
struct
RProc
*
me
=
mrb_method_search
(
mrb
,
mrb_class
(
mrb
,
obj
),
mrb_intern2
(
mrb
,
"to_s"
,
4
));
...
@@ -521,7 +521,7 @@ mrb_obj_instance_eval(mrb_state *mrb, mrb_value self)
...
@@ -521,7 +521,7 @@ mrb_obj_instance_eval(mrb_state *mrb, mrb_value self)
return
mrb_yield_internal
(
mrb
,
b
,
0
,
0
,
self
,
c
);
return
mrb_yield_internal
(
mrb
,
b
,
0
,
0
,
self
,
c
);
}
}
int
mrb_bool
mrb_obj_is_instance_of
(
mrb_state
*
mrb
,
mrb_value
obj
,
struct
RClass
*
c
)
mrb_obj_is_instance_of
(
mrb_state
*
mrb
,
mrb_value
obj
,
struct
RClass
*
c
)
{
{
if
(
mrb_obj_class
(
mrb
,
obj
)
==
c
)
return
TRUE
;
if
(
mrb_obj_class
(
mrb
,
obj
)
==
c
)
return
TRUE
;
...
@@ -938,7 +938,7 @@ mrb_obj_remove_instance_variable(mrb_state *mrb, mrb_value self)
...
@@ -938,7 +938,7 @@ mrb_obj_remove_instance_variable(mrb_state *mrb, mrb_value self)
return
val
;
return
val
;
}
}
static
inline
int
static
inline
mrb_bool
basic_obj_respond_to
(
mrb_state
*
mrb
,
mrb_value
obj
,
mrb_sym
id
,
int
pub
)
basic_obj_respond_to
(
mrb_state
*
mrb
,
mrb_value
obj
,
mrb_sym
id
,
int
pub
)
{
{
return
mrb_respond_to
(
mrb
,
obj
,
id
);
return
mrb_respond_to
(
mrb
,
obj
,
id
);
...
...
src/object.c
View file @
8e428686
...
@@ -11,7 +11,7 @@
...
@@ -11,7 +11,7 @@
#include "mruby/string.h"
#include "mruby/string.h"
#include "error.h"
#include "error.h"
int
mrb_bool
mrb_obj_eq
(
mrb_state
*
mrb
,
mrb_value
v1
,
mrb_value
v2
)
mrb_obj_eq
(
mrb_state
*
mrb
,
mrb_value
v1
,
mrb_value
v2
)
{
{
if
(
mrb_type
(
v1
)
!=
mrb_type
(
v2
))
return
FALSE
;
if
(
mrb_type
(
v1
)
!=
mrb_type
(
v2
))
return
FALSE
;
...
@@ -33,14 +33,14 @@ mrb_obj_eq(mrb_state *mrb, mrb_value v1, mrb_value v2)
...
@@ -33,14 +33,14 @@ mrb_obj_eq(mrb_state *mrb, mrb_value v1, mrb_value v2)
}
}
}
}
int
mrb_bool
mrb_obj_equal
(
mrb_state
*
mrb
,
mrb_value
v1
,
mrb_value
v2
)
mrb_obj_equal
(
mrb_state
*
mrb
,
mrb_value
v1
,
mrb_value
v2
)
{
{
/* temporary definition */
/* temporary definition */
return
mrb_obj_eq
(
mrb
,
v1
,
v2
);
return
mrb_obj_eq
(
mrb
,
v1
,
v2
);
}
}
int
mrb_bool
mrb_equal
(
mrb_state
*
mrb
,
mrb_value
obj1
,
mrb_value
obj2
)
mrb_equal
(
mrb_state
*
mrb
,
mrb_value
obj1
,
mrb_value
obj2
)
{
{
mrb_value
result
;
mrb_value
result
;
...
@@ -468,7 +468,7 @@ mrb_any_to_s(mrb_state *mrb, mrb_value obj)
...
@@ -468,7 +468,7 @@ mrb_any_to_s(mrb_state *mrb, mrb_value obj)
* b.kind_of? M #=> true
* b.kind_of? M #=> true
*/
*/
int
mrb_bool
mrb_obj_is_kind_of
(
mrb_state
*
mrb
,
mrb_value
obj
,
struct
RClass
*
c
)
mrb_obj_is_kind_of
(
mrb_state
*
mrb
,
mrb_value
obj
,
struct
RClass
*
c
)
{
{
struct
RClass
*
cl
=
mrb_class
(
mrb
,
obj
);
struct
RClass
*
cl
=
mrb_class
(
mrb
,
obj
);
...
@@ -585,7 +585,7 @@ mrb_inspect(mrb_state *mrb, mrb_value obj)
...
@@ -585,7 +585,7 @@ mrb_inspect(mrb_state *mrb, mrb_value obj)
return
mrb_obj_as_string
(
mrb
,
mrb_funcall
(
mrb
,
obj
,
"inspect"
,
0
,
0
));
return
mrb_obj_as_string
(
mrb
,
mrb_funcall
(
mrb
,
obj
,
"inspect"
,
0
,
0
));
}
}
int
mrb_bool
mrb_eql
(
mrb_state
*
mrb
,
mrb_value
obj1
,
mrb_value
obj2
)
mrb_eql
(
mrb_state
*
mrb
,
mrb_value
obj1
,
mrb_value
obj2
)
{
{
if
(
mrb_obj_eq
(
mrb
,
obj1
,
obj2
))
return
TRUE
;
if
(
mrb_obj_eq
(
mrb
,
obj1
,
obj2
))
return
TRUE
;
...
...
src/range.c
View file @
8e428686
...
@@ -170,7 +170,7 @@ mrb_range_eq(mrb_state *mrb, mrb_value range)
...
@@ -170,7 +170,7 @@ mrb_range_eq(mrb_state *mrb, mrb_value range)
return
mrb_true_value
();
return
mrb_true_value
();
}
}
static
int
static
mrb_bool
r_le
(
mrb_state
*
mrb
,
mrb_value
a
,
mrb_value
b
)
r_le
(
mrb_state
*
mrb
,
mrb_value
a
,
mrb_value
b
)
{
{
mrb_value
r
=
mrb_funcall
(
mrb
,
a
,
"<=>"
,
1
,
b
);
/* compare result */
mrb_value
r
=
mrb_funcall
(
mrb
,
a
,
"<=>"
,
1
,
b
);
/* compare result */
...
@@ -184,7 +184,7 @@ r_le(mrb_state *mrb, mrb_value a, mrb_value b)
...
@@ -184,7 +184,7 @@ r_le(mrb_state *mrb, mrb_value a, mrb_value b)
return
FALSE
;
return
FALSE
;
}
}
static
int
static
mrb_bool
r_gt
(
mrb_state
*
mrb
,
mrb_value
a
,
mrb_value
b
)
r_gt
(
mrb_state
*
mrb
,
mrb_value
a
,
mrb_value
b
)
{
{
mrb_value
r
=
mrb_funcall
(
mrb
,
a
,
"<=>"
,
1
,
b
);
mrb_value
r
=
mrb_funcall
(
mrb
,
a
,
"<=>"
,
1
,
b
);
...
@@ -197,7 +197,7 @@ r_gt(mrb_state *mrb, mrb_value a, mrb_value b)
...
@@ -197,7 +197,7 @@ r_gt(mrb_state *mrb, mrb_value a, mrb_value b)
return
FALSE
;
return
FALSE
;
}
}
static
int
static
mrb_bool
r_ge
(
mrb_state
*
mrb
,
mrb_value
a
,
mrb_value
b
)
r_ge
(
mrb_state
*
mrb
,
mrb_value
a
,
mrb_value
b
)
{
{
mrb_value
r
=
mrb_funcall
(
mrb
,
a
,
"<=>"
,
1
,
b
);
/* compare result */
mrb_value
r
=
mrb_funcall
(
mrb
,
a
,
"<=>"
,
1
,
b
);
/* compare result */
...
...
src/string.c
View file @
8e428686
...
@@ -595,7 +595,7 @@ mrb_str_cmp_m(mrb_state *mrb, mrb_value str1)
...
@@ -595,7 +595,7 @@ mrb_str_cmp_m(mrb_state *mrb, mrb_value str1)
return
mrb_fixnum_value
(
result
);
return
mrb_fixnum_value
(
result
);
}
}
static
int
static
mrb_bool
str_eql
(
mrb_state
*
mrb
,
const
mrb_value
str1
,
const
mrb_value
str2
)
str_eql
(
mrb_state
*
mrb
,
const
mrb_value
str1
,
const
mrb_value
str2
)
{
{
const
mrb_int
len
=
RSTRING_LEN
(
str1
);
const
mrb_int
len
=
RSTRING_LEN
(
str1
);
...
@@ -606,7 +606,7 @@ str_eql(mrb_state *mrb, const mrb_value str1, const mrb_value str2)
...
@@ -606,7 +606,7 @@ str_eql(mrb_state *mrb, const mrb_value str1, const mrb_value str2)
return
FALSE
;
return
FALSE
;
}
}
int
mrb_bool
mrb_str_equal
(
mrb_state
*
mrb
,
mrb_value
str1
,
mrb_value
str2
)
mrb_str_equal
(
mrb_state
*
mrb
,
mrb_value
str1
,
mrb_value
str2
)
{
{
if
(
mrb_obj_equal
(
mrb
,
str1
,
str2
))
return
TRUE
;
if
(
mrb_obj_equal
(
mrb
,
str1
,
str2
))
return
TRUE
;
...
...
src/symbol.c
View file @
8e428686
...
@@ -251,7 +251,7 @@ sym_to_sym(mrb_state *mrb, mrb_value sym)
...
@@ -251,7 +251,7 @@ sym_to_sym(mrb_state *mrb, mrb_value sym)
#endif
#endif
#define is_identchar(c) (SIGN_EXTEND_CHAR(c)!=-1&&(ISALNUM(c) || (c) == '_'))
#define is_identchar(c) (SIGN_EXTEND_CHAR(c)!=-1&&(ISALNUM(c) || (c) == '_'))
static
int
static
mrb_bool
is_special_global_name
(
const
char
*
m
)
is_special_global_name
(
const
char
*
m
)
{
{
switch
(
*
m
)
{
switch
(
*
m
)
{
...
@@ -274,7 +274,7 @@ is_special_global_name(const char* m)
...
@@ -274,7 +274,7 @@ is_special_global_name(const char* m)
return
!*
m
;
return
!*
m
;
}
}
static
int
static
mrb_bool
symname_p
(
const
char
*
name
)
symname_p
(
const
char
*
name
)
{
{
const
char
*
m
=
name
;
const
char
*
m
=
name
;
...
...
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