Sisyphus repositório
Última atualização: 1 outubro 2023 | SRPMs: 18631 | Visitas: 37880105
en ru br
ALT Linux repositórios
S:20071018-alt3_24

Group :: Sistema/Bibliotecas
RPM: libsqlite3x

 Main   Changelog   Spec   Patches   Sources   Download   Gear   Bugs e FR  Repocop 

Patch: libsqlite3x-prep.patch
Download


--- sqlite3x_command.cpp.prep	2007-12-24 15:43:58.000000000 +0100
+++ sqlite3x_command.cpp	2007-12-24 15:47:31.000000000 +0100
@@ -47,9 +47,18 @@
 #if SQLITE3X_USE_WCHAR
 	sqlite3_command::sqlite3_command(sqlite3_connection &con, const std::wstring &sql) : con(con),stmt(0),refs(0),argc(0) {
 		const void *tail=NULL;
-		if(sqlite3_prepare16(con.db(), sql.data(), (int)sql.length()*2, &this->stmt, &tail)!=SQLITE_OK)
-			throw database_error(con);
-
+		int rc =
+#if (SQLITE_VERSION_NUMBER >= 3003009)
+                        sqlite3_prepare16_v2
+#else
+                        sqlite3_prepare16
+#endif
+			(con.db(), sql.data(), (int)sql.length()*2, &this->stmt, &tail);
+		if( SQLITE_OK != rc )
+		{
+			throw database_error("sqlite3_command::prepare failed. Reason=[%s]",
+					     sqlite3_errmsg( this->con.db() ) );
+		}
 		this->argc=sqlite3_column_count(this->stmt);
 	}
 #endif
@@ -58,7 +67,13 @@
 	{
 		if( this->stmt ) this->finalize();
 		const char *tail=NULL;
-		int rc = sqlite3_prepare( this->con.db(), sql, len, &(this->stmt), &tail );
+		int rc =
+#if (SQLITE_VERSION_NUMBER >= 3003009)
+                        sqlite3_prepare_v2
+#else
+                        sqlite3_prepare
+#endif
+			( this->con.db(), sql, len, &(this->stmt), &tail );
 		if( SQLITE_OK != rc )
 		{
 			throw database_error("sqlite3_command::prepare([%s]) failed. Reason=[%s]",
 
projeto & código: Vladimir Lettiev aka crux © 2004-2005, Andrew Avramenko aka liks © 2007-2008
mantenedor atual: Michael Shigorin
mantenedor da tradução: Fernando Martini aka fmartini © 2009