Author: cazfi
Date: Sun Jan 11 17:58:51 2015
New Revision: 27622

URL: http://svn.gna.org/viewcvs/freeciv?rev=27622&view=rev
Log:
Backported luasql commit: Use _v2 APIs for SQLite version 3.6.13 and above

See patch #5674

Modified:
    trunk/dependencies/luasql/Version
    trunk/dependencies/luasql/src/ls_sqlite3.c

Modified: trunk/dependencies/luasql/Version
URL: 
http://svn.gna.org/viewcvs/freeciv/trunk/dependencies/luasql/Version?rev=27622&r1=27621&r2=27622&view=diff
==============================================================================
--- trunk/dependencies/luasql/Version   (original)
+++ trunk/dependencies/luasql/Version   Sun Jan 11 17:58:51 2015
@@ -1,2 +1,5 @@
 Sources here are fron luasql git tag v2.3.0
 (https://github.com/keplerproject/luasql/tree/v2.3.0)
+
+Following commits since the release have been backported:
+7a099cfa0eb582bdf0e641bd8e869655ef8e7f02 Use _v2 APIs for SQLite version 
3.6.13 and above.

Modified: trunk/dependencies/luasql/src/ls_sqlite3.c
URL: 
http://svn.gna.org/viewcvs/freeciv/trunk/dependencies/luasql/src/ls_sqlite3.c?rev=27622&r1=27621&r2=27622&view=diff
==============================================================================
--- trunk/dependencies/luasql/src/ls_sqlite3.c  (original)
+++ trunk/dependencies/luasql/src/ls_sqlite3.c  Sun Jan 11 17:58:51 2015
@@ -382,7 +382,11 @@
   int numcols;
   const char *tail;
 
+#if SQLITE_VERSION_NUMBER > 3006013
+  res = sqlite3_prepare_v2(conn->sql_conn, statement, -1, &vm, &tail);
+#else
   res = sqlite3_prepare(conn->sql_conn, statement, -1, &vm, &tail);
+#endif
   if (res != SQLITE_OK)
     {
       errmsg = sqlite3_errmsg(conn->sql_conn);
@@ -544,7 +548,11 @@
 
   sourcename = luaL_checkstring(L, 2);
 
+#if SQLITE_VERSION_NUMBER > 3006013
+  res = sqlite3_open_v2(sourcename, &conn, SQLITE_OPEN_READWRITE | 
SQLITE_OPEN_CREATE, NULL);
+#else
   res = sqlite3_open(sourcename, &conn);
+#endif
   if (res != SQLITE_OK)
     {
       errmsg = sqlite3_errmsg(conn);


_______________________________________________
Freeciv-commits mailing list
Freeciv-commits@gna.org
https://mail.gna.org/listinfo/freeciv-commits

Reply via email to