mirror of
https://github.com/sqlite/sqlite.git
synced 2025-08-08 14:02:16 +03:00
Clarification on the best practices for using the _bytes() APIs.
Change sqlite3_value_blob() to force the representation to be purely a BLOB and not a dual BLOB/String. Ticket #2360. (CVS 4005) FossilOrigin-Name: cf2dd45b58380de7f3e167b5357848d12872caa3
This commit is contained in:
@@ -38,9 +38,9 @@ const void *sqlite3_value_blob(sqlite3_value *pVal){
|
||||
Mem *p = (Mem*)pVal;
|
||||
if( p->flags & (MEM_Blob|MEM_Str) ){
|
||||
sqlite3VdbeMemExpandBlob(p);
|
||||
if( (p->flags & MEM_Term)==0 ){
|
||||
p->flags &= ~MEM_Str;
|
||||
}
|
||||
p->flags &= ~MEM_Str;
|
||||
p->flags |= MEM_Blob;
|
||||
p->type = SQLITE_BLOB;
|
||||
return p->z;
|
||||
}else{
|
||||
return sqlite3_value_text(pVal);
|
||||
|
Reference in New Issue
Block a user