Skip to content

Commit 8b1668d

Browse files
committed
ext/soap: Use bool type instead of int type for functions_all field
1 parent 35cd1b6 commit 8b1668d

2 files changed

Lines changed: 7 additions & 7 deletions

File tree

‎ext/soap/php_soap.h‎

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

7676
struct _soap_functions {
7777
HashTable *ft;
78-
int functions_all;
78+
bool functions_all;
7979
} soap_functions;
8080

8181
struct _soap_class {

‎ext/soap/soap.c‎

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

10991099
service->version = version;
11001100
service->type = SOAP_FUNCTIONS;
1101-
service->soap_functions.functions_all = FALSE;
1101+
service->soap_functions.functions_all = false;
11021102
service->soap_functions.ft = zend_new_array(0);
11031103

11041104
SOAP_SERVER_BEGIN_CODE();
@@ -1236,7 +1236,7 @@ PHP_METHOD(SoapServer, getFunctions)
12361236
ft = &(Z_OBJCE(service->soap_object)->function_table);
12371237
} else if (service->type == SOAP_CLASS) {
12381238
ft = &service->soap_class.ce->function_table;
1239-
} else if (service->soap_functions.functions_all == TRUE) {
1239+
} else if (service->soap_functions.functions_all) {
12401240
ft = EG(function_table);
12411241
} else if (service->soap_functions.ft != NULL) {
12421242
zval *name;
@@ -1277,7 +1277,7 @@ PHP_METHOD(SoapServer, addFunction)
12771277
zval *tmp_function;
12781278

12791279
if (service->soap_functions.ft == NULL) {
1280-
service->soap_functions.functions_all = FALSE;
1280+
service->soap_functions.functions_all = false;
12811281
service->soap_functions.ft = zend_new_array(zend_hash_num_elements(Z_ARRVAL_P(function_name)));
12821282
}
12831283

@@ -1316,7 +1316,7 @@ PHP_METHOD(SoapServer, addFunction)
13161316
RETURN_THROWS();
13171317
}
13181318
if (service->soap_functions.ft == NULL) {
1319-
service->soap_functions.functions_all = FALSE;
1319+
service->soap_functions.functions_all = false;
13201320
service->soap_functions.ft = zend_new_array(0);
13211321
}
13221322

@@ -1335,7 +1335,7 @@ PHP_METHOD(SoapServer, addFunction)
13351335
efree(service->soap_functions.ft);
13361336
service->soap_functions.ft = NULL;
13371337
}
1338-
service->soap_functions.functions_all = TRUE;
1338+
service->soap_functions.functions_all = true;
13391339
} else {
13401340
zend_argument_value_error(1, "must be SOAP_FUNCTIONS_ALL when an integer is passed");
13411341
}
@@ -1620,7 +1620,7 @@ PHP_METHOD(SoapServer, handle)
16201620
}
16211621
function_table = &((Z_OBJCE_P(soap_obj))->function_table);
16221622
} else {
1623-
if (service->soap_functions.functions_all == TRUE) {
1623+
if (service->soap_functions.functions_all) {
16241624
function_table = EG(function_table);
16251625
} else {
16261626
function_table = service->soap_functions.ft;

0 commit comments

Comments
 (0)