1
0
mirror of https://github.com/sqlite/sqlite.git synced 2025-08-07 02:42:48 +03:00

Coverage improvements for malloc and vdbemem.c (CVS 1781)

FossilOrigin-Name: a98dd004c4d328eb44a71fecdbf8c5ab416dc524
This commit is contained in:
danielk1977
2004-06-30 11:54:06 +00:00
parent 376deb182a
commit 13073931a3
7 changed files with 77 additions and 96 deletions

View File

@@ -29,18 +29,10 @@ const void *sqlite3_value_blob(sqlite3_value *pVal){
}
}
int sqlite3_value_bytes(sqlite3_value *pVal){
Mem *p = (Mem*)pVal;
if( (p->flags & MEM_Blob)!=0 || sqlite3_value_text(pVal) ){
return p->n;
}
return 0;
return sqlite3ValueBytes(pVal, SQLITE_UTF8);
}
int sqlite3_value_bytes16(sqlite3_value *pVal){
Mem *p = (Mem*)pVal;
if( (p->flags & MEM_Blob)!=0 || sqlite3_value_text16(pVal) ){
return ((Mem *)pVal)->n;
}
return 0;
return sqlite3ValueBytes(pVal, SQLITE_UTF16NATIVE);
}
double sqlite3_value_double(sqlite3_value *pVal){
return sqlite3VdbeRealValue((Mem*)pVal);