bpo-9303: Migrate sqlite3 module to _v2 API to enhance performance (#359)


diff --git a/Modules/_sqlite/util.h b/Modules/_sqlite/util.h
index 88ea906..9106fca 100644
--- a/Modules/_sqlite/util.h
+++ b/Modules/_sqlite/util.h
@@ -39,4 +39,16 @@
 PyObject * _pysqlite_long_from_int64(sqlite_int64 value);
 sqlite_int64 _pysqlite_long_as_int64(PyObject * value);
 
+#if SQLITE_VERSION_NUMBER >= 3003009
+#define SQLITE3_PREPARE sqlite3_prepare_v2
+#else
+#define SQLITE3_PREPARE sqlite3_prepare
+#endif
+
+#if SQLITE_VERSION_NUMBER >= 3007014
+#define SQLITE3_CLOSE sqlite3_close_v2
+#else
+#define SQLITE3_CLOSE sqlite3_close
+#endif
+
 #endif