1
0
mirror of https://github.com/sqlite/sqlite.git synced 2025-11-09 14:21:03 +03:00

The sqlite3_value object now carries an sqlite3* pointer to use for

recording malloc failures.  This eliminates the need to pass sqlite3*
pointers into many internal interfaces.  Also added more mutexing. (CVS 4263)

FossilOrigin-Name: 9287276191a582c1cf7cf6b71d8399727d8e534d
This commit is contained in:
drh
2007-08-21 19:33:56 +00:00
parent e30f442622
commit b21c8cd4f6
26 changed files with 397 additions and 307 deletions

View File

@@ -14,7 +14,7 @@
** This file contains functions for allocating memory, comparing
** strings, and stuff like that.
**
** $Id: util.c,v 1.210 2007/08/21 10:44:16 drh Exp $
** $Id: util.c,v 1.211 2007/08/21 19:33:57 drh Exp $
*/
#include "sqliteInt.h"
#include <stdarg.h>
@@ -51,9 +51,9 @@ void sqlite3Error(sqlite3 *db, int err_code, const char *zFormat, ...){
va_start(ap, zFormat);
z = sqlite3VMPrintf(db, zFormat, ap);
va_end(ap);
sqlite3ValueSetStr(db, db->pErr, -1, z, SQLITE_UTF8, sqlite3_free);
sqlite3ValueSetStr(db->pErr, -1, z, SQLITE_UTF8, sqlite3_free);
}else{
sqlite3ValueSetStr(db, db->pErr, 0, 0, SQLITE_UTF8, SQLITE_STATIC);
sqlite3ValueSetStr(db->pErr, 0, 0, SQLITE_UTF8, SQLITE_STATIC);
}
}
}