mirror of
https://github.com/sqlite/sqlite.git
synced 2025-08-07 02:42:48 +03:00
Improved implementation of the destructor on pointer-passing interfaces.
FossilOrigin-Name: 601ad6795927fff8c3cc1711a2fd90912499573e94aa5bc8f18cbd4b89778f58
This commit is contained in:
@@ -201,8 +201,10 @@ unsigned int sqlite3_value_subtype(sqlite3_value *pVal){
|
||||
}
|
||||
void *sqlite3_value_pointer(sqlite3_value *pVal, const char *zPType){
|
||||
Mem *p = (Mem*)pVal;
|
||||
if( (p->flags&(MEM_AffMask|MEM_Pointer))==(MEM_Null|MEM_Pointer)
|
||||
if( (p->flags&(MEM_TypeMask|MEM_Term|MEM_Subtype)) ==
|
||||
(MEM_Null|MEM_Term|MEM_Subtype)
|
||||
&& zPType!=0
|
||||
&& p->eSubtype=='p'
|
||||
&& strcmp(p->u.zPType, zPType)==0
|
||||
){
|
||||
return (void*)p->z;
|
||||
|
Reference in New Issue
Block a user