Skip to content

Commit 249168b

Browse files
committed
ext/soap: Use bool type instead of int type for functions_all field
1 parent 8e7ff9a commit 249168b

File tree

2 files changed

+7
-7
lines changed

2 files changed

+7
-7
lines changed

ext/soap/php_soap.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@ struct _soapService {
7676

7777
struct _soap_functions {
7878
HashTable *ft;
79-
int functions_all;
79+
bool functions_all;
8080
} soap_functions;
8181

8282
struct _soap_class {

ext/soap/soap.c

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1008,7 +1008,7 @@ PHP_METHOD(SoapServer, __construct)
10081008

10091009
service->version = version;
10101010
service->type = SOAP_FUNCTIONS;
1011-
service->soap_functions.functions_all = FALSE;
1011+
service->soap_functions.functions_all = false;
10121012
service->soap_functions.ft = zend_new_array(0);
10131013

10141014
if (wsdl) {
@@ -1136,7 +1136,7 @@ PHP_METHOD(SoapServer, getFunctions)
11361136
ft = &(Z_OBJCE(service->soap_object)->function_table);
11371137
} else if (service->type == SOAP_CLASS) {
11381138
ft = &service->soap_class.ce->function_table;
1139-
} else if (service->soap_functions.functions_all == TRUE) {
1139+
} else if (service->soap_functions.functions_all) {
11401140
ft = EG(function_table);
11411141
} else if (service->soap_functions.ft != NULL) {
11421142
zval *name;
@@ -1177,7 +1177,7 @@ PHP_METHOD(SoapServer, addFunction)
11771177
zval *tmp_function;
11781178

11791179
if (service->soap_functions.ft == NULL) {
1180-
service->soap_functions.functions_all = FALSE;
1180+
service->soap_functions.functions_all = false;
11811181
service->soap_functions.ft = zend_new_array(zend_hash_num_elements(Z_ARRVAL_P(function_name)));
11821182
}
11831183

@@ -1216,7 +1216,7 @@ PHP_METHOD(SoapServer, addFunction)
12161216
RETURN_THROWS();
12171217
}
12181218
if (service->soap_functions.ft == NULL) {
1219-
service->soap_functions.functions_all = FALSE;
1219+
service->soap_functions.functions_all = false;
12201220
service->soap_functions.ft = zend_new_array(0);
12211221
}
12221222

@@ -1235,7 +1235,7 @@ PHP_METHOD(SoapServer, addFunction)
12351235
efree(service->soap_functions.ft);
12361236
service->soap_functions.ft = NULL;
12371237
}
1238-
service->soap_functions.functions_all = TRUE;
1238+
service->soap_functions.functions_all = true;
12391239
} else {
12401240
zend_argument_value_error(1, "must be SOAP_FUNCTIONS_ALL when an integer is passed");
12411241
}
@@ -1516,7 +1516,7 @@ PHP_METHOD(SoapServer, handle)
15161516
}
15171517
function_table = &((Z_OBJCE_P(soap_obj))->function_table);
15181518
} else {
1519-
if (service->soap_functions.functions_all == TRUE) {
1519+
if (service->soap_functions.functions_all) {
15201520
function_table = EG(function_table);
15211521
} else {
15221522
function_table = service->soap_functions.ft;

0 commit comments

Comments
 (0)