mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
bigdecimal.c: refine macros
* ext/bigdecimal/bigdecimal.c (PUSH, SAVE): remove extra semicolons. * ext/bigdecimal/bigdecimal.c (GUARD_OBJ): add parentheses and make an expression instead of a statement. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@45002 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
71430123d3
commit
beb2d4c5a5
1 changed files with 3 additions and 3 deletions
|
@ -72,9 +72,9 @@ static ID id_eq;
|
|||
|
||||
/* MACRO's to guard objects from GC by keeping them in stack */
|
||||
#define ENTER(n) volatile VALUE RB_UNUSED_VAR(vStack[n]);int iStack=0
|
||||
#define PUSH(x) vStack[iStack++] = (VALUE)(x);
|
||||
#define SAVE(p) PUSH(p->obj);
|
||||
#define GUARD_OBJ(p,y) {p=y;SAVE(p);}
|
||||
#define PUSH(x) (vStack[iStack++] = (VALUE)(x))
|
||||
#define SAVE(p) PUSH((p)->obj)
|
||||
#define GUARD_OBJ(p,y) ((p)=(y), SAVE(p))
|
||||
|
||||
#define BASE_FIG RMPD_COMPONENT_FIGURES
|
||||
#define BASE RMPD_BASE
|
||||
|
|
Loading…
Add table
Reference in a new issue