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
ec7475d8
Commit
ec7475d8
authored
Aug 05, 2017
by
Christopher Aue
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Prevented resizing just created hashes in specific size ranges
parent
0e5c3c4e
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
1 deletion
+2
-1
src/hash.c
src/hash.c
+2
-1
No files found.
src/hash.c
View file @
ec7475d8
...
...
@@ -145,7 +145,8 @@ mrb_hash_new_capa(mrb_state *mrb, mrb_int capa)
struct
RHash
*
h
;
h
=
(
struct
RHash
*
)
mrb_obj_alloc
(
mrb
,
MRB_TT_HASH
,
mrb
->
hash_class
);
h
->
ht
=
kh_init_size
(
ht
,
mrb
,
capa
);
/* khash needs 1/4 empty space so it is not resized immediately */
h
->
ht
=
kh_init_size
(
ht
,
mrb
,
capa
*
4
/
3
);
h
->
iv
=
0
;
return
mrb_obj_value
(
h
);
}
...
...
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