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
1e5b00e7
Commit
1e5b00e7
authored
May 01, 2013
by
h2so5
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Remove mrb_class_obj_get
parent
96637a77
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
17 additions
and
27 deletions
+17
-27
include/mruby.h
include/mruby.h
+16
-17
src/range.c
src/range.c
+1
-1
src/variable.c
src/variable.c
+0
-9
No files found.
include/mruby.h
View file @
1e5b00e7
...
...
@@ -161,7 +161,6 @@ struct RClass * mrb_class_new(mrb_state *mrb, struct RClass *super);
struct
RClass
*
mrb_module_new
(
mrb_state
*
mrb
);
int
mrb_class_defined
(
mrb_state
*
mrb
,
const
char
*
name
);
struct
RClass
*
mrb_class_get
(
mrb_state
*
mrb
,
const
char
*
name
);
struct
RClass
*
mrb_class_obj_get
(
mrb_state
*
mrb
,
const
char
*
name
);
mrb_value
mrb_obj_dup
(
mrb_state
*
mrb
,
mrb_value
obj
);
mrb_value
mrb_check_to_integer
(
mrb_state
*
mrb
,
mrb_value
val
,
const
char
*
method
);
...
...
@@ -308,22 +307,22 @@ void mrb_bug(const char *fmt, ...);
+ those E_* macros requires mrb_state* variable named mrb.
+ exception objects obtained from those macros are local to mrb
*/
#define E_RUNTIME_ERROR (mrb_class_
obj_
get(mrb, "RuntimeError"))
#define E_TYPE_ERROR (mrb_class_
obj_
get(mrb, "TypeError"))
#define E_ARGUMENT_ERROR (mrb_class_
obj_
get(mrb, "ArgumentError"))
#define E_INDEX_ERROR (mrb_class_
obj_
get(mrb, "IndexError"))
#define E_RANGE_ERROR (mrb_class_
obj_
get(mrb, "RangeError"))
#define E_NAME_ERROR (mrb_class_
obj_
get(mrb, "NameError"))
#define E_NOMETHOD_ERROR (mrb_class_
obj_
get(mrb, "NoMethodError"))
#define E_SCRIPT_ERROR (mrb_class_
obj_
get(mrb, "ScriptError"))
#define E_SYNTAX_ERROR (mrb_class_
obj_
get(mrb, "SyntaxError"))
#define E_LOCALJUMP_ERROR (mrb_class_
obj_
get(mrb, "LocalJumpError"))
#define E_REGEXP_ERROR (mrb_class_
obj_
get(mrb, "RegexpError"))
#define E_NOTIMP_ERROR (mrb_class_
obj_
get(mrb, "NotImplementedError"))
#define E_FLOATDOMAIN_ERROR (mrb_class_
obj_
get(mrb, "FloatDomainError"))
#define E_KEY_ERROR (mrb_class_
obj_
get(mrb, "KeyError"))
#define E_RUNTIME_ERROR (mrb_class_get(mrb, "RuntimeError"))
#define E_TYPE_ERROR (mrb_class_get(mrb, "TypeError"))
#define E_ARGUMENT_ERROR (mrb_class_get(mrb, "ArgumentError"))
#define E_INDEX_ERROR (mrb_class_get(mrb, "IndexError"))
#define E_RANGE_ERROR (mrb_class_get(mrb, "RangeError"))
#define E_NAME_ERROR (mrb_class_get(mrb, "NameError"))
#define E_NOMETHOD_ERROR (mrb_class_get(mrb, "NoMethodError"))
#define E_SCRIPT_ERROR (mrb_class_get(mrb, "ScriptError"))
#define E_SYNTAX_ERROR (mrb_class_get(mrb, "SyntaxError"))
#define E_LOCALJUMP_ERROR (mrb_class_get(mrb, "LocalJumpError"))
#define E_REGEXP_ERROR (mrb_class_get(mrb, "RegexpError"))
#define E_NOTIMP_ERROR (mrb_class_get(mrb, "NotImplementedError"))
#define E_FLOATDOMAIN_ERROR (mrb_class_get(mrb, "FloatDomainError"))
#define E_KEY_ERROR (mrb_class_get(mrb, "KeyError"))
mrb_value
mrb_yield
(
mrb_state
*
mrb
,
mrb_value
v
,
mrb_value
blk
);
mrb_value
mrb_yield_argv
(
mrb_state
*
mrb
,
mrb_value
b
,
int
argc
,
mrb_value
*
argv
);
...
...
src/range.c
View file @
1e5b00e7
...
...
@@ -9,7 +9,7 @@
#include "mruby/range.h"
#include "mruby/string.h"
#define RANGE_CLASS (mrb_class_
obj_
get(mrb, "Range"))
#define RANGE_CLASS (mrb_class_get(mrb, "Range"))
static
void
range_check
(
mrb_state
*
mrb
,
mrb_value
a
,
mrb_value
b
)
...
...
src/variable.c
View file @
1e5b00e7
...
...
@@ -1066,15 +1066,6 @@ mrb_attr_get(mrb_state *mrb, mrb_value obj, mrb_sym id)
return
mrb_iv_get
(
mrb
,
obj
,
id
);
}
struct
RClass
*
mrb_class_obj_get
(
mrb_state
*
mrb
,
const
char
*
name
)
{
mrb_value
mod
=
mrb_obj_value
(
mrb
->
object_class
);
mrb_sym
sym
=
mrb_intern
(
mrb
,
name
);
return
mrb_class_ptr
(
mrb_const_get
(
mrb
,
mod
,
sym
));
}
struct
csym_arg
{
struct
RClass
*
c
;
mrb_sym
sym
;
...
...
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