diff options
author | Ilia Alshanetsky <iliaa@php.net> | 2005-09-26 19:31:41 +0000 |
---|---|---|
committer | Ilia Alshanetsky <iliaa@php.net> | 2005-09-26 19:31:41 +0000 |
commit | 94d1e563607f8aa9dee4e362d02e90b24db96aca (patch) | |
tree | 9bddb0952503e6baef4d0d6631cbfe6e3bfc032f /ext/pdo_sqlite/sqlite/src/util.c | |
parent | 74c7eb772384faf2e0c78e62f24f78fd875bf757 (diff) | |
download | php-git-94d1e563607f8aa9dee4e362d02e90b24db96aca.tar.gz |
Update bundled libsqlite3 to version 3.2.7
Diffstat (limited to 'ext/pdo_sqlite/sqlite/src/util.c')
-rw-r--r-- | ext/pdo_sqlite/sqlite/src/util.c | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/ext/pdo_sqlite/sqlite/src/util.c b/ext/pdo_sqlite/sqlite/src/util.c index a35a43fce3..de716d9820 100644 --- a/ext/pdo_sqlite/sqlite/src/util.c +++ b/ext/pdo_sqlite/sqlite/src/util.c @@ -367,6 +367,19 @@ char *sqlite3StrNDup(const char *z, int n){ #endif /* !defined(SQLITE_MEMDEBUG) */ /* +** Reallocate a buffer to a different size. This is similar to +** sqliteRealloc() except that if the allocation fails the buffer +** is freed. +*/ +void sqlite3ReallocOrFree(void **ppBuf, int newSize){ + void *pNew = sqliteRealloc(*ppBuf, newSize); + if( pNew==0 ){ + sqliteFree(*ppBuf); + } + *ppBuf = pNew; +} + +/* ** Create a string from the 2nd and subsequent arguments (up to the ** first NULL argument), store the string in memory obtained from ** sqliteMalloc() and make the pointer indicated by the 1st argument |