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
265171a2
Commit
265171a2
authored
Dec 11, 2018
by
Yukihiro "Matz" Matsumoto
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Rename `ht_foreach_func` to `mrb_hash_foreach_func`.
parent
e935d20a
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
4 additions
and
4 deletions
+4
-4
include/mruby/hash.h
include/mruby/hash.h
+2
-2
src/hash.c
src/hash.c
+2
-2
No files found.
include/mruby/hash.h
View file @
265171a2
...
...
@@ -211,8 +211,8 @@ size_t mrb_gc_mark_hash_size(mrb_state*, struct RHash*);
void
mrb_gc_free_hash
(
mrb_state
*
,
struct
RHash
*
);
/* return non zero to break the loop */
typedef
int
(
ht
_foreach_func
)(
mrb_state
*
mrb
,
mrb_value
key
,
mrb_value
val
,
void
*
data
);
MRB_API
void
mrb_hash_foreach
(
mrb_state
*
mrb
,
struct
RHash
*
hash
,
ht
_foreach_func
*
func
,
void
*
p
);
typedef
int
(
mrb_hash
_foreach_func
)(
mrb_state
*
mrb
,
mrb_value
key
,
mrb_value
val
,
void
*
data
);
MRB_API
void
mrb_hash_foreach
(
mrb_state
*
mrb
,
struct
RHash
*
hash
,
mrb_hash
_foreach_func
*
func
,
void
*
p
);
MRB_END_DECL
...
...
src/hash.c
View file @
265171a2
...
...
@@ -498,7 +498,7 @@ ht_del(mrb_state *mrb, htable *t, mrb_value key, mrb_value *vp)
/* Iterates over the hash table. */
static
void
ht_foreach
(
mrb_state
*
mrb
,
htable
*
t
,
ht
_foreach_func
*
func
,
void
*
p
)
ht_foreach
(
mrb_state
*
mrb
,
htable
*
t
,
mrb_hash
_foreach_func
*
func
,
void
*
p
)
{
segment
*
seg
;
mrb_int
i
;
...
...
@@ -521,7 +521,7 @@ ht_foreach(mrb_state *mrb, htable *t, ht_foreach_func *func, void *p)
/* Iterates over the hash table. */
MRB_API
void
mrb_hash_foreach
(
mrb_state
*
mrb
,
struct
RHash
*
hash
,
ht
_foreach_func
*
func
,
void
*
p
)
mrb_hash_foreach
(
mrb_state
*
mrb
,
struct
RHash
*
hash
,
mrb_hash
_foreach_func
*
func
,
void
*
p
)
{
ht_foreach
(
mrb
,
hash
->
ht
,
func
,
p
);
}
...
...
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