@@ -3423,240 +3423,176 @@ void delete_sdl(sdl *handle)
3423
3423
}
3424
3424
}
3425
3425
3426
- static void delete_binding (zval * zv )
3426
+ static void delete_binding_ex (zval * zv , bool persistent )
3427
3427
{
3428
3428
sdlBindingPtr binding = Z_PTR_P (zv );
3429
3429
3430
3430
if (binding -> location ) {
3431
- efree (binding -> location );
3431
+ pefree (binding -> location , persistent );
3432
3432
}
3433
3433
if (binding -> name ) {
3434
- efree (binding -> name );
3434
+ pefree (binding -> name , persistent );
3435
3435
}
3436
3436
3437
3437
if (binding -> bindingType == BINDING_SOAP ) {
3438
3438
sdlSoapBindingPtr soapBind = binding -> bindingAttributes ;
3439
3439
if (soapBind ) {
3440
- efree (soapBind );
3440
+ pefree (soapBind , persistent );
3441
3441
}
3442
3442
}
3443
- efree (binding );
3443
+ pefree (binding , persistent );
3444
3444
}
3445
3445
3446
- static void delete_binding_persistent (zval * zv )
3446
+ static void delete_binding (zval * zv )
3447
3447
{
3448
- sdlBindingPtr binding = Z_PTR_P (zv );
3449
-
3450
- if (binding -> location ) {
3451
- free (binding -> location );
3452
- }
3453
- if (binding -> name ) {
3454
- free (binding -> name );
3455
- }
3456
-
3457
- if (binding -> bindingType == BINDING_SOAP ) {
3458
- sdlSoapBindingPtr soapBind = binding -> bindingAttributes ;
3459
- if (soapBind ) {
3460
- free (soapBind );
3461
- }
3462
- }
3463
- free (binding );
3448
+ delete_binding_ex (zv , false);
3464
3449
}
3465
3450
3466
- static void delete_sdl_soap_binding_function_body ( sdlSoapBindingFunctionBody body )
3451
+ static void delete_binding_persistent ( zval * zv )
3467
3452
{
3468
- if (body .ns ) {
3469
- efree (body .ns );
3470
- }
3471
- if (body .headers ) {
3472
- zend_hash_destroy (body .headers );
3473
- efree (body .headers );
3474
- }
3453
+ delete_binding_ex (zv , true);
3475
3454
}
3476
3455
3477
- static void delete_sdl_soap_binding_function_body_persistent (sdlSoapBindingFunctionBody body )
3456
+ static void delete_sdl_soap_binding_function_body (sdlSoapBindingFunctionBody body , bool persistent )
3478
3457
{
3479
3458
if (body .ns ) {
3480
- free (body .ns );
3459
+ pefree (body .ns , persistent );
3481
3460
}
3482
3461
if (body .headers ) {
3483
3462
zend_hash_destroy (body .headers );
3484
- free (body .headers );
3463
+ pefree (body .headers , persistent );
3485
3464
}
3486
3465
}
3487
3466
3488
- static void delete_function (zval * zv )
3467
+ static void delete_function_ex (zval * zv , bool persistent )
3489
3468
{
3490
3469
sdlFunctionPtr function = Z_PTR_P (zv );
3491
3470
3492
3471
if (function -> functionName ) {
3493
- efree (function -> functionName );
3472
+ pefree (function -> functionName , persistent );
3494
3473
}
3495
3474
if (function -> requestName ) {
3496
- efree (function -> requestName );
3475
+ pefree (function -> requestName , persistent );
3497
3476
}
3498
3477
if (function -> responseName ) {
3499
- efree (function -> responseName );
3478
+ pefree (function -> responseName , persistent );
3500
3479
}
3501
3480
if (function -> requestParameters ) {
3502
3481
zend_hash_destroy (function -> requestParameters );
3503
- efree (function -> requestParameters );
3482
+ pefree (function -> requestParameters , persistent );
3504
3483
}
3505
3484
if (function -> responseParameters ) {
3506
3485
zend_hash_destroy (function -> responseParameters );
3507
- efree (function -> responseParameters );
3486
+ pefree (function -> responseParameters , persistent );
3508
3487
}
3509
3488
if (function -> faults ) {
3510
3489
zend_hash_destroy (function -> faults );
3511
- efree (function -> faults );
3490
+ pefree (function -> faults , persistent );
3512
3491
}
3513
3492
3514
3493
if (function -> bindingAttributes &&
3515
3494
function -> binding && function -> binding -> bindingType == BINDING_SOAP ) {
3516
3495
sdlSoapBindingFunctionPtr soapFunction = function -> bindingAttributes ;
3517
3496
if (soapFunction -> soapAction ) {
3518
- efree (soapFunction -> soapAction );
3497
+ pefree (soapFunction -> soapAction , persistent );
3519
3498
}
3520
- delete_sdl_soap_binding_function_body (soapFunction -> input );
3521
- delete_sdl_soap_binding_function_body (soapFunction -> output );
3522
- efree (soapFunction );
3499
+ delete_sdl_soap_binding_function_body (soapFunction -> input , persistent );
3500
+ delete_sdl_soap_binding_function_body (soapFunction -> output , persistent );
3501
+ pefree (soapFunction , persistent );
3523
3502
}
3524
- efree (function );
3503
+ pefree (function , persistent );
3525
3504
}
3526
3505
3527
- static void delete_function_persistent (zval * zv )
3506
+ static void delete_function (zval * zv )
3528
3507
{
3529
- sdlFunctionPtr function = Z_PTR_P (zv );
3530
-
3531
- if (function -> functionName ) {
3532
- free (function -> functionName );
3533
- }
3534
- if (function -> requestName ) {
3535
- free (function -> requestName );
3536
- }
3537
- if (function -> responseName ) {
3538
- free (function -> responseName );
3539
- }
3540
- if (function -> requestParameters ) {
3541
- zend_hash_destroy (function -> requestParameters );
3542
- free (function -> requestParameters );
3543
- }
3544
- if (function -> responseParameters ) {
3545
- zend_hash_destroy (function -> responseParameters );
3546
- free (function -> responseParameters );
3547
- }
3548
- if (function -> faults ) {
3549
- zend_hash_destroy (function -> faults );
3550
- free (function -> faults );
3551
- }
3508
+ delete_function_ex (zv , false);
3509
+ }
3552
3510
3553
- if (function -> bindingAttributes &&
3554
- function -> binding && function -> binding -> bindingType == BINDING_SOAP ) {
3555
- sdlSoapBindingFunctionPtr soapFunction = function -> bindingAttributes ;
3556
- if (soapFunction -> soapAction ) {
3557
- free (soapFunction -> soapAction );
3558
- }
3559
- delete_sdl_soap_binding_function_body_persistent (soapFunction -> input );
3560
- delete_sdl_soap_binding_function_body_persistent (soapFunction -> output );
3561
- free (soapFunction );
3562
- }
3563
- free (function );
3511
+ static void delete_function_persistent (zval * zv )
3512
+ {
3513
+ delete_function_ex (zv , true);
3564
3514
}
3565
3515
3566
- static void delete_parameter (zval * zv )
3516
+ static void delete_parameter_ex (zval * zv , bool persistent )
3567
3517
{
3568
3518
sdlParamPtr param = Z_PTR_P (zv );
3569
3519
if (param -> paramName ) {
3570
- efree (param -> paramName );
3520
+ pefree (param -> paramName , persistent );
3571
3521
}
3572
- efree (param );
3522
+ pefree (param , persistent );
3523
+ }
3524
+
3525
+ static void delete_parameter (zval * zv )
3526
+ {
3527
+ delete_parameter_ex (zv , false);
3573
3528
}
3574
3529
3575
3530
static void delete_parameter_persistent (zval * zv )
3576
3531
{
3577
- sdlParamPtr param = Z_PTR_P (zv );
3578
- if (param -> paramName ) {
3579
- free (param -> paramName );
3580
- }
3581
- free (param );
3532
+ delete_parameter_ex (zv , true);
3582
3533
}
3583
3534
3584
- static void delete_header_int (sdlSoapBindingFunctionHeaderPtr hdr )
3535
+ static void delete_header_int_ex (sdlSoapBindingFunctionHeaderPtr hdr , bool persistent )
3585
3536
{
3586
3537
if (hdr -> name ) {
3587
- efree (hdr -> name );
3538
+ pefree (hdr -> name , persistent );
3588
3539
}
3589
3540
if (hdr -> ns ) {
3590
- efree (hdr -> ns );
3541
+ pefree (hdr -> ns , persistent );
3591
3542
}
3592
3543
if (hdr -> headerfaults ) {
3593
3544
zend_hash_destroy (hdr -> headerfaults );
3594
- efree (hdr -> headerfaults );
3545
+ pefree (hdr -> headerfaults , persistent );
3595
3546
}
3596
- efree (hdr );
3547
+ pefree (hdr , persistent );
3548
+ }
3549
+
3550
+ static void delete_header_int (sdlSoapBindingFunctionHeaderPtr hdr )
3551
+ {
3552
+ delete_header_int_ex (hdr , false);
3597
3553
}
3598
3554
3599
3555
static void delete_header (zval * zv )
3600
3556
{
3601
- delete_header_int (Z_PTR_P (zv ));
3557
+ sdlSoapBindingFunctionHeaderPtr hdr = Z_PTR_P (zv );
3558
+ delete_header_int_ex (hdr , false);
3602
3559
}
3603
3560
3604
3561
static void delete_header_persistent (zval * zv )
3605
3562
{
3606
3563
sdlSoapBindingFunctionHeaderPtr hdr = Z_PTR_P (zv );
3607
- if (hdr -> name ) {
3608
- free (hdr -> name );
3609
- }
3610
- if (hdr -> ns ) {
3611
- free (hdr -> ns );
3612
- }
3613
- if (hdr -> headerfaults ) {
3614
- zend_hash_destroy (hdr -> headerfaults );
3615
- free (hdr -> headerfaults );
3616
- }
3617
- free (hdr );
3564
+ delete_header_int_ex (hdr , true);
3618
3565
}
3619
3566
3620
- static void delete_fault (zval * zv )
3567
+ static void delete_fault_ex (zval * zv , bool persistent )
3621
3568
{
3622
3569
sdlFaultPtr fault = Z_PTR_P (zv );
3623
3570
if (fault -> name ) {
3624
- efree (fault -> name );
3571
+ pefree (fault -> name , persistent );
3625
3572
}
3626
3573
if (fault -> details ) {
3627
3574
zend_hash_destroy (fault -> details );
3628
- efree (fault -> details );
3575
+ pefree (fault -> details , persistent );
3629
3576
}
3630
3577
if (fault -> bindingAttributes ) {
3631
3578
sdlSoapBindingFunctionFaultPtr binding = (sdlSoapBindingFunctionFaultPtr )fault -> bindingAttributes ;
3632
3579
3633
3580
if (binding -> ns ) {
3634
- efree (binding -> ns );
3581
+ pefree (binding -> ns , persistent );
3635
3582
}
3636
- efree (fault -> bindingAttributes );
3583
+ pefree (fault -> bindingAttributes , persistent );
3637
3584
}
3638
- efree (fault );
3585
+ pefree (fault , persistent );
3639
3586
}
3640
3587
3641
- static void delete_fault_persistent (zval * zv )
3588
+ static void delete_fault (zval * zv )
3642
3589
{
3643
- sdlFaultPtr fault = Z_PTR_P (zv );
3644
- if (fault -> name ) {
3645
- free (fault -> name );
3646
- }
3647
- if (fault -> details ) {
3648
- zend_hash_destroy (fault -> details );
3649
- free (fault -> details );
3650
- }
3651
- if (fault -> bindingAttributes ) {
3652
- sdlSoapBindingFunctionFaultPtr binding = (sdlSoapBindingFunctionFaultPtr )fault -> bindingAttributes ;
3590
+ delete_fault_ex (zv , false);
3591
+ }
3653
3592
3654
- if (binding -> ns ) {
3655
- free (binding -> ns );
3656
- }
3657
- free (fault -> bindingAttributes );
3658
- }
3659
- free (fault );
3593
+ static void delete_fault_persistent (zval * zv )
3594
+ {
3595
+ delete_fault_ex (zv , true);
3660
3596
}
3661
3597
3662
3598
static void delete_document (zval * zv )
0 commit comments