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

Continuing cleanup of memory register memory allocation handling.

FossilOrigin-Name: 2598aedc5dd2bac67e2e518a31f2803e469c2ba6
This commit is contained in:
drh
2014-09-16 21:54:11 +00:00
parent 8740a60016
commit 6b478bcd9e
4 changed files with 18 additions and 19 deletions

View File

@@ -314,10 +314,10 @@ SQLITE_NOINLINE int sqlite3VdbeMemTranslate(Mem *pMem, u8 desiredEnc){
*z = 0;
assert( (pMem->n+(desiredEnc==SQLITE_UTF8?1:2))<=len );
c = pMem->flags;
sqlite3VdbeMemRelease(pMem);
pMem->flags &= ~(MEM_Static|MEM_Dyn|MEM_Ephem);
pMem->flags = MEM_Str|MEM_Term|(c&MEM_AffMask);
pMem->enc = desiredEnc;
pMem->flags |= (MEM_Term);
pMem->z = (char*)zOut;
pMem->zMalloc = pMem->z;