OSDN Git Service

DB_XSERIAL_COMPAT in ml-db.cc.
authorvisor <visor@users.sourceforge.jp>
Thu, 18 Apr 2013 09:35:44 +0000 (18:35 +0900)
committervisor <visor@users.sourceforge.jp>
Thu, 18 Apr 2013 09:35:44 +0000 (18:35 +0900)
modules/ml-db.cc

index 483a278..ef46152 100644 (file)
@@ -11,6 +11,8 @@
 #include <vector>
 #include <exception>
 
+#define DB_XSERIAL_COMPAT  1
+
 /*DOC:
 ==db module==
 
@@ -141,6 +143,9 @@ static MNode*  ml_db_sub (MNode* cell, MlEnv* mlenv, MLDb* obj, DBFUNC fn) {
        {CharConst ("limit"), false}, // 0
        {CharConst ("serial"), true}, // 1
        {CharConst ("on-error"), false}, // 2
+#ifdef DB_XSERIAL_COMPAT
+       {CharConst ("xserial"), true}, // 3
+#endif
        {NULL, 0, 0}
     };
 
@@ -156,6 +161,10 @@ static MNode*  ml_db_sub (MNode* cell, MlEnv* mlenv, MLDb* obj, DBFUNC fn) {
        fxserial = eval_bool (keywords[1], mlenv);
     if (keywords[2])
        errfn = eval (keywords[2], mlenv);
+#ifdef DB_XSERIAL_COMPAT
+    if (keywords[3])
+       fxserial = eval_bool (keywords[3], mlenv);
+#endif
 
     if (name.size () == 0)
        throw (uErrorFilenameEmpty);