452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
|
/*
** Resets the given URL object, deallocating any memory
** it uses.
*/
void url_reset(HQuery *p){
blob_reset(&p->url);
fossil_free(p->azName);
fossil_free(p->azValue);
url_initialize(p, p->zBase);
}
/*
** Add a fixed parameter to an HQuery. Or remove the parameters if zValue==0.
*/
void url_add_parameter(HQuery *p, const char *zName, const char *zValue){
|
|
|
|
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
|
/*
** Resets the given URL object, deallocating any memory
** it uses.
*/
void url_reset(HQuery *p){
blob_reset(&p->url);
fossil_free((void *)p->azName);
fossil_free((void *)p->azValue);
url_initialize(p, p->zBase);
}
/*
** Add a fixed parameter to an HQuery. Or remove the parameters if zValue==0.
*/
void url_add_parameter(HQuery *p, const char *zName, const char *zValue){
|
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
|
return;
}
}
assert( i==p->nParam );
if( zValue==0 ) return;
if( i>=p->nAlloc ){
p->nAlloc = p->nAlloc*2 + 10;
p->azName = fossil_realloc(p->azName, sizeof(p->azName[0])*p->nAlloc);
p->azValue = fossil_realloc(p->azValue, sizeof(p->azValue[0])*p->nAlloc);
}
p->azName[i] = zName;
p->azValue[i] = zValue;
p->nParam++;
}
/*
|
|
>
|
>
|
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
|
return;
}
}
assert( i==p->nParam );
if( zValue==0 ) return;
if( i>=p->nAlloc ){
p->nAlloc = p->nAlloc*2 + 10;
p->azName = fossil_realloc((void *)p->azName,
sizeof(p->azName[0])*p->nAlloc);
p->azValue = fossil_realloc((void *)p->azValue,
sizeof(p->azValue[0])*p->nAlloc);
}
p->azName[i] = zName;
p->azValue[i] = zValue;
p->nParam++;
}
/*
|