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
e2d31ba3
Commit
e2d31ba3
authored
Mar 12, 2013
by
Masaki Muranaka
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Rename STR_BUF_MIN_SIZE to MRB_STR_BUF_MIN_SIZE. Make it configurable.
parent
46d8c517
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
10 additions
and
4 deletions
+10
-4
include/mrbconf.h
include/mrbconf.h
+4
-0
include/mruby/string.h
include/mruby/string.h
+0
-2
src/string.c
src/string.c
+6
-2
No files found.
include/mrbconf.h
View file @
e2d31ba3
...
...
@@ -46,6 +46,10 @@
/* page size of memory pool */
//#define POOL_PAGE_SIZE 16000
/* initial minimum size for string buffer */
//#define MRB_STR_BUF_MIN_SIZE 128
/* -DDISABLE_XXXX to drop following features */
//#define DISABLE_STDIO /* use of stdio */
...
...
include/mruby/string.h
View file @
e2d31ba3
...
...
@@ -13,8 +13,6 @@ extern "C" {
#define IS_EVSTR(p,e) ((p) < (e) && (*(p) == '$' || *(p) == '@' || *(p) == '{'))
#define STR_BUF_MIN_SIZE 128
extern
const
char
mrb_digitmap
[];
typedef
struct
mrb_shared_string
{
...
...
src/string.c
View file @
e2d31ba3
...
...
@@ -156,6 +156,10 @@ mrb_str_new_empty(mrb_state *mrb, mrb_value str)
return
mrb_obj_value
(
s
);
}
#ifndef MRB_STR_BUF_MIN_SIZE
# define MRB_STR_BUF_MIN_SIZE 128
#endif
mrb_value
mrb_str_buf_new
(
mrb_state
*
mrb
,
int
capa
)
{
...
...
@@ -163,8 +167,8 @@ mrb_str_buf_new(mrb_state *mrb, int capa)
s
=
mrb_obj_alloc_string
(
mrb
);
if
(
capa
<
STR_BUF_MIN_SIZE
)
{
capa
=
STR_BUF_MIN_SIZE
;
if
(
capa
<
MRB_
STR_BUF_MIN_SIZE
)
{
capa
=
MRB_
STR_BUF_MIN_SIZE
;
}
s
->
len
=
0
;
s
->
aux
.
capa
=
capa
;
...
...
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