1
0
Fork 0
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:
nobu 2016-02-22 07:15:56 +00:00
parent f66f998241
commit 1656b70c0e

View file

@ -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;