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
d90ccd7e
Commit
d90ccd7e
authored
May 31, 2015
by
Ralph Desir
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Update mruby.h.md
parent
4959e495
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
7 deletions
+8
-7
doc/api/mruby.h.md
doc/api/mruby.h.md
+8
-7
No files found.
doc/api/mruby.h.md
View file @
d90ccd7e
...
...
@@ -72,7 +72,7 @@ The passing variadic arguments must be a pointer of retrieving type.
```
C
MRB_API struct RClass *mrb_define_class(mrb_state *, const char*, struct RClass*);
```
Creat
es a new class. If you're creating a gem it may look something like this:
Defin
es a new class. If you're creating a gem it may look something like this:
```
C
void mrb_example_gem_init(mrb_state* mrb) {
...
...
@@ -90,7 +90,7 @@ void mrb_example_gem_final(mrb_state* mrb) {
MRB_API void mrb_define_method(mrb_state*, struct RClass*, const char*, mrb_func_t, mrb_aspec);
```
Creat
es a global function in ruby. If you're creating a gem it may look something like this:
Defin
es a global function in ruby. If you're creating a gem it may look something like this:
```
C
mrb_value example_method(mrb_state* mrb, mrb_value self){
...
...
@@ -131,7 +131,7 @@ void mrb_example_gem_final(mrb_state* mrb) {
MRB_API struct RClass *mrb_define_module(mrb_state *, const char*);
```
Creates a module in ruby
. If you're creating a gem it may look something like this:
Defines a module
. If you're creating a gem it may look something like this:
```
C
mrb_value example_method(mrb_state* mrb, mrb_value self){
...
...
@@ -198,11 +198,12 @@ void mrb_example_gem_final(mrb_state* mrb) {
}
```
### mrb_str_new_cstr
```
C
MRB_API mrb_value mrb_str_new_cstr(mrb_state*, const char*);
```
Turns a C string into a Ruby string value.
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