@@ -3423,240 +3423,176 @@ void delete_sdl(sdl *handle)
34233423 }
34243424}
34253425
3426- static void delete_binding (zval * zv )
3426+ static void delete_binding_ex (zval * zv , bool persistent )
34273427{
34283428 sdlBindingPtr binding = Z_PTR_P (zv );
34293429
34303430 if (binding -> location ) {
3431- efree (binding -> location );
3431+ pefree (binding -> location , persistent );
34323432 }
34333433 if (binding -> name ) {
3434- efree (binding -> name );
3434+ pefree (binding -> name , persistent );
34353435 }
34363436
34373437 if (binding -> bindingType == BINDING_SOAP ) {
34383438 sdlSoapBindingPtr soapBind = binding -> bindingAttributes ;
34393439 if (soapBind ) {
3440- efree (soapBind );
3440+ pefree (soapBind , persistent );
34413441 }
34423442 }
3443- efree (binding );
3443+ pefree (binding , persistent );
34443444}
34453445
3446- static void delete_binding_persistent (zval * zv )
3446+ static void delete_binding (zval * zv )
34473447{
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);
34643449}
34653450
3466- static void delete_sdl_soap_binding_function_body ( sdlSoapBindingFunctionBody body )
3451+ static void delete_binding_persistent ( zval * zv )
34673452{
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);
34753454}
34763455
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 )
34783457{
34793458 if (body .ns ) {
3480- free (body .ns );
3459+ pefree (body .ns , persistent );
34813460 }
34823461 if (body .headers ) {
34833462 zend_hash_destroy (body .headers );
3484- free (body .headers );
3463+ pefree (body .headers , persistent );
34853464 }
34863465}
34873466
3488- static void delete_function (zval * zv )
3467+ static void delete_function_ex (zval * zv , bool persistent )
34893468{
34903469 sdlFunctionPtr function = Z_PTR_P (zv );
34913470
34923471 if (function -> functionName ) {
3493- efree (function -> functionName );
3472+ pefree (function -> functionName , persistent );
34943473 }
34953474 if (function -> requestName ) {
3496- efree (function -> requestName );
3475+ pefree (function -> requestName , persistent );
34973476 }
34983477 if (function -> responseName ) {
3499- efree (function -> responseName );
3478+ pefree (function -> responseName , persistent );
35003479 }
35013480 if (function -> requestParameters ) {
35023481 zend_hash_destroy (function -> requestParameters );
3503- efree (function -> requestParameters );
3482+ pefree (function -> requestParameters , persistent );
35043483 }
35053484 if (function -> responseParameters ) {
35063485 zend_hash_destroy (function -> responseParameters );
3507- efree (function -> responseParameters );
3486+ pefree (function -> responseParameters , persistent );
35083487 }
35093488 if (function -> faults ) {
35103489 zend_hash_destroy (function -> faults );
3511- efree (function -> faults );
3490+ pefree (function -> faults , persistent );
35123491 }
35133492
35143493 if (function -> bindingAttributes &&
35153494 function -> binding && function -> binding -> bindingType == BINDING_SOAP ) {
35163495 sdlSoapBindingFunctionPtr soapFunction = function -> bindingAttributes ;
35173496 if (soapFunction -> soapAction ) {
3518- efree (soapFunction -> soapAction );
3497+ pefree (soapFunction -> soapAction , persistent );
35193498 }
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 );
35233502 }
3524- efree (function );
3503+ pefree (function , persistent );
35253504}
35263505
3527- static void delete_function_persistent (zval * zv )
3506+ static void delete_function (zval * zv )
35283507{
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+ }
35523510
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);
35643514}
35653515
3566- static void delete_parameter (zval * zv )
3516+ static void delete_parameter_ex (zval * zv , bool persistent )
35673517{
35683518 sdlParamPtr param = Z_PTR_P (zv );
35693519 if (param -> paramName ) {
3570- efree (param -> paramName );
3520+ pefree (param -> paramName , persistent );
35713521 }
3572- efree (param );
3522+ pefree (param , persistent );
3523+ }
3524+
3525+ static void delete_parameter (zval * zv )
3526+ {
3527+ delete_parameter_ex (zv , false);
35733528}
35743529
35753530static void delete_parameter_persistent (zval * zv )
35763531{
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);
35823533}
35833534
3584- static void delete_header_int (sdlSoapBindingFunctionHeaderPtr hdr )
3535+ static void delete_header_int_ex (sdlSoapBindingFunctionHeaderPtr hdr , bool persistent )
35853536{
35863537 if (hdr -> name ) {
3587- efree (hdr -> name );
3538+ pefree (hdr -> name , persistent );
35883539 }
35893540 if (hdr -> ns ) {
3590- efree (hdr -> ns );
3541+ pefree (hdr -> ns , persistent );
35913542 }
35923543 if (hdr -> headerfaults ) {
35933544 zend_hash_destroy (hdr -> headerfaults );
3594- efree (hdr -> headerfaults );
3545+ pefree (hdr -> headerfaults , persistent );
35953546 }
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);
35973553}
35983554
35993555static void delete_header (zval * zv )
36003556{
3601- delete_header_int (Z_PTR_P (zv ));
3557+ sdlSoapBindingFunctionHeaderPtr hdr = Z_PTR_P (zv );
3558+ delete_header_int_ex (hdr , false);
36023559}
36033560
36043561static void delete_header_persistent (zval * zv )
36053562{
36063563 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);
36183565}
36193566
3620- static void delete_fault (zval * zv )
3567+ static void delete_fault_ex (zval * zv , bool persistent )
36213568{
36223569 sdlFaultPtr fault = Z_PTR_P (zv );
36233570 if (fault -> name ) {
3624- efree (fault -> name );
3571+ pefree (fault -> name , persistent );
36253572 }
36263573 if (fault -> details ) {
36273574 zend_hash_destroy (fault -> details );
3628- efree (fault -> details );
3575+ pefree (fault -> details , persistent );
36293576 }
36303577 if (fault -> bindingAttributes ) {
36313578 sdlSoapBindingFunctionFaultPtr binding = (sdlSoapBindingFunctionFaultPtr )fault -> bindingAttributes ;
36323579
36333580 if (binding -> ns ) {
3634- efree (binding -> ns );
3581+ pefree (binding -> ns , persistent );
36353582 }
3636- efree (fault -> bindingAttributes );
3583+ pefree (fault -> bindingAttributes , persistent );
36373584 }
3638- efree (fault );
3585+ pefree (fault , persistent );
36393586}
36403587
3641- static void delete_fault_persistent (zval * zv )
3588+ static void delete_fault (zval * zv )
36423589{
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+ }
36533592
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);
36603596}
36613597
36623598static void delete_document (zval * zv )
0 commit comments