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
ff42f8f4
Commit
ff42f8f4
authored
Jul 05, 2012
by
Yukihiro Matsumoto
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
move RDoc comments
parent
fbfef551
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
23 additions
and
35 deletions
+23
-35
include/mruby.h
include/mruby.h
+1
-1
src/etc.c
src/etc.c
+1
-28
src/kernel.c
src/kernel.c
+21
-6
No files found.
include/mruby.h
View file @
ff42f8f4
...
...
@@ -358,7 +358,7 @@ mrb_value mrb_top_self(mrb_state *);
mrb_value
mrb_run
(
mrb_state
*
,
struct
RProc
*
,
mrb_value
);
mrb_value
mrb_p
(
mrb_state
*
,
mrb_value
);
int
mrb_obj_id
(
mrb_value
obj
);
mrb_
int
mrb_obj_id
(
mrb_value
obj
);
mrb_sym
mrb_to_id
(
mrb_state
*
mrb
,
mrb_value
name
);
int
mrb_obj_equal
(
mrb_state
*
,
mrb_value
,
mrb_value
);
...
...
src/etc.c
View file @
ff42f8f4
...
...
@@ -126,34 +126,7 @@ mrb_block_proc(void)
return
mrb_nil_value
();
//proc_new(mrb_cProc, FALSE);
}
/*
* Document-method: __id__
* Document-method: object_id
*
* call-seq:
* obj.__id__ -> fixnum
* obj.object_id -> fixnum
*
* Returns an integer identifier for <i>obj</i>. The same number will
* be returned on all calls to <code>id</code> for a given object, and
* no two active objects will share an id.
* <code>Object#object_id</code> is a different concept from the
* <code>:name</code> notation, which returns the symbol id of
* <code>name</code>. Replaces the deprecated <code>Object#id</code>.
*/
/*
* call-seq:
* obj.hash -> fixnum
*
* Generates a <code>Fixnum</code> hash value for this object. This
* function must have the property that <code>a.eql?(b)</code> implies
* <code>a.hash == b.hash</code>. The hash value is used by class
* <code>Hash</code>. Any hash value that exceeds the capacity of a
* <code>Fixnum</code> will be truncated before being used.
*/
int
mrb_int
mrb_obj_id
(
mrb_value
obj
)
{
/*
...
...
src/kernel.c
View file @
ff42f8f4
...
...
@@ -207,14 +207,19 @@ mrb_equal_m(mrb_state *mrb, mrb_value self)
/* 15.3.1.3.3 */
/* 15.3.1.3.33 */
/*
* Document-method: __id__
* Document-method: object_id
*
* call-seq:
* obj.hash -> fixnum
* obj.__id__ -> fixnum
* obj.object_id -> fixnum
*
* Generates a <code>Fixnum</code> hash value for this object. This
* function must have the property that <code>a.eql?(b)</code> implies
* <code>a.hash == b.hash</code>. The hash value is used by class
* <code>Hash</code>. Any hash value that exceeds the capacity of a
* <code>Fixnum</code> will be truncated before being used.
* Returns an integer identifier for <i>obj</i>. The same number will
* be returned on all calls to <code>id</code> for a given object, and
* no two active objects will share an id.
* <code>Object#object_id</code> is a different concept from the
* <code>:name</code> notation, which returns the symbol id of
* <code>name</code>. Replaces the deprecated <code>Object#id</code>.
*/
static
mrb_value
mrb_obj_id_m
(
mrb_state
*
mrb
,
mrb_value
self
)
...
...
@@ -526,6 +531,16 @@ mrb_obj_extend_m(mrb_state *mrb, mrb_value self)
//mrb_f_global_variables(mrb_state *mrb, mrb_value self)
/* 15.3.1.3.15 */
/*
* call-seq:
* obj.hash -> fixnum
*
* Generates a <code>Fixnum</code> hash value for this object. This
* function must have the property that <code>a.eql?(b)</code> implies
* <code>a.hash == b.hash</code>. The hash value is used by class
* <code>Hash</code>. Any hash value that exceeds the capacity of a
* <code>Fixnum</code> will be truncated before being used.
*/
mrb_value
mrb_obj_hash
(
mrb_state
*
mrb
,
mrb_value
self
)
{
...
...
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