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
45305686
Commit
45305686
authored
May 18, 2014
by
yui-knk
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add a space aftre bracket.
parent
1f6d8d73
Changes
6
Show whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
9 additions
and
9 deletions
+9
-9
include/mruby/khash.h
include/mruby/khash.h
+1
-1
src/class.c
src/class.c
+4
-4
src/hash.c
src/hash.c
+1
-1
src/load.c
src/load.c
+1
-1
src/string.c
src/string.c
+1
-1
src/variable.c
src/variable.c
+1
-1
No files found.
include/mruby/khash.h
View file @
45305686
...
@@ -112,7 +112,7 @@ kh_fill_flags(uint8_t *p, uint8_t c, size_t len)
...
@@ -112,7 +112,7 @@ kh_fill_flags(uint8_t *p, uint8_t c, size_t len)
kh_alloc_##name(mrb, h); \
kh_alloc_##name(mrb, h); \
return h; \
return h; \
} \
} \
kh_##name##_t *kh_init_##name(mrb_state *mrb)
{
\
kh_##name##_t *kh_init_##name(mrb_state *mrb)
{
\
return kh_init_##name##_size(mrb, KHASH_DEFAULT_SIZE); \
return kh_init_##name##_size(mrb, KHASH_DEFAULT_SIZE); \
} \
} \
void kh_destroy_##name(mrb_state *mrb, kh_##name##_t *h) \
void kh_destroy_##name(mrb_state *mrb, kh_##name##_t *h) \
...
...
src/class.c
View file @
45305686
...
@@ -26,7 +26,7 @@ mrb_gc_mark_mt(mrb_state *mrb, struct RClass *c)
...
@@ -26,7 +26,7 @@ mrb_gc_mark_mt(mrb_state *mrb, struct RClass *c)
if
(
!
h
)
return
;
if
(
!
h
)
return
;
for
(
k
=
kh_begin
(
h
);
k
!=
kh_end
(
h
);
k
++
)
{
for
(
k
=
kh_begin
(
h
);
k
!=
kh_end
(
h
);
k
++
)
{
if
(
kh_exist
(
h
,
k
)){
if
(
kh_exist
(
h
,
k
))
{
struct
RProc
*
m
=
kh_value
(
h
,
k
);
struct
RProc
*
m
=
kh_value
(
h
,
k
);
if
(
m
)
{
if
(
m
)
{
mrb_gc_mark
(
mrb
,
(
struct
RBasic
*
)
m
);
mrb_gc_mark
(
mrb
,
(
struct
RBasic
*
)
m
);
...
@@ -747,7 +747,7 @@ mrb_include_module(mrb_state *mrb, struct RClass *c, struct RClass *m)
...
@@ -747,7 +747,7 @@ mrb_include_module(mrb_state *mrb, struct RClass *c, struct RClass *m)
if
(
c
!=
p
&&
p
->
tt
==
MRB_TT_CLASS
)
{
if
(
c
!=
p
&&
p
->
tt
==
MRB_TT_CLASS
)
{
superclass_seen
=
1
;
superclass_seen
=
1
;
}
}
else
if
(
p
->
mt
==
m
->
mt
){
else
if
(
p
->
mt
==
m
->
mt
)
{
if
(
p
->
tt
==
MRB_TT_ICLASS
&&
!
superclass_seen
)
{
if
(
p
->
tt
==
MRB_TT_ICLASS
&&
!
superclass_seen
)
{
ins_pos
=
p
;
ins_pos
=
p
;
}
}
...
@@ -1332,7 +1332,7 @@ mrb_class_new(mrb_state *mrb, struct RClass *super)
...
@@ -1332,7 +1332,7 @@ mrb_class_new(mrb_state *mrb, struct RClass *super)
mrb_check_inheritable
(
mrb
,
super
);
mrb_check_inheritable
(
mrb
,
super
);
}
}
c
=
boot_defclass
(
mrb
,
super
);
c
=
boot_defclass
(
mrb
,
super
);
if
(
super
){
if
(
super
)
{
MRB_SET_INSTANCE_TT
(
c
,
MRB_INSTANCE_TT
(
super
));
MRB_SET_INSTANCE_TT
(
c
,
MRB_INSTANCE_TT
(
super
));
}
}
make_metaclass
(
mrb
,
c
);
make_metaclass
(
mrb
,
c
);
...
@@ -1698,7 +1698,7 @@ mrb_mod_remove_cvar(mrb_state *mrb, mrb_value mod)
...
@@ -1698,7 +1698,7 @@ mrb_mod_remove_cvar(mrb_state *mrb, mrb_value mod)
val
=
mrb_iv_remove
(
mrb
,
mod
,
id
);
val
=
mrb_iv_remove
(
mrb
,
mod
,
id
);
if
(
!
mrb_undef_p
(
val
))
return
val
;
if
(
!
mrb_undef_p
(
val
))
return
val
;
if
(
mrb_cv_defined
(
mrb
,
mod
,
id
)){
if
(
mrb_cv_defined
(
mrb
,
mod
,
id
))
{
mrb_name_error
(
mrb
,
id
,
"cannot remove %S for %S"
,
mrb_name_error
(
mrb
,
id
,
"cannot remove %S for %S"
,
mrb_sym2str
(
mrb
,
id
),
mod
);
mrb_sym2str
(
mrb
,
id
),
mod
);
}
}
...
...
src/hash.c
View file @
45305686
...
@@ -739,7 +739,7 @@ mrb_hash_values(mrb_state *mrb, mrb_value hash)
...
@@ -739,7 +739,7 @@ mrb_hash_values(mrb_state *mrb, mrb_value hash)
if
(
!
h
)
return
mrb_ary_new
(
mrb
);
if
(
!
h
)
return
mrb_ary_new
(
mrb
);
ary
=
mrb_ary_new_capa
(
mrb
,
kh_size
(
h
));
ary
=
mrb_ary_new_capa
(
mrb
,
kh_size
(
h
));
for
(
k
=
kh_begin
(
h
);
k
!=
kh_end
(
h
);
k
++
)
{
for
(
k
=
kh_begin
(
h
);
k
!=
kh_end
(
h
);
k
++
)
{
if
(
kh_exist
(
h
,
k
)){
if
(
kh_exist
(
h
,
k
))
{
mrb_hash_value
hv
=
kh_value
(
h
,
k
);
mrb_hash_value
hv
=
kh_value
(
h
,
k
);
mrb_ary_set
(
mrb
,
ary
,
hv
.
n
,
hv
.
v
);
mrb_ary_set
(
mrb
,
ary
,
hv
.
n
,
hv
.
v
);
...
...
src/load.c
View file @
45305686
...
@@ -717,7 +717,7 @@ mrb_read_irep_file(mrb_state *mrb, FILE* fp)
...
@@ -717,7 +717,7 @@ mrb_read_irep_file(mrb_state *mrb, FILE* fp)
/* verify CRC */
/* verify CRC */
fpos
=
ftell
(
fp
);
fpos
=
ftell
(
fp
);
/* You don't need use SIZE_ERROR as block_size is enough small. */
/* You don't need use SIZE_ERROR as block_size is enough small. */
for
(
i
=
0
;
i
<
block_fallback_count
;
i
++
,
block_size
>>=
1
){
for
(
i
=
0
;
i
<
block_fallback_count
;
i
++
,
block_size
>>=
1
)
{
buf
=
(
uint8_t
*
)
mrb_malloc_simple
(
mrb
,
block_size
);
buf
=
(
uint8_t
*
)
mrb_malloc_simple
(
mrb
,
block_size
);
if
(
buf
)
break
;
if
(
buf
)
break
;
}
}
...
...
src/string.c
View file @
45305686
...
@@ -1821,7 +1821,7 @@ mrb_str_split_m(mrb_state *mrb, mrb_value str)
...
@@ -1821,7 +1821,7 @@ mrb_str_split_m(mrb_state *mrb, mrb_value str)
else
{
else
{
if
(
mrb_string_p
(
spat
))
{
if
(
mrb_string_p
(
spat
))
{
split_type
=
string
;
split_type
=
string
;
if
(
RSTRING_LEN
(
spat
)
==
1
&&
RSTRING_PTR
(
spat
)[
0
]
==
' '
){
if
(
RSTRING_LEN
(
spat
)
==
1
&&
RSTRING_PTR
(
spat
)[
0
]
==
' '
)
{
split_type
=
awk
;
split_type
=
awk
;
}
}
}
}
...
...
src/variable.c
View file @
45305686
...
@@ -353,7 +353,7 @@ iv_foreach(mrb_state *mrb, iv_tbl *t, iv_foreach_func *func, void *p)
...
@@ -353,7 +353,7 @@ iv_foreach(mrb_state *mrb, iv_tbl *t, iv_foreach_func *func, void *p)
if
(
h
)
{
if
(
h
)
{
for
(
k
=
kh_begin
(
h
);
k
!=
kh_end
(
h
);
k
++
)
{
for
(
k
=
kh_begin
(
h
);
k
!=
kh_end
(
h
);
k
++
)
{
if
(
kh_exist
(
h
,
k
)){
if
(
kh_exist
(
h
,
k
))
{
n
=
(
*
func
)(
mrb
,
kh_key
(
h
,
k
),
kh_value
(
h
,
k
),
p
);
n
=
(
*
func
)(
mrb
,
kh_key
(
h
,
k
),
kh_value
(
h
,
k
),
p
);
if
(
n
>
0
)
return
FALSE
;
if
(
n
>
0
)
return
FALSE
;
if
(
n
<
0
)
{
if
(
n
<
0
)
{
...
...
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