mirror of
https://github.com/php/php-src.git
synced 2025-08-20 01:14:28 +02:00
Upgraded sqlite2 lib to 2.8.16
This commit is contained in:
parent
49cf0eff6a
commit
2195f7ec74
17 changed files with 270 additions and 189 deletions
|
|
@ -124,7 +124,7 @@ Expr *sqliteExprDup(Expr *p){
|
|||
if( pNew==0 ) return 0;
|
||||
memcpy(pNew, p, sizeof(*pNew));
|
||||
if( p->token.z!=0 ){
|
||||
pNew->token.z = sqliteStrDup(p->token.z);
|
||||
pNew->token.z = sqliteStrNDup(p->token.z, p->token.n);
|
||||
pNew->token.dyn = 1;
|
||||
}else{
|
||||
assert( pNew->token.z==0 );
|
||||
|
|
@ -155,7 +155,10 @@ ExprList *sqliteExprListDup(ExprList *p){
|
|||
if( pNew==0 ) return 0;
|
||||
pNew->nExpr = pNew->nAlloc = p->nExpr;
|
||||
pNew->a = pItem = sqliteMalloc( p->nExpr*sizeof(p->a[0]) );
|
||||
if( pItem==0 ) return 0; /* Leaks memory after a malloc failure */
|
||||
if( pItem==0 ){
|
||||
sqliteFree(pNew);
|
||||
return 0;
|
||||
}
|
||||
for(i=0; i<p->nExpr; i++, pItem++){
|
||||
Expr *pNewExpr, *pOldExpr;
|
||||
pItem->pExpr = pNewExpr = sqliteExprDup(pOldExpr = p->a[i].pExpr);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue