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
90b7ec88
Commit
90b7ec88
authored
Nov 24, 2015
by
Tomoyuki Sahara
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
YARD doc for mrb_str_to_cstr.
parent
625a3fee
Changes
1
Hide 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 @
90b7ec88
...
...
@@ -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