ruby-changes:34719
From: hsbt <ko1@a...>
Date: Sun, 13 Jul 2014 17:32:39 +0900 (JST)
Subject: [ruby-changes:34719] hsbt:r46802 (trunk): * ext/gdbm/gdbm.c: fix wrong arguments in GetDBM2 macro.
hsbt 2014-07-13 17:32:32 +0900 (Sun, 13 Jul 2014) New Revision: 46802 http://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=revision&revision=46802 Log: * ext/gdbm/gdbm.c: fix wrong arguments in GetDBM2 macro. * ext/sdbm/init.c: ditto. Modified files: trunk/ChangeLog trunk/ext/gdbm/gdbm.c trunk/ext/sdbm/init.c Index: ChangeLog =================================================================== --- ChangeLog (revision 46801) +++ ChangeLog (revision 46802) @@ -1,3 +1,8 @@ https://github.com/ruby/ruby/blob/trunk/ChangeLog#L1 +Sun Jul 13 17:31:51 2014 SHIBATA Hiroshi <shibata.hiroshi@g...> + + * ext/gdbm/gdbm.c: fix wrong arguments in GetDBM2 macro. + * ext/sdbm/init.c: ditto. + Sun Jul 13 17:25:50 2014 SHIBATA Hiroshi <shibata.hiroshi@g...> * ext/dbm/dbm.c: fix wrong arguments in GetDBM2 macro by @v2e4lisp. Index: ext/sdbm/init.c =================================================================== --- ext/sdbm/init.c (revision 46801) +++ ext/sdbm/init.c (revision 46802) @@ -83,9 +83,9 @@ closed_sdbm() https://github.com/ruby/ruby/blob/trunk/ext/sdbm/init.c#L83 if ((dbmp)->di_dbm == 0) closed_sdbm();\ } 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 Index: ext/gdbm/gdbm.c =================================================================== --- ext/gdbm/gdbm.c (revision 46801) +++ ext/gdbm/gdbm.c (revision 46802) @@ -106,9 +106,9 @@ closed_dbm(void) https://github.com/ruby/ruby/blob/trunk/ext/gdbm/gdbm.c#L106 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 -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/