mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
internal.h: shortcut macros
* internal.h (RRATIONAL_SET_{NUM,DEN}): shortcut macros for internal only. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@53887 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
f66f998241
commit
1656b70c0e
1 changed files with 2 additions and 0 deletions
|
@ -390,6 +390,8 @@ struct RRational {
|
|||
};
|
||||
|
||||
#define RRATIONAL(obj) (R_CAST(RRational)(obj))
|
||||
#define RRATIONAL_SET_NUM(rat, n) RB_OBJ_WRITE((rat), &((struct RRational *)(rat))->num,(n))
|
||||
#define RRATIONAL_SET_DEN(rat, d) RB_OBJ_WRITE((rat), &((struct RRational *)(rat))->den,(d))
|
||||
|
||||
struct RFloat {
|
||||
struct RBasic basic;
|
||||
|
|
Loading…
Add table
Reference in a new issue