[mono.data.sqlite] Using sqlite_close_v2 when available
[mono.git] / mcs / class / Mono.Data.Sqlite / Mono.Data.Sqlite_2.0 / UnsafeNativeMethods.cs
index bde7bdeb3dafee0e39a050753dff01fdc5887be8..4b440b951ed56cd07ede1b2c0f6aa3a3ebc21615 100644 (file)
@@ -30,6 +30,8 @@ namespace Mono.Data.Sqlite
     private const string SQLITE_DLL = "SQLite.Interop.DLL";\r
 #endif // USE_INTEROP_DLL\r
 \r
+#elif MONOTOUCH\r
+       private const string SQLITE_DLL = "/usr/lib/libsqlite3.dylib";\r
 #else\r
     private const string SQLITE_DLL = "sqlite3";\r
 #endif\r
@@ -133,6 +135,13 @@ namespace Mono.Data.Sqlite
     [DllImport(SQLITE_DLL)]\r
 #endif\r
     internal static extern int sqlite3_close(IntPtr db);\r
+               \r
+#if !PLATFORM_COMPACTFRAMEWORK\r
+    [DllImport(SQLITE_DLL, CallingConvention = CallingConvention.Cdecl)]\r
+#else\r
+    [DllImport(SQLITE_DLL)]\r
+#endif\r
+    internal static extern int sqlite3_close_v2(IntPtr db);\r
 \r
 #if !PLATFORM_COMPACTFRAMEWORK\r
     [DllImport(SQLITE_DLL, CallingConvention = CallingConvention.Cdecl)]\r