summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ChangeLog5
-rw-r--r--ext/gdbm/gdbm.c6
-rw-r--r--ext/sdbm/init.c6
3 files changed, 11 insertions, 6 deletions
diff --git a/ChangeLog b/ChangeLog
index c7be9d9..c427557 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+Sun Jul 13 17:31:51 2014 SHIBATA Hiroshi <shibata.hiroshi@gmail.com>
+
+ * 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@gmail.com>
* ext/dbm/dbm.c: fix wrong arguments in GetDBM2 macro by @v2e4lisp.
diff --git a/ext/gdbm/gdbm.c b/ext/gdbm/gdbm.c
index ff2638e..c3f228b9 100644
--- a/ext/gdbm/gdbm.c
+++ b/ext/gdbm/gdbm.c
@@ -106,9 +106,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
diff --git a/ext/sdbm/init.c b/ext/sdbm/init.c
index 596d954..f0e7aa5 100644
--- a/ext/sdbm/init.c
+++ b/ext/sdbm/init.c
@@ -83,9 +83,9 @@ closed_sdbm()
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