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
6dbc314a
Commit
6dbc314a
authored
Nov 26, 2015
by
Yukihiro "Matz" Matsumoto
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #3035 from iij/pr-yard-mrb_str_to_cstr
YARD doc for mrb_str_to_cstr.
parents
2fb12bd9
90b7ec88
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
13 additions
and
1 deletion
+13
-1
include/mruby/string.h
include/mruby/string.h
+13
-1
No files found.
include/mruby/string.h
View file @
6dbc314a
...
...
@@ -175,7 +175,19 @@ MRB_API mrb_value mrb_str_append(mrb_state *mrb, mrb_value str, mrb_value str2);
MRB_API
int
mrb_str_cmp
(
mrb_state
*
mrb
,
mrb_value
str1
,
mrb_value
str2
);
/*
* Returns a C string from a Ruby string.
* Returns a newly allocated C string from a Ruby string.
* This is an utility function to pass a Ruby string to C library functions.
*
* - Returned string does not contain any NUL characters (but terminator).
* - It raises an ArgumentError exception if Ruby string contains
* NUL characters.
* - Retured string will be freed automatically on next GC.
* - Caller can modify returned string without affecting Ruby string
* (e.g. it can be used for mkstemp(3)).
*
* @param [mrb_state *] mrb The current mruby state.
* @param [mrb_value] str Ruby string. Must be an instance of String.
* @return [char *] A newly allocated C string.
*/
MRB_API
char
*
mrb_str_to_cstr
(
mrb_state
*
mrb
,
mrb_value
str
);
...
...
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