From 3caee4843407512e74c1893ada956c54d8dc8e4e Mon Sep 17 00:00:00 2001 From: hsbt Date: Sun, 13 Jul 2014 08:29:09 +0000 Subject: [PATCH] * ext/dbm/dbm.c: fix wrong arguments in GetDBM2 macro by @v2e4lisp. [fix GH-655] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@46801 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- ChangeLog | 5 +++++ ext/dbm/dbm.c | 6 +++--- 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/ChangeLog b/ChangeLog index 59058d5e1c..c7be9d9aee 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +Sun Jul 13 17:25:50 2014 SHIBATA Hiroshi + + * ext/dbm/dbm.c: fix wrong arguments in GetDBM2 macro by @v2e4lisp. + [fix GH-655] + Sun Jul 13 16:44:56 2014 Eric Wong * vm_core.h (struct rb_call_info_struct): improve packing diff --git a/ext/dbm/dbm.c b/ext/dbm/dbm.c index ae31232cb6..527d6518d0 100644 --- a/ext/dbm/dbm.c +++ b/ext/dbm/dbm.c @@ -51,9 +51,9 @@ closed_dbm(void) if ((dbmp)->di_dbm == 0) closed_dbm();\ } while (0) -#define GetDBM2(obj, data, dbm) do {\ - GetDBM((obj), (data));\ - (dbm) = dbmp->di_dbm;\ +#define GetDBM2(obj, dbmp, dbm) do {\ + GetDBM((obj), (dbmp));\ + (dbm) = (dbmp)->di_dbm;\ } while (0) static void