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
fa3629b4
Commit
fa3629b4
authored
Aug 11, 2014
by
Yukihiro "Matz" Matsumoto
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #2527 from iij/pr-remove-mrb_str_bytesize
mrb_str_bytesize is a carbon copy of mrb_str_size. remove it.
parents
712ad32b
c4f5c247
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
2 additions
and
15 deletions
+2
-15
doc/language/Core.md
doc/language/Core.md
+1
-1
src/string.c
src/string.c
+1
-14
No files found.
doc/language/Core.md
View file @
fa3629b4
...
...
@@ -938,7 +938,7 @@ n/a | src/string.c | mrb_str_bytes
ISO Code | Source File | C Function
--- | --- | ---
n/a | src/string.c | mrb_str_
byte
size
n/a | src/string.c | mrb_str_size
#### capitalize
...
...
src/string.c
View file @
fa3629b4
...
...
@@ -424,19 +424,6 @@ mrb_str_plus_m(mrb_state *mrb, mrb_value self)
return
mrb_str_plus
(
mrb
,
self
,
str
);
}
/*
* call-seq:
* len = strlen(String("abcd"))
*
* Returns the length of string in bytes.
*/
static
mrb_value
mrb_str_bytesize
(
mrb_state
*
mrb
,
mrb_value
self
)
{
struct
RString
*
s
=
mrb_str_ptr
(
self
);
return
mrb_fixnum_value
(
RSTR_LEN
(
s
));
}
/* 15.2.10.5.26 */
/* 15.2.10.5.33 */
/*
...
...
@@ -2488,7 +2475,7 @@ mrb_init_string(mrb_state *mrb)
s
=
mrb
->
string_class
=
mrb_define_class
(
mrb
,
"String"
,
mrb
->
object_class
);
/* 15.2.10 */
MRB_SET_INSTANCE_TT
(
s
,
MRB_TT_STRING
);
mrb_define_method
(
mrb
,
s
,
"bytesize"
,
mrb_str_
bytesize
,
MRB_ARGS_NONE
());
mrb_define_method
(
mrb
,
s
,
"bytesize"
,
mrb_str_
size
,
MRB_ARGS_NONE
());
mrb_define_method
(
mrb
,
s
,
"<=>"
,
mrb_str_cmp_m
,
MRB_ARGS_REQ
(
1
));
/* 15.2.10.5.1 */
mrb_define_method
(
mrb
,
s
,
"=="
,
mrb_str_equal_m
,
MRB_ARGS_REQ
(
1
));
/* 15.2.10.5.2 */
...
...
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