@@ -635,32 +635,30 @@ PHP_FUNCTION(xmlrpc_encode_request)
635
635
636
636
set_output_options (& out , out_opts ? out_opts : 0 );
637
637
638
- if (USED_RET ()) {
639
- xRequest = XMLRPC_RequestNew ();
638
+ xRequest = XMLRPC_RequestNew ();
640
639
641
- if (xRequest ) {
642
- XMLRPC_RequestSetOutputOptions (xRequest , & out .xmlrpc_out );
643
- if (method == NULL ) {
644
- XMLRPC_RequestSetRequestType (xRequest , xmlrpc_request_response );
645
- } else {
646
- XMLRPC_RequestSetMethodName (xRequest , method );
647
- XMLRPC_RequestSetRequestType (xRequest , xmlrpc_request_call );
648
- }
649
- if (Z_TYPE_P (vals ) != IS_NULL ) {
650
- XMLRPC_RequestSetData (xRequest , PHP_to_XMLRPC (vals ));
651
- }
640
+ if (xRequest ) {
641
+ XMLRPC_RequestSetOutputOptions (xRequest , & out .xmlrpc_out );
642
+ if (method == NULL ) {
643
+ XMLRPC_RequestSetRequestType (xRequest , xmlrpc_request_response );
644
+ } else {
645
+ XMLRPC_RequestSetMethodName (xRequest , method );
646
+ XMLRPC_RequestSetRequestType (xRequest , xmlrpc_request_call );
647
+ }
648
+ if (Z_TYPE_P (vals ) != IS_NULL ) {
649
+ XMLRPC_RequestSetData (xRequest , PHP_to_XMLRPC (vals ));
650
+ }
652
651
653
- outBuf = XMLRPC_REQUEST_ToXML (xRequest , 0 );
654
- if (outBuf ) {
655
- RETVAL_STRING (outBuf );
652
+ outBuf = XMLRPC_REQUEST_ToXML (xRequest , 0 );
653
+ if (outBuf ) {
654
+ RETVAL_STRING (outBuf );
656
655
#ifdef HAVE_XMLRPC_BUNDLED
657
- efree (outBuf );
656
+ efree (outBuf );
658
657
#else
659
- free (outBuf );
658
+ free (outBuf );
660
659
#endif
661
- }
662
- XMLRPC_RequestFree (xRequest , 1 );
663
660
}
661
+ XMLRPC_RequestFree (xRequest , 1 );
664
662
}
665
663
666
664
if (strcmp (out .xmlrpc_out .xml_elem_opts .encoding , ENCODING_DEFAULT ) != 0 ) {
@@ -681,25 +679,23 @@ PHP_FUNCTION(xmlrpc_encode)
681
679
RETURN_THROWS ();
682
680
}
683
681
684
- if (USED_RET ()) {
685
- /* convert native php type to xmlrpc type */
686
- xOut = PHP_to_XMLRPC (arg1 );
682
+ /* convert native php type to xmlrpc type */
683
+ xOut = PHP_to_XMLRPC (arg1 );
687
684
688
- /* generate raw xml from xmlrpc data */
689
- outBuf = XMLRPC_VALUE_ToXML (xOut , 0 );
685
+ /* generate raw xml from xmlrpc data */
686
+ outBuf = XMLRPC_VALUE_ToXML (xOut , 0 );
690
687
691
- if (xOut ) {
692
- if (outBuf ) {
693
- RETVAL_STRING (outBuf );
688
+ if (xOut ) {
689
+ if (outBuf ) {
690
+ RETVAL_STRING (outBuf );
694
691
#ifdef HAVE_XMLRPC_BUNDLED
695
- efree (outBuf );
692
+ efree (outBuf );
696
693
#else
697
- free (outBuf );
694
+ free (outBuf );
698
695
#endif
699
- }
700
- /* cleanup */
701
- XMLRPC_CleanupValue (xOut );
702
696
}
697
+ /* cleanup */
698
+ XMLRPC_CleanupValue (xOut );
703
699
}
704
700
}
705
701
/* }}} */
@@ -747,9 +743,7 @@ PHP_FUNCTION(xmlrpc_decode_request)
747
743
RETURN_THROWS ();
748
744
}
749
745
750
- if (USED_RET ()) {
751
- decode_request_worker (xml , xml_len , encoding_len ? encoding : NULL , method , return_value );
752
- }
746
+ decode_request_worker (xml , xml_len , encoding_len ? encoding : NULL , method , return_value );
753
747
}
754
748
/* }}} */
755
749
@@ -764,9 +758,7 @@ PHP_FUNCTION(xmlrpc_decode)
764
758
RETURN_THROWS ();
765
759
}
766
760
767
- if (USED_RET ()) {
768
- decode_request_worker (arg1 , arg1_len , arg2_len ? arg2 : NULL , NULL , return_value );
769
- }
761
+ decode_request_worker (arg1 , arg1_len , arg2_len ? arg2 : NULL , NULL , return_value );
770
762
}
771
763
/* }}} */
772
764
@@ -782,18 +774,16 @@ PHP_FUNCTION(xmlrpc_server_create)
782
774
RETURN_THROWS ();
783
775
}
784
776
785
- if (USED_RET ()) {
786
- xmlrpc_server_data * server ;
777
+ xmlrpc_server_data * server ;
787
778
788
- object_init_ex (return_value , xmlrpc_server_ce );
789
- server = Z_XMLRPC_SERVER_P (return_value );
779
+ object_init_ex (return_value , xmlrpc_server_ce );
780
+ server = Z_XMLRPC_SERVER_P (return_value );
790
781
791
- array_init (& server -> method_map );
792
- array_init (& server -> introspection_map );
793
- server -> server_ptr = XMLRPC_ServerCreate ();
782
+ array_init (& server -> method_map );
783
+ array_init (& server -> introspection_map );
784
+ server -> server_ptr = XMLRPC_ServerCreate ();
794
785
795
- XMLRPC_ServerRegisterIntrospectionCallback (server -> server_ptr , php_xmlrpc_introspection_callback );
796
- }
786
+ XMLRPC_ServerRegisterIntrospectionCallback (server -> server_ptr , php_xmlrpc_introspection_callback );
797
787
}
798
788
/* }}} */
799
789
@@ -1103,24 +1093,22 @@ PHP_FUNCTION(xmlrpc_parse_method_descriptions)
1103
1093
RETURN_THROWS ();
1104
1094
}
1105
1095
1106
- if (USED_RET ()) {
1107
- STRUCT_XMLRPC_ERROR err = {0 };
1108
- XMLRPC_VALUE xVal = XMLRPC_IntrospectionCreateDescription (arg1 , & err );
1109
- if (xVal ) {
1110
- XMLRPC_to_PHP (xVal , return_value );
1111
- /* dust, sweep, and mop */
1112
- XMLRPC_CleanupValue (xVal );
1096
+ STRUCT_XMLRPC_ERROR err = {0 };
1097
+ XMLRPC_VALUE xVal = XMLRPC_IntrospectionCreateDescription (arg1 , & err );
1098
+ if (xVal ) {
1099
+ XMLRPC_to_PHP (xVal , return_value );
1100
+ /* dust, sweep, and mop */
1101
+ XMLRPC_CleanupValue (xVal );
1102
+ } else {
1103
+ /* could not create description */
1104
+ if (err .xml_elem_error .parser_code ) {
1105
+ php_error_docref (NULL , E_WARNING , "XML parse error: [line %ld, column %ld, message: %s] Unable to create introspection data" ,
1106
+ err .xml_elem_error .column , err .xml_elem_error .line , err .xml_elem_error .parser_error );
1113
1107
} else {
1114
- /* could not create description */
1115
- if (err .xml_elem_error .parser_code ) {
1116
- php_error_docref (NULL , E_WARNING , "XML parse error: [line %ld, column %ld, message: %s] Unable to create introspection data" ,
1117
- err .xml_elem_error .column , err .xml_elem_error .line , err .xml_elem_error .parser_error );
1118
- } else {
1119
- php_error_docref (NULL , E_WARNING , "Invalid xml structure. Unable to create introspection data" );
1120
- }
1121
-
1122
- php_error_docref (NULL , E_WARNING , "XML parse error. no method description created" );
1108
+ php_error_docref (NULL , E_WARNING , "Invalid xml structure. Unable to create introspection data" );
1123
1109
}
1110
+
1111
+ php_error_docref (NULL , E_WARNING , "XML parse error. no method description created" );
1124
1112
}
1125
1113
}
1126
1114
/* }}} */
0 commit comments