diff options
Diffstat (limited to 'ext')
259 files changed, 1247 insertions, 1247 deletions
diff --git a/ext/bcmath/bcmath.c b/ext/bcmath/bcmath.c index 870749af50..0e6e201458 100644 --- a/ext/bcmath/bcmath.c +++ b/ext/bcmath/bcmath.c @@ -154,7 +154,7 @@ PHP_FUNCTION(bcadd) { zend_string *left, *right; zend_long scale_param; - zend_bool scale_param_is_null = 1; + bool scale_param_is_null = 1; bc_num first, second, result; int scale; @@ -205,7 +205,7 @@ PHP_FUNCTION(bcsub) { zend_string *left, *right; zend_long scale_param; - zend_bool scale_param_is_null = 1; + bool scale_param_is_null = 1; bc_num first, second, result; int scale; @@ -256,7 +256,7 @@ PHP_FUNCTION(bcmul) { zend_string *left, *right; zend_long scale_param; - zend_bool scale_param_is_null = 1; + bool scale_param_is_null = 1; bc_num first, second, result; int scale; @@ -307,7 +307,7 @@ PHP_FUNCTION(bcdiv) { zend_string *left, *right; zend_long scale_param; - zend_bool scale_param_is_null = 1; + bool scale_param_is_null = 1; bc_num first, second, result; int scale = BCG(bc_precision); @@ -363,7 +363,7 @@ PHP_FUNCTION(bcmod) { zend_string *left, *right; zend_long scale_param; - zend_bool scale_param_is_null = 1; + bool scale_param_is_null = 1; bc_num first, second, result; int scale = BCG(bc_precision); @@ -419,7 +419,7 @@ PHP_FUNCTION(bcpowmod) { zend_string *left, *right, *modulus; zend_long scale_param; - zend_bool scale_param_is_null = 1; + bool scale_param_is_null = 1; bc_num first, second, mod, result; int scale = BCG(bc_precision); @@ -478,7 +478,7 @@ PHP_FUNCTION(bcpow) { zend_string *left, *right; zend_long scale_param; - zend_bool scale_param_is_null = 1; + bool scale_param_is_null = 1; bc_num first, second, result; int scale = BCG(bc_precision); @@ -529,7 +529,7 @@ PHP_FUNCTION(bcsqrt) { zend_string *left; zend_long scale_param; - zend_bool scale_param_is_null = 1; + bool scale_param_is_null = 1; bc_num result; int scale = BCG(bc_precision); @@ -572,7 +572,7 @@ PHP_FUNCTION(bccomp) { zend_string *left, *right; zend_long scale_param; - zend_bool scale_param_is_null = 1; + bool scale_param_is_null = 1; bc_num first, second; int scale = BCG(bc_precision); @@ -618,7 +618,7 @@ PHP_FUNCTION(bccomp) PHP_FUNCTION(bcscale) { zend_long old_scale, new_scale; - zend_bool new_scale_is_null = 1; + bool new_scale_is_null = 1; ZEND_PARSE_PARAMETERS_START(0, 1) Z_PARAM_OPTIONAL diff --git a/ext/bz2/bz2.c b/ext/bz2/bz2.c index d83853aef9..5f6f37ff33 100644 --- a/ext/bz2/bz2.c +++ b/ext/bz2/bz2.c @@ -496,7 +496,7 @@ PHP_FUNCTION(bzdecompress) zend_string *dest; size_t source_len; int error; - zend_bool small = 0; + bool small = 0; #ifdef PHP_WIN32 unsigned __int64 size = 0; #else diff --git a/ext/calendar/cal_unix.c b/ext/calendar/cal_unix.c index f1740c86af..4a74170b51 100644 --- a/ext/calendar/cal_unix.c +++ b/ext/calendar/cal_unix.c @@ -28,7 +28,7 @@ PHP_FUNCTION(unixtojd) { time_t ts; zend_long tl = 0; - zend_bool tl_is_null = 1; + bool tl_is_null = 1; struct tm *ta, tmbuf; if (zend_parse_parameters(ZEND_NUM_ARGS(), "|l!", &tl, &tl_is_null) == FAILURE) { diff --git a/ext/calendar/calendar.c b/ext/calendar/calendar.c index 5dd4f1ef49..61ceecd6fc 100644 --- a/ext/calendar/calendar.c +++ b/ext/calendar/calendar.c @@ -474,7 +474,7 @@ static char *heb_number_to_chars(int n, int fl, char **ret) PHP_FUNCTION(jdtojewish) { zend_long julday, fl = 0; - zend_bool heb = 0; + bool heb = 0; int year, month, day; char *dayp, *yearp; diff --git a/ext/calendar/easter.c b/ext/calendar/easter.c index 291fd4a272..ffca84b8e6 100644 --- a/ext/calendar/easter.c +++ b/ext/calendar/easter.c @@ -28,7 +28,7 @@ static void _cal_easter(INTERNAL_FUNCTION_PARAMETERS, zend_long gm) struct tm te; zend_long year, golden, solar, lunar, pfm, dom, tmp, easter, result; zend_long method = CAL_EASTER_DEFAULT; - zend_bool year_is_null = 1; + bool year_is_null = 1; if (zend_parse_parameters(ZEND_NUM_ARGS(), "|l!l", &year, &year_is_null, &method) == FAILURE) { diff --git a/ext/com_dotnet/com_com.c b/ext/com_dotnet/com_com.c index 3282bd9e50..0c4a3d82ed 100644 --- a/ext/com_dotnet/com_com.c +++ b/ext/com_dotnet/com_com.c @@ -279,7 +279,7 @@ PHP_FUNCTION(com_get_active_object) char *module_name; size_t module_name_len; zend_long code_page; - zend_bool code_page_is_null = 1; + bool code_page_is_null = 1; IUnknown *unk = NULL; IDispatch *obj = NULL; HRESULT res; @@ -751,7 +751,7 @@ PHP_FUNCTION(com_print_typeinfo) char *ifacename = NULL; char *typelibname = NULL; size_t ifacelen; - zend_bool wantsink = 0; + bool wantsink = 0; php_com_dotnet_object *obj = NULL; ITypeInfo *typeinfo; @@ -814,7 +814,7 @@ PHP_FUNCTION(com_load_typelib) char *name; size_t namelen; ITypeLib *pTL = NULL; - zend_bool cs = TRUE; + bool cs = TRUE; int codepage = COMG(code_page); if (FAILURE == zend_parse_parameters(ZEND_NUM_ARGS(), "s|b", &name, &namelen, &cs)) { diff --git a/ext/com_dotnet/com_handlers.c b/ext/com_dotnet/com_handlers.c index fb4af4efec..c0e335a165 100644 --- a/ext/com_dotnet/com_handlers.c +++ b/ext/com_dotnet/com_handlers.c @@ -335,7 +335,7 @@ static zend_function *com_method_get(zend_object **object_ptr, zend_string *name f.arg_info = ecalloc(bindptr.lpfuncdesc->cParams, sizeof(zend_arg_info)); for (i = 0; i < bindptr.lpfuncdesc->cParams; i++) { - zend_bool by_ref = (bindptr.lpfuncdesc->lprgelemdescParam[i].paramdesc.wParamFlags & PARAMFLAG_FOUT) != 0; + bool by_ref = (bindptr.lpfuncdesc->lprgelemdescParam[i].paramdesc.wParamFlags & PARAMFLAG_FOUT) != 0; f.arg_info[i].type = (zend_type) ZEND_TYPE_INIT_NONE(_ZEND_ARG_INFO_FLAGS(by_ref, 0)); } diff --git a/ext/com_dotnet/com_persist.c b/ext/com_dotnet/com_persist.c index 3bde7175d8..bf0f7062fb 100644 --- a/ext/com_dotnet/com_persist.c +++ b/ext/com_dotnet/com_persist.c @@ -363,7 +363,7 @@ CPH_METHOD(SaveToFile) HRESULT res; char *filename, *fullpath = NULL; size_t filename_len; - zend_bool remember = TRUE; + bool remember = TRUE; OLECHAR *olefilename = NULL; CPH_FETCH(); diff --git a/ext/com_dotnet/php_com_dotnet.h b/ext/com_dotnet/php_com_dotnet.h index 025e1a7dd0..7a554d7268 100644 --- a/ext/com_dotnet/php_com_dotnet.h +++ b/ext/com_dotnet/php_com_dotnet.h @@ -36,13 +36,13 @@ PHP_RSHUTDOWN_FUNCTION(com_dotnet); PHP_MINFO_FUNCTION(com_dotnet); ZEND_BEGIN_MODULE_GLOBALS(com_dotnet) - zend_bool allow_dcom; - zend_bool autoreg_verbose; - zend_bool autoreg_on; - zend_bool autoreg_case_sensitive; + bool allow_dcom; + bool autoreg_verbose; + bool autoreg_on; + bool autoreg_case_sensitive; void *dotnet_runtime_stuff; /* opaque to avoid cluttering up other modules */ int code_page; /* default code_page if left unspecified */ - zend_bool rshutdown_started; + bool rshutdown_started; ZEND_END_MODULE_GLOBALS(com_dotnet) #if defined(ZTS) && defined(COMPILE_DL_COM_DOTNET) diff --git a/ext/curl/curl_private.h b/ext/curl/curl_private.h index 859a064dc8..bc6852198d 100644 --- a/ext/curl/curl_private.h +++ b/ext/curl/curl_private.h @@ -99,7 +99,7 @@ typedef struct { struct _php_curl_free *to_free; struct _php_curl_send_headers header; struct _php_curl_error err; - zend_bool in_callback; + bool in_callback; uint32_t* clone; zval postfields; /* For CURLOPT_PRIVATE */ diff --git a/ext/curl/interface.c b/ext/curl/interface.c index 5b2b974e88..39f7b7e5d0 100644 --- a/ext/curl/interface.c +++ b/ext/curl/interface.c @@ -2967,7 +2967,7 @@ PHP_FUNCTION(curl_getinfo) zval *zid; php_curl *ch; zend_long option; - zend_bool option_is_null = 1; + bool option_is_null = 1; ZEND_PARSE_PARAMETERS_START(1, 2) Z_PARAM_OBJECT_OF_CLASS(zid, curl_ce) diff --git a/ext/date/php_date.c b/ext/date/php_date.c index 8c0f5a62b1..4d739efc33 100644 --- a/ext/date/php_date.c +++ b/ext/date/php_date.c @@ -785,7 +785,7 @@ static void php_date(INTERNAL_FUNCTION_PARAMETERS, int localtime) { zend_string *format; zend_long ts; - zend_bool ts_is_null = 1; + bool ts_is_null = 1; ZEND_PARSE_PARAMETERS_START(1, 2) Z_PARAM_STR(format) @@ -941,7 +941,7 @@ PHP_FUNCTION(idate) { zend_string *format; zend_long ts; - zend_bool ts_is_null = 1; + bool ts_is_null = 1; int ret; ZEND_PARSE_PARAMETERS_START(1, 2) @@ -1012,7 +1012,7 @@ PHP_FUNCTION(strtotime) int parse_error, epoch_does_not_fit_in_zend_long; timelib_error_container *error; zend_long preset_ts, ts; - zend_bool preset_ts_is_null = 1; + bool preset_ts_is_null = 1; timelib_time *t, *now; timelib_tzinfo *tzi; @@ -1065,7 +1065,7 @@ PHP_FUNCTION(strtotime) PHPAPI void php_mktime(INTERNAL_FUNCTION_PARAMETERS, int gmt) { zend_long hou, min, sec, mon, day, yea; - zend_bool min_is_null = 1, sec_is_null = 1, mon_is_null = 1, day_is_null = 1, yea_is_null = 1; + bool min_is_null = 1, sec_is_null = 1, mon_is_null = 1, day_is_null = 1, yea_is_null = 1; timelib_time *now; timelib_tzinfo *tzi = NULL; zend_long ts, adjust_seconds = 0; @@ -1179,7 +1179,7 @@ PHPAPI void php_strftime(INTERNAL_FUNCTION_PARAMETERS, int gmt) { zend_string *format; zend_long timestamp; - zend_bool timestamp_is_null = 1; + bool timestamp_is_null = 1; struct tm ta; int max_reallocs = 5; size_t buf_len = 256, real_len; @@ -1300,8 +1300,8 @@ PHP_FUNCTION(time) PHP_FUNCTION(localtime) { zend_long timestamp; - zend_bool timestamp_is_null = 1; - zend_bool associative = 0; + bool timestamp_is_null = 1; + bool associative = 0; timelib_tzinfo *tzi; timelib_time *ts; @@ -1353,7 +1353,7 @@ PHP_FUNCTION(localtime) PHP_FUNCTION(getdate) { zend_long timestamp; - zend_bool timestamp_is_null = 1; + bool timestamp_is_null = 1; timelib_tzinfo *tzi; timelib_time *ts; @@ -3350,7 +3350,7 @@ PHP_FUNCTION(date_diff) zval *object1, *object2; php_date_obj *dateobj1, *dateobj2; php_interval_obj *interval; - zend_bool absolute = 0; + bool absolute = 0; if (zend_parse_method_parameters(ZEND_NUM_ARGS(), getThis(), "OO|b", &object1, date_ce_interface, &object2, date_ce_interface, &absolute) == FAILURE) { RETURN_THROWS(); @@ -4462,7 +4462,7 @@ PHP_FUNCTION(date_default_timezone_get) static void php_do_date_sunrise_sunset(INTERNAL_FUNCTION_PARAMETERS, int calc_sunset) { double latitude, longitude, zenith, gmt_offset, altitude; - zend_bool latitude_is_null = 1, longitude_is_null = 1, zenith_is_null = 1, gmt_offset_is_null = 1; + bool latitude_is_null = 1, longitude_is_null = 1, zenith_is_null = 1, gmt_offset_is_null = 1; double h_rise, h_set, N; timelib_sll rise, set, transit; zend_long time, retformat = SUNFUNCS_RET_STRING; diff --git a/ext/dba/dba.c b/ext/dba/dba.c index b7bfecc77c..ccf76d395b 100644 --- a/ext/dba/dba.c +++ b/ext/dba/dba.c @@ -542,8 +542,8 @@ static void php_dba_open(INTERNAL_FUNCTION_PARAMETERS, int persistent) zend_string *opened_path = NULL; char *lock_name; #ifdef PHP_WIN32 - zend_bool restarted = 0; - zend_bool need_creation = 0; + bool restarted = 0; + bool need_creation = 0; #endif if (ac < 2) { @@ -860,7 +860,7 @@ restart: fcntl(info->fd, F_SETFL, flags & ~O_APPEND); #elif defined(PHP_WIN32) } else if (modenr == DBA_CREAT && need_creation && !restarted) { - zend_bool close_both; + bool close_both; close_both = (info->fp != info->lock.fp); php_stream_close(info->lock.fp); @@ -1155,7 +1155,7 @@ PHP_FUNCTION(dba_sync) PHP_FUNCTION(dba_handlers) { dba_handler *hptr; - zend_bool full_info = 0; + bool full_info = 0; if (zend_parse_parameters(ZEND_NUM_ARGS(), "|b", &full_info) == FAILURE) { RETURN_THROWS(); diff --git a/ext/dba/dba_inifile.c b/ext/dba/dba_inifile.c index dd3d42290f..ec50aeba15 100644 --- a/ext/dba/dba_inifile.c +++ b/ext/dba/dba_inifile.c @@ -120,7 +120,7 @@ DBA_EXISTS_FUNC(inifile) DBA_DELETE_FUNC(inifile) { int res; - zend_bool found = 0; + bool found = 0; INIFILE_DATA; INIFILE_GKEY; diff --git a/ext/dba/libinifile/inifile.c b/ext/dba/libinifile/inifile.c index 43227c42d7..72f0ef4d9c 100644 --- a/ext/dba/libinifile/inifile.c +++ b/ext/dba/libinifile/inifile.c @@ -406,7 +406,7 @@ static int inifile_copy_to(inifile *dba, size_t pos_start, size_t pos_end, inifi /* {{{ inifile_filter * copy from to dba while ignoring key name (group must equal) */ -static int inifile_filter(inifile *dba, inifile *from, const key_type *key, zend_bool *found) +static int inifile_filter(inifile *dba, inifile *from, const key_type *key, bool *found) { size_t pos_start = 0, pos_next = 0, pos_curr; int ret = SUCCESS; @@ -418,7 +418,7 @@ static int inifile_filter(inifile *dba, inifile *from, const key_type *key, zend switch(inifile_key_cmp(&ln.key, key)) { case 0: if (found) { - *found = (zend_bool) 1; + *found = (bool) 1; } pos_curr = php_stream_tell(from->fp); if (pos_start != pos_next) { @@ -453,7 +453,7 @@ static int inifile_filter(inifile *dba, inifile *from, const key_type *key, zend /* }}} */ /* {{{ inifile_delete_replace_append */ -static int inifile_delete_replace_append(inifile *dba, const key_type *key, const val_type *value, int append, zend_bool *found) +static int inifile_delete_replace_append(inifile *dba, const key_type *key, const val_type *value, int append, bool *found) { size_t pos_grp_start=0, pos_grp_next; inifile *ini_tmp = NULL; @@ -562,7 +562,7 @@ int inifile_delete(inifile *dba, const key_type *key) /* }}} */ /* {{{ inifile_delete_ex */ -int inifile_delete_ex(inifile *dba, const key_type *key, zend_bool *found) +int inifile_delete_ex(inifile *dba, const key_type *key, bool *found) { return inifile_delete_replace_append(dba, key, NULL, 0, found); } @@ -576,7 +576,7 @@ int inifile_replace(inifile *dba, const key_type *key, const val_type *value) /* }}} */ /* {{{ inifile_replace_ex */ -int inifile_replace_ex(inifile *dba, const key_type *key, const val_type *value, zend_bool *found) +int inifile_replace_ex(inifile *dba, const key_type *key, const val_type *value, bool *found) { return inifile_delete_replace_append(dba, key, value, 0, found); } diff --git a/ext/dba/libinifile/inifile.h b/ext/dba/libinifile/inifile.h index ec33f80ee7..d1816b1d2e 100644 --- a/ext/dba/libinifile/inifile.h +++ b/ext/dba/libinifile/inifile.h @@ -45,9 +45,9 @@ val_type inifile_fetch(inifile *dba, const key_type *key, int skip); int inifile_firstkey(inifile *dba); int inifile_nextkey(inifile *dba); int inifile_delete(inifile *dba, const key_type *key); -int inifile_delete_ex(inifile *dba, const key_type *key, zend_bool *found); +int inifile_delete_ex(inifile *dba, const key_type *key, bool *found); int inifile_replace(inifile *dba, const key_type *key, const val_type *val); -int inifile_replace_ex(inifile *dba, const key_type *key, const val_type *val, zend_bool *found); +int inifile_replace_ex(inifile *dba, const key_type *key, const val_type *val, bool *found); int inifile_append(inifile *dba, const key_type *key, const val_type *val); char *inifile_version(); diff --git a/ext/dom/document.c b/ext/dom/document.c index c6d0f723f8..0689057cde 100644 --- a/ext/dom/document.c +++ b/ext/dom/document.c @@ -795,7 +795,7 @@ PHP_METHOD(DOMDocument, importNode) xmlNodePtr nodep, retnodep; dom_object *intern, *nodeobj; int ret; - zend_bool recursive = 0; + bool recursive = 0; /* See http://www.xmlsoft.org/html/libxml-tree.html#xmlDocCopyNode for meaning of values */ int extended_recursive; diff --git a/ext/dom/dom_iterators.c b/ext/dom/dom_iterators.c index f56d249034..c3fbb356e4 100644 --- a/ext/dom/dom_iterators.c +++ b/ext/dom/dom_iterators.c @@ -182,7 +182,7 @@ static void php_dom_iterator_move_forward(zend_object_iterator *iter) /* {{{ */ int previndex=0; HashTable *nodeht; zval *entry; - zend_bool do_curobj_undef = 1; + bool do_curobj_undef = 1; php_dom_iterator *iterator = (php_dom_iterator *)iter; diff --git a/ext/dom/element.c b/ext/dom/element.c index 317619001b..ba67f83d69 100644 --- a/ext/dom/element.c +++ b/ext/dom/element.c @@ -1014,7 +1014,7 @@ PHP_METHOD(DOMElement, hasAttributeNS) } /* }}} end dom_element_has_attribute_ns */ -static void php_set_attribute_id(xmlAttrPtr attrp, zend_bool is_id) /* {{{ */ +static void php_set_attribute_id(xmlAttrPtr attrp, bool is_id) /* {{{ */ { if (is_id == 1 && attrp->atype != XML_ATTRIBUTE_ID) { xmlChar *id_val; @@ -1044,7 +1044,7 @@ PHP_METHOD(DOMElement, setIdAttribute) dom_object *intern; char *name; size_t name_len; - zend_bool is_id; + bool is_id; id = ZEND_THIS; if (zend_parse_parameters(ZEND_NUM_ARGS(), "sb", &name, &name_len, &is_id) == FAILURE) { @@ -1080,7 +1080,7 @@ PHP_METHOD(DOMElement, setIdAttributeNS) dom_object *intern; size_t uri_len, name_len; char *uri, *name; - zend_bool is_id; + bool is_id; id = ZEND_THIS; if (zend_parse_parameters(ZEND_NUM_ARGS(), "ssb", &uri, &uri_len, &name, &name_len, &is_id) == FAILURE) { @@ -1114,7 +1114,7 @@ PHP_METHOD(DOMElement, setIdAttributeNode) xmlNode *nodep; xmlAttrPtr attrp; dom_object *intern, *attrobj; - zend_bool is_id; + bool is_id; id = ZEND_THIS; if (zend_parse_parameters(ZEND_NUM_ARGS(), "Ob", &node, dom_attr_class_entry, &is_id) == FAILURE) { diff --git a/ext/dom/node.c b/ext/dom/node.c index a6f88b5c0f..34dc5c76d2 100644 --- a/ext/dom/node.c +++ b/ext/dom/node.c @@ -1271,7 +1271,7 @@ PHP_METHOD(DOMNode, cloneNode) xmlNode *n, *node; int ret; dom_object *intern; - zend_bool recursive = 0; + bool recursive = 0; id = ZEND_THIS; if (zend_parse_parameters(ZEND_NUM_ARGS(), "|b", &recursive) == FAILURE) { @@ -1543,7 +1543,7 @@ static void dom_canonicalization(INTERNAL_FUNCTION_PARAMETERS, int mode) /* {{{ xmlDocPtr docp; xmlNodeSetPtr nodeset = NULL; dom_object *intern; - zend_bool exclusive=0, with_comments=0; + bool exclusive=0, with_comments=0; xmlChar **inclusive_ns_prefixes = NULL; char *file = NULL; int ret = -1; diff --git a/ext/dom/php_dom.c b/ext/dom/php_dom.c index 78d22f6a5e..e8d75d5999 100644 --- a/ext/dom/php_dom.c +++ b/ext/dom/php_dom.c @@ -1125,7 +1125,7 @@ void php_dom_create_iterator(zval *return_value, int ce_type) /* {{{ */ /* }}} */ /* {{{ php_dom_create_object */ -PHP_DOM_EXPORT zend_bool php_dom_create_object(xmlNodePtr obj, zval *return_value, dom_object *domobj) +PHP_DOM_EXPORT bool php_dom_create_object(xmlNodePtr obj, zval *return_value, dom_object *domobj) { zend_class_entry *ce; dom_object *intern; @@ -1301,10 +1301,10 @@ xmlNode *dom_get_elements_by_tag_name_ns_raw(xmlNodePtr nodep, char *ns, char *l /* }}} */ /* }}} end dom_element_get_elements_by_tag_name_ns_raw */ -static inline zend_bool is_empty_node(xmlNodePtr nodep) +static inline bool is_empty_node(xmlNodePtr nodep) { xmlChar *strContent = xmlNodeGetContent(nodep); - zend_bool ret = strContent == NULL || *strContent == '\0'; + bool ret = strContent == NULL || *strContent == '\0'; xmlFree(strContent); return ret; } diff --git a/ext/dom/xml_common.h b/ext/dom/xml_common.h index 40548c2d1a..671710e2e8 100644 --- a/ext/dom/xml_common.h +++ b/ext/dom/xml_common.h @@ -53,7 +53,7 @@ static inline dom_object *php_dom_obj_from_obj(zend_object *obj) { PHP_DOM_EXPORT extern zend_class_entry *dom_node_class_entry; PHP_DOM_EXPORT dom_object *php_dom_object_get_data(xmlNodePtr obj); -PHP_DOM_EXPORT zend_bool php_dom_create_object(xmlNodePtr obj, zval* return_value, dom_object *domobj); +PHP_DOM_EXPORT bool php_dom_create_object(xmlNodePtr obj, zval* return_value, dom_object *domobj); PHP_DOM_EXPORT xmlNodePtr dom_object_get_node(dom_object *obj); #define DOM_XMLNS_NAMESPACE \ diff --git a/ext/dom/xpath.c b/ext/dom/xpath.c index 1f97601c42..6ea3533188 100644 --- a/ext/dom/xpath.c +++ b/ext/dom/xpath.c @@ -208,7 +208,7 @@ static void dom_xpath_ext_function_object_php(xmlXPathParserContextPtr ctxt, int PHP_METHOD(DOMXPath, __construct) { zval *doc; - zend_bool register_node_ns = 1; + bool register_node_ns = 1; xmlDocPtr docp = NULL; dom_object *docobj; dom_xpath_object *intern; @@ -335,7 +335,7 @@ static void php_xpath_eval(INTERNAL_FUNCTION_PARAMETERS, int type) /* {{{ */ char *expr; xmlDoc *docp = NULL; xmlNsPtr *ns = NULL; - zend_bool register_node_ns; + bool register_node_ns; id = ZEND_THIS; intern = Z_XPATHOBJ_P(id); diff --git a/ext/exif/exif.c b/ext/exif/exif.c index db67531566..e54d508b0e 100644 --- a/ext/exif/exif.c +++ b/ext/exif/exif.c @@ -2036,7 +2036,7 @@ typedef struct { char *valid_end; /* exclusive */ } exif_offset_info; -static zend_always_inline zend_bool ptr_offset_overflows(char *ptr, size_t offset) { +static zend_always_inline bool ptr_offset_overflows(char *ptr, size_t offset) { return UINTPTR_MAX - (uintptr_t) ptr < offset; } @@ -2072,7 +2072,7 @@ static inline char *exif_offset_info_try_get( return start; } -static inline zend_bool exif_offset_info_contains( +static inline bool exif_offset_info_contains( const exif_offset_info *info, char *start, size_t length) { char *end; if (ptr_offset_overflows(start, length)) { @@ -4478,7 +4478,7 @@ static bool exif_read_from_file(image_info_type *ImageInfo, char *FileName, int PHP_FUNCTION(exif_read_data) { zend_string *z_sections_needed = NULL; - zend_bool sub_arrays = 0, read_thumbnail = 0, read_all = 0; + bool sub_arrays = 0, read_thumbnail = 0, read_all = 0; zval *stream; bool ret; int i, sections_needed = 0; diff --git a/ext/ffi/ffi.c b/ext/ffi/ffi.c index 1e6eaa3119..e18da8bf7a 100644 --- a/ext/ffi/ffi.c +++ b/ext/ffi/ffi.c @@ -124,8 +124,8 @@ struct _zend_ffi_type { typedef struct _zend_ffi_field { size_t offset; - zend_bool is_const; - zend_bool is_nested; /* part of nested anonymous struct */ + bool is_const; + bool is_nested; /* part of nested anonymous struct */ uint8_t first_bit; uint8_t bits; zend_ffi_type *type; @@ -140,7 +140,7 @@ typedef enum _zend_ffi_symbol_kind { typedef struct _zend_ffi_symbol { zend_ffi_symbol_kind kind; - zend_bool is_const; + bool is_const; zend_ffi_type *type; union { void *addr; @@ -158,7 +158,7 @@ typedef struct _zend_ffi { DL_HANDLE lib; HashTable *symbols; HashTable *tags; - zend_bool persistent; + bool persistent; } zend_ffi; #define ZEND_FFI_TYPE_OWNED (1<<0) @@ -209,7 +209,7 @@ static void _zend_ffi_type_dtor(zend_ffi_type *type); static void zend_ffi_finalize_type(zend_ffi_dcl *dcl); static int zend_ffi_is_same_type(zend_ffi_type *type1, zend_ffi_type *type2); static zend_ffi_type *zend_ffi_remember_type(zend_ffi_type *type); -static char *zend_ffi_parse_directives(const char *filename, char *code_pos, char **scope_name, char **lib, zend_bool preload); +static char *zend_ffi_parse_directives(const char *filename, char *code_pos, char **scope_name, char **lib, bool preload); static ZEND_FUNCTION(ffi_trampoline); static ZEND_COLD void zend_ffi_return_unsupported(zend_ffi_type *type); static ZEND_COLD void zend_ffi_pass_unsupported(zend_ffi_type *type); @@ -458,7 +458,7 @@ static zend_never_inline zend_ffi_cdata *zend_ffi_cdata_to_zval_slow_ret(void *p } /* }}} */ -static zend_always_inline void zend_ffi_cdata_to_zval(zend_ffi_cdata *cdata, void *ptr, zend_ffi_type *type, int read_type, zval *rv, zend_ffi_flags flags, zend_bool is_ret, zend_bool debug_union) /* {{{ */ +static zend_always_inline void zend_ffi_cdata_to_zval(zend_ffi_cdata *cdata, void *ptr, zend_ffi_type *type, int read_type, zval *rv, zend_ffi_flags flags, bool is_ret, bool debug_union) /* {{{ */ { if (read_type == BP_VAR_R) { zend_ffi_type_kind kind = type->kind; @@ -1802,7 +1802,7 @@ typedef struct _zend_ffi_cdata_iterator { zend_object_iterator it; zend_long key; zval value; - zend_bool by_ref; + bool by_ref; } zend_ffi_cdata_iterator; static void zend_ffi_cdata_it_dtor(zend_object_iterator *iter) /* {{{ */ @@ -2007,7 +2007,7 @@ static HashTable *zend_ffi_cdata_get_debug_info(zend_object *obj, int *is_temp) } /* }}} */ -static int zend_ffi_cdata_get_closure(zend_object *obj, zend_class_entry **ce_ptr, zend_function **fptr_ptr, zend_object **obj_ptr, zend_bool check_only) /* {{{ */ +static int zend_ffi_cdata_get_closure(zend_object *obj, zend_class_entry **ce_ptr, zend_function **fptr_ptr, zend_object **obj_ptr, bool check_only) /* {{{ */ { zend_ffi_cdata *cdata = (zend_ffi_cdata*)obj; zend_ffi_type *type = ZEND_FFI_TYPE(cdata->type); @@ -3103,7 +3103,7 @@ static zend_ffi_type *zend_ffi_remember_type(zend_ffi_type *type) /* {{{ */ } /* }}} */ -static zend_ffi *zend_ffi_load(const char *filename, zend_bool preload) /* {{{ */ +static zend_ffi *zend_ffi_load(const char *filename, bool preload) /* {{{ */ { struct stat buf; int fd; @@ -3460,7 +3460,7 @@ static int zend_ffi_validate_vla(zend_ffi_type *type) /* {{{ */ } /* }}} */ -static int zend_ffi_validate_incomplete_type(zend_ffi_type *type, zend_bool allow_incomplete_tag, zend_bool allow_incomplete_array) /* {{{ */ +static int zend_ffi_validate_incomplete_type(zend_ffi_type *type, bool allow_incomplete_tag, bool allow_incomplete_array) /* {{{ */ { if (!allow_incomplete_tag && (type->attr & ZEND_FFI_ATTR_INCOMPLETE_TAG)) { if (FFI_G(tags)) { @@ -3504,7 +3504,7 @@ static int zend_ffi_validate_incomplete_type(zend_ffi_type *type, zend_bool allo } /* }}} */ -static int zend_ffi_validate_type(zend_ffi_type *type, zend_bool allow_incomplete_tag, zend_bool allow_incomplete_array) /* {{{ */ +static int zend_ffi_validate_type(zend_ffi_type *type, bool allow_incomplete_tag, bool allow_incomplete_array) /* {{{ */ { if (type->kind == ZEND_FFI_TYPE_VOID) { zend_ffi_throw_parser_error("void type is not allowed at line %d", FFI_G(line)); @@ -3514,7 +3514,7 @@ static int zend_ffi_validate_type(zend_ffi_type *type, zend_bool allow_incomplet } /* }}} */ -static int zend_ffi_validate_var_type(zend_ffi_type *type, zend_bool allow_incomplete_array) /* {{{ */ +static int zend_ffi_validate_var_type(zend_ffi_type *type, bool allow_incomplete_array) /* {{{ */ { if (type->kind == ZEND_FFI_TYPE_FUNC) { zend_ffi_throw_parser_error("function type is not allowed at line %d", FFI_G(line)); @@ -3598,9 +3598,9 @@ ZEND_METHOD(FFI, new) /* {{{ */ zend_ffi_type *type, *type_ptr; zend_ffi_cdata *cdata; void *ptr; - zend_bool owned = 1; - zend_bool persistent = 0; - zend_bool is_const = 0; + bool owned = 1; + bool persistent = 0; + bool is_const = 0; zend_ffi_flags flags = ZEND_FFI_FLAG_OWNED; ZEND_FFI_VALIDATE_API_RESTRICTION(); @@ -3750,7 +3750,7 @@ ZEND_METHOD(FFI, cast) /* {{{ */ zend_object *ztype = NULL; zend_ffi_type *old_type, *type, *type_ptr; zend_ffi_cdata *old_cdata, *cdata; - zend_bool is_const = 0; + bool is_const = 0; zval *zv, *arg; void *ptr; @@ -4366,7 +4366,7 @@ ZEND_METHOD(FFI, string) /* {{{ */ zend_ffi_type *type; void *ptr; zend_long size; - zend_bool size_is_null = 1; + bool size_is_null = 1; ZEND_FFI_VALIDATE_API_RESTRICTION(); ZEND_PARSE_PARAMETERS_START(1, 2) @@ -4451,7 +4451,7 @@ ZEND_METHOD(FFI_CType, getName) /* {{{ */ } } -static char *zend_ffi_parse_directives(const char *filename, char *code_pos, char **scope_name, char **lib, zend_bool preload) /* {{{ */ +static char *zend_ffi_parse_directives(const char *filename, char *code_pos, char **scope_name, char **lib, bool preload) /* {{{ */ { char *p; @@ -4815,7 +4815,7 @@ static int zend_ffi_preload(char *preload) /* {{{ */ { zend_ffi *ffi; char *s = NULL, *e, *filename; - zend_bool is_glob = 0; + bool is_glob = 0; e = preload; while (*e) { @@ -5419,8 +5419,8 @@ void zend_ffi_add_enum_val(zend_ffi_dcl *enum_dcl, const char *name, size_t name const zend_ffi_type *sym_type; int64_t value; zend_ffi_type *enum_type = ZEND_FFI_TYPE(enum_dcl->type); - zend_bool overflow = 0; - zend_bool is_signed = + bool overflow = 0; + bool is_signed = (enum_type->enumeration.kind == ZEND_FFI_TYPE_SINT8 || enum_type->enumeration.kind == ZEND_FFI_TYPE_SINT16 || enum_type->enumeration.kind == ZEND_FFI_TYPE_SINT32 || @@ -5605,7 +5605,7 @@ void zend_ffi_add_field(zend_ffi_dcl *struct_dcl, const char *name, size_t name_ struct_type->size += field_type->size; } field->type = field_dcl->type; - field->is_const = (zend_bool)(field_dcl->attr & ZEND_FFI_ATTR_CONST); + field->is_const = (bool)(field_dcl->attr & ZEND_FFI_ATTR_CONST); field->is_nested = 0; field->first_bit = 0; field->bits = 0; @@ -5773,7 +5773,7 @@ void zend_ffi_add_bit_field(zend_ffi_dcl *struct_dcl, const char *name, size_t n } } field->type = field_dcl->type; - field->is_const = (zend_bool)(field_dcl->attr & ZEND_FFI_ATTR_CONST); + field->is_const = (bool)(field_dcl->attr & ZEND_FFI_ATTR_CONST); field->is_nested = 0; field_dcl->type = field_type; /* reset "owned" flag */ @@ -6092,7 +6092,7 @@ void zend_ffi_declare(const char *name, size_t name_len, zend_ffi_dcl *dcl) /* { if ((dcl->flags & ZEND_FFI_DCL_STORAGE_CLASS) == ZEND_FFI_DCL_TYPEDEF && sym->kind == ZEND_FFI_SYM_TYPE && zend_ffi_is_same_type(ZEND_FFI_TYPE(sym->type), ZEND_FFI_TYPE(dcl->type)) - && sym->is_const == (zend_bool)(dcl->attr & ZEND_FFI_ATTR_CONST)) { + && sym->is_const == (bool)(dcl->attr & ZEND_FFI_ATTR_CONST)) { /* allowed redeclaration */ zend_ffi_type_dtor(dcl->type); return; @@ -6110,7 +6110,7 @@ void zend_ffi_declare(const char *name, size_t name_len, zend_ffi_dcl *dcl) /* { } else { if (sym->kind == ZEND_FFI_SYM_VAR && zend_ffi_is_same_type(ZEND_FFI_TYPE(sym->type), type) - && sym->is_const == (zend_bool)(dcl->attr & ZEND_FFI_ATTR_CONST)) { + && sym->is_const == (bool)(dcl->attr & ZEND_FFI_ATTR_CONST)) { /* allowed redeclaration */ zend_ffi_type_dtor(dcl->type); return; @@ -6139,7 +6139,7 @@ void zend_ffi_declare(const char *name, size_t name_len, zend_ffi_dcl *dcl) /* { sym = pemalloc(sizeof(zend_ffi_symbol), FFI_G(persistent)); sym->kind = ZEND_FFI_SYM_TYPE; sym->type = dcl->type; - sym->is_const = (zend_bool)(dcl->attr & ZEND_FFI_ATTR_CONST); + sym->is_const = (bool)(dcl->attr & ZEND_FFI_ATTR_CONST); dcl->type = ZEND_FFI_TYPE(dcl->type); /* reset "owned" flag */ zend_hash_str_add_new_ptr(FFI_G(symbols), name, name_len, sym); } else { @@ -6155,7 +6155,7 @@ void zend_ffi_declare(const char *name, size_t name_len, zend_ffi_dcl *dcl) /* { sym = pemalloc(sizeof(zend_ffi_symbol), FFI_G(persistent)); sym->kind = (type->kind == ZEND_FFI_TYPE_FUNC) ? ZEND_FFI_SYM_FUNC : ZEND_FFI_SYM_VAR; sym->type = dcl->type; - sym->is_const = (zend_bool)(dcl->attr & ZEND_FFI_ATTR_CONST); + sym->is_const = (bool)(dcl->attr & ZEND_FFI_ATTR_CONST); dcl->type = type; /* reset "owned" flag */ zend_hash_str_add_new_ptr(FFI_G(symbols), name, name_len, sym); } else { @@ -6167,7 +6167,7 @@ void zend_ffi_declare(const char *name, size_t name_len, zend_ffi_dcl *dcl) /* { } /* }}} */ -void zend_ffi_declare_tag(const char *name, size_t name_len, zend_ffi_dcl *dcl, zend_bool incomplete) /* {{{ */ +void zend_ffi_declare_tag(const char *name, size_t name_len, zend_ffi_dcl *dcl, bool incomplete) /* {{{ */ { zend_ffi_tag *tag; zend_ffi_type *type; diff --git a/ext/ffi/ffi.g b/ext/ffi/ffi.g index 4d7c003906..0dd94dfb6d 100644 --- a/ext/ffi/ffi.g +++ b/ext/ffi/ffi.g @@ -335,7 +335,7 @@ enumerator(zend_ffi_dcl *enum_dcl, int64_t *min, int64_t *max, int64_t *last): declarator(zend_ffi_dcl *dcl, const char **name, size_t *name_len): {zend_ffi_dcl nested_dcl = {ZEND_FFI_DCL_CHAR, 0, 0, 0, NULL};} - {zend_bool nested = 0;} + {bool nested = 0;} pointer(dcl)? ( ID(name, name_len) | "(" @@ -350,7 +350,7 @@ declarator(zend_ffi_dcl *dcl, const char **name, size_t *name_len): abstract_declarator(zend_ffi_dcl *dcl): {zend_ffi_dcl nested_dcl = {ZEND_FFI_DCL_CHAR, 0, 0, 0, NULL};} - {zend_bool nested = 0;} + {bool nested = 0;} pointer(dcl)? ( &nested_declarator_start "(" @@ -365,7 +365,7 @@ abstract_declarator(zend_ffi_dcl *dcl): parameter_declarator(zend_ffi_dcl *dcl, const char **name, size_t *name_len): {zend_ffi_dcl nested_dcl = {ZEND_FFI_DCL_CHAR, 0, 0, 0, NULL};} - {zend_bool nested = 0;} + {bool nested = 0;} pointer(dcl)? ( &nested_declarator_start "(" @@ -440,7 +440,7 @@ array_or_function_declarators(zend_ffi_dcl *dcl, zend_ffi_dcl *nested_dcl): parameter_declaration(HashTable **args): {const char *name = NULL;} {size_t name_len = 0;} - {zend_bool old_allow_vla = FFI_G(allow_vla);} + {bool old_allow_vla = FFI_G(allow_vla);} {FFI_G(allow_vla) = 1;} {zend_ffi_dcl param_dcl = ZEND_FFI_ATTR_INIT;} specifier_qualifier_list(¶m_dcl) @@ -498,7 +498,7 @@ attrib(zend_ffi_dcl *dcl): {size_t name_len;} {int n;} {zend_ffi_val val;} - {zend_bool orig_attribute_parsing;} + {bool orig_attribute_parsing;} ( ID(&name, &name_len) ( /* empty */ {zend_ffi_add_attribute(dcl, name, name_len);} diff --git a/ext/ffi/ffi_parser.c b/ext/ffi/ffi_parser.c index 03d05eb6d9..d50c6f4abf 100644 --- a/ext/ffi/ffi_parser.c +++ b/ext/ffi/ffi_parser.c @@ -2569,7 +2569,7 @@ static int parse_enumerator(int sym, zend_ffi_dcl *enum_dcl, int64_t *min, int64 static int parse_declarator(int sym, zend_ffi_dcl *dcl, const char **name, size_t *name_len) { zend_ffi_dcl nested_dcl = {ZEND_FFI_DCL_CHAR, 0, 0, 0, NULL}; - zend_bool nested = 0; + bool nested = 0; if (sym == YY__STAR) { sym = parse_pointer(sym, dcl); } @@ -2598,7 +2598,7 @@ static int parse_declarator(int sym, zend_ffi_dcl *dcl, const char **name, size_ static int parse_abstract_declarator(int sym, zend_ffi_dcl *dcl) { zend_ffi_dcl nested_dcl = {ZEND_FFI_DCL_CHAR, 0, 0, 0, NULL}; - zend_bool nested = 0; + bool nested = 0; if (sym == YY__STAR) { sym = parse_pointer(sym, dcl); } @@ -2623,7 +2623,7 @@ static int parse_abstract_declarator(int sym, zend_ffi_dcl *dcl) { static int parse_parameter_declarator(int sym, zend_ffi_dcl *dcl, const char **name, size_t *name_len) { zend_ffi_dcl nested_dcl = {ZEND_FFI_DCL_CHAR, 0, 0, 0, NULL}; - zend_bool nested = 0; + bool nested = 0; if (sym == YY__STAR) { sym = parse_pointer(sym, dcl); } @@ -2863,7 +2863,7 @@ _yy_state_119: static int parse_parameter_declaration(int sym, HashTable **args) { const char *name = NULL; size_t name_len = 0; - zend_bool old_allow_vla = FFI_G(allow_vla); + bool old_allow_vla = FFI_G(allow_vla); FFI_G(allow_vla) = 1; zend_ffi_dcl param_dcl = ZEND_FFI_ATTR_INIT; sym = parse_specifier_qualifier_list(sym, ¶m_dcl); @@ -2965,7 +2965,7 @@ static int parse_attrib(int sym, zend_ffi_dcl *dcl) { size_t name_len; int n; zend_ffi_val val; - zend_bool orig_attribute_parsing; + bool orig_attribute_parsing; if (sym == YY_ID || sym == YY_CONST || sym == YY___CONST || sym == YY___CONST__) { if (sym == YY_ID) { sym = parse_ID(sym, &name, &name_len); diff --git a/ext/ffi/php_ffi.h b/ext/ffi/php_ffi.h index 3a10b45478..4b395dc83d 100644 --- a/ext/ffi/php_ffi.h +++ b/ext/ffi/php_ffi.h @@ -30,7 +30,7 @@ typedef struct _zend_ffi_type zend_ffi_type; ZEND_BEGIN_MODULE_GLOBALS(ffi) zend_ffi_api_restriction restriction; - zend_bool is_cli; + bool is_cli; /* predefined ffi_types */ HashTable types; @@ -54,9 +54,9 @@ ZEND_BEGIN_MODULE_GLOBALS(ffi) int line; HashTable *symbols; HashTable *tags; - zend_bool allow_vla; - zend_bool attribute_parsing; - zend_bool persistent; + bool allow_vla; + bool attribute_parsing; + bool persistent; uint32_t default_type_attr; ZEND_END_MODULE_GLOBALS(ffi) @@ -214,7 +214,7 @@ void ZEND_NORETURN zend_ffi_parser_error(const char *msg, ...); int zend_ffi_is_typedef_name(const char *name, size_t name_len); void zend_ffi_resolve_typedef(const char *name, size_t name_len, zend_ffi_dcl *dcl); void zend_ffi_resolve_const(const char *name, size_t name_len, zend_ffi_val *val); -void zend_ffi_declare_tag(const char *name, size_t name_len, zend_ffi_dcl *dcl, zend_bool incomplete); +void zend_ffi_declare_tag(const char *name, size_t name_len, zend_ffi_dcl *dcl, bool incomplete); void zend_ffi_make_enum_type(zend_ffi_dcl *dcl); void zend_ffi_add_enum_val(zend_ffi_dcl *enum_dcl, const char *name, size_t name_len, zend_ffi_val *val, int64_t *min, int64_t *max, int64_t *last); void zend_ffi_make_struct_type(zend_ffi_dcl *dcl); diff --git a/ext/filter/filter.c b/ext/filter/filter.c index 4aa9368213..43c6938aea 100644 --- a/ext/filter/filter.c +++ b/ext/filter/filter.c @@ -308,7 +308,7 @@ static unsigned int php_sapi_filter_init(void) return SUCCESS; } -static void php_zval_filter(zval *value, zend_long filter, zend_long flags, zval *options, char* charset, zend_bool copy) /* {{{ */ +static void php_zval_filter(zval *value, zend_long filter, zend_long flags, zval *options, char* charset, bool copy) /* {{{ */ { filter_list_entry filter_func; @@ -433,7 +433,7 @@ static unsigned int php_sapi_filter(int arg, const char *var, char **val, size_t } /* }}} */ -static void php_zval_filter_recursive(zval *value, zend_long filter, zend_long flags, zval *options, char *charset, zend_bool copy) /* {{{ */ +static void php_zval_filter_recursive(zval *value, zend_long filter, zend_long flags, zval *options, char *charset, bool copy) /* {{{ */ { if (Z_TYPE_P(value) == IS_ARRAY) { zval *element; @@ -602,7 +602,7 @@ static void php_filter_call( /* }}} */ static void php_filter_array_handler(zval *input, HashTable *op_ht, zend_long op_long, - zval *return_value, zend_bool add_empty + zval *return_value, bool add_empty ) /* {{{ */ { zend_string *arg_key; zval *tmp, *arg_elm; @@ -737,7 +737,7 @@ PHP_FUNCTION(filter_input_array) { zend_long fetch_from; zval *array_input = NULL; - zend_bool add_empty = 1; + bool add_empty = 1; HashTable *op_ht = NULL; zend_long op_long = FILTER_DEFAULT; @@ -787,7 +787,7 @@ PHP_FUNCTION(filter_input_array) PHP_FUNCTION(filter_var_array) { zval *array_input = NULL; - zend_bool add_empty = 1; + bool add_empty = 1; HashTable *op_ht = NULL; zend_long op_long = FILTER_DEFAULT; diff --git a/ext/ftp/ftp.c b/ext/ftp/ftp.c index 7ce3386c57..a10ef3a72a 100644 --- a/ext/ftp/ftp.c +++ b/ext/ftp/ftp.c @@ -232,7 +232,7 @@ ftp_login(ftpbuf_t *ftp, const char *user, const size_t user_len, const char *pa SSL_CTX *ctx = NULL; long ssl_ctx_options = SSL_OP_ALL; int err, res; - zend_bool retry; + bool retry; #endif if (ftp == NULL) { return 0; @@ -1361,7 +1361,7 @@ ftp_getresp(ftpbuf_t *ftp) int single_send(ftpbuf_t *ftp, php_socket_t s, void *buf, size_t size) { #ifdef HAVE_FTP_SSL int err; - zend_bool retry = 0; + bool retry = 0; SSL *handle = NULL; php_socket_t fd; size_t sent; @@ -1460,7 +1460,7 @@ my_recv(ftpbuf_t *ftp, php_socket_t s, void *buf, size_t len) int n, nr_bytes; #ifdef HAVE_FTP_SSL int err; - zend_bool retry = 0; + bool retry = 0; SSL *handle = NULL; php_socket_t fd; #endif @@ -1745,7 +1745,7 @@ data_accept(databuf_t *data, ftpbuf_t *ftp) SSL_CTX *ctx; SSL_SESSION *session; int err, res; - zend_bool retry; + bool retry; #endif if (data->fd != -1) { diff --git a/ext/ftp/php_ftp.c b/ext/ftp/php_ftp.c index 88a3cd02e7..2b944f04e6 100644 --- a/ext/ftp/php_ftp.c +++ b/ext/ftp/php_ftp.c @@ -495,7 +495,7 @@ PHP_FUNCTION(ftp_rawlist) ftpbuf_t *ftp; char **llist, **ptr, *dir; size_t dir_len; - zend_bool recursive = 0; + bool recursive = 0; if (zend_parse_parameters(ZEND_NUM_ARGS(), "Os|b", &z_ftp, php_ftp_ce, &dir, &dir_len, &recursive) == FAILURE) { RETURN_THROWS(); @@ -662,7 +662,7 @@ PHP_FUNCTION(ftp_pasv) { zval *z_ftp; ftpbuf_t *ftp; - zend_bool pasv; + bool pasv; if (zend_parse_parameters(ZEND_NUM_ARGS(), "Ob", &z_ftp, php_ftp_ce, &pasv) == FAILURE) { RETURN_THROWS(); diff --git a/ext/gd/gd.c b/ext/gd/gd.c index 4f5f41099f..aecca33c8b 100644 --- a/ext/gd/gd.c +++ b/ext/gd/gd.c @@ -848,7 +848,7 @@ PHP_FUNCTION(imageistruecolor) PHP_FUNCTION(imagetruecolortopalette) { zval *IM; - zend_bool dither; + bool dither; zend_long ncolors; gdImagePtr im; @@ -1001,7 +1001,7 @@ PHP_FUNCTION(imagefilledarc) PHP_FUNCTION(imagealphablending) { zval *IM; - zend_bool blend; + bool blend; gdImagePtr im; if (zend_parse_parameters(ZEND_NUM_ARGS(), "Ob", &IM, gd_image_ce, &blend) == FAILURE) { @@ -1020,7 +1020,7 @@ PHP_FUNCTION(imagealphablending) PHP_FUNCTION(imagesavealpha) { zval *IM; - zend_bool save; + bool save; gdImagePtr im; if (zend_parse_parameters(ZEND_NUM_ARGS(), "Ob", &IM, gd_image_ce, &save) == FAILURE) { @@ -1188,7 +1188,7 @@ PHP_FUNCTION(imagecopyresampled) PHP_FUNCTION(imagegrabwindow) { HWND window; - zend_bool client_area = 0; + bool client_area = 0; RECT rc = {0}; int Width, Height; HDC hdc; @@ -1317,7 +1317,7 @@ PHP_FUNCTION(imagerotate) gdImagePtr im_dst, im_src; double degrees; zend_long color; - zend_bool ignoretransparent = 0; + bool ignoretransparent = 0; if (zend_parse_parameters(ZEND_NUM_ARGS(), "Odl|b", &SIM, gd_image_ce, °rees, &color, &ignoretransparent) == FAILURE) { RETURN_THROWS(); @@ -1919,7 +1919,7 @@ PHP_FUNCTION(imagexbm) char *file = NULL; size_t file_len = 0; zend_long foreground_color; - zend_bool foreground_color_is_null = 1; + bool foreground_color_is_null = 1; gdImagePtr im; int i; gdIOCtx *ctx = NULL; @@ -2057,7 +2057,7 @@ PHP_FUNCTION(imagegd2) PHP_FUNCTION(imagebmp) { zval *imgind; - zend_bool compressed = 1; + bool compressed = 1; gdImagePtr im; gdIOCtx *ctx = NULL; zval *to_zval = NULL; @@ -2607,7 +2607,7 @@ PHP_FUNCTION(imagecolortransparent) { zval *IM; zend_long COL = 0; - zend_bool COL_IS_NULL = 1; + bool COL_IS_NULL = 1; gdImagePtr im; if (zend_parse_parameters(ZEND_NUM_ARGS(), "O|l!", &IM, gd_image_ce, &COL, &COL_IS_NULL) == FAILURE) { @@ -2628,8 +2628,8 @@ PHP_FUNCTION(imagecolortransparent) PHP_FUNCTION(imageinterlace) { zval *IM; - zend_bool INT = 0; - zend_bool INT_IS_NULL = 1; + bool INT = 0; + bool INT_IS_NULL = 1; gdImagePtr im; if (zend_parse_parameters(ZEND_NUM_ARGS(), "O|b!", &IM, gd_image_ce, &INT, &INT_IS_NULL) == FAILURE) { @@ -2655,7 +2655,7 @@ static void php_imagepolygon(INTERNAL_FUNCTION_PARAMETERS, int filled) { zval *IM, *POINTS; zend_long NPOINTS, COL; - zend_bool COL_IS_NULL = 1; + bool COL_IS_NULL = 1; zval *var = NULL; gdImagePtr im; gdPointPtr points; @@ -3390,7 +3390,7 @@ static void php_image_filter_pixelate(INTERNAL_FUNCTION_PARAMETERS) zval *IM; gdImagePtr im; zend_long tmp, blocksize; - zend_bool mode = 0; + bool mode = 0; if (zend_parse_parameters(ZEND_NUM_ARGS(), "Oll|b", &IM, gd_image_ce, &tmp, &blocksize, &mode) == FAILURE) { RETURN_THROWS(); @@ -3568,7 +3568,7 @@ PHP_FUNCTION(imageflip) PHP_FUNCTION(imageantialias) { zval *IM; - zend_bool alias; + bool alias; gdImagePtr im; if (zend_parse_parameters(ZEND_NUM_ARGS(), "Ob", &IM, gd_image_ce, &alias) == FAILURE) { @@ -4019,7 +4019,7 @@ PHP_FUNCTION(imageresolution) zval *IM; gdImagePtr im; zend_long res_x, res_y; - zend_bool res_x_is_null = 1, res_y_is_null = 1; + bool res_x_is_null = 1, res_y_is_null = 1; if (zend_parse_parameters(ZEND_NUM_ARGS(), "O|l!l!", &IM, gd_image_ce, &res_x, &res_x_is_null, &res_y, &res_y_is_null) == FAILURE) { RETURN_THROWS(); diff --git a/ext/gmp/gmp.c b/ext/gmp/gmp.c index da1ab3047f..55567f5c6d 100644 --- a/ext/gmp/gmp.c +++ b/ext/gmp/gmp.c @@ -72,7 +72,7 @@ PHP_GMP_API zend_class_entry *php_gmp_class_entry(void) { typedef struct _gmp_temp { mpz_t num; - zend_bool is_used; + bool is_used; } gmp_temp_t; #define GMP_ROUND_ZERO 0 @@ -598,7 +598,7 @@ static zend_result convert_to_gmp(mpz_t gmpnumber, zval *val, zend_long base, ui return SUCCESS; case IS_STRING: { char *numstr = Z_STRVAL_P(val); - zend_bool skip_lead = 0; + bool skip_lead = 0; int ret; if (Z_STRLEN_P(val) >= 2 && numstr[0] == '0') { @@ -677,7 +677,7 @@ static void gmp_cmp(zval *return_value, zval *a_arg, zval *b_arg) /* {{{ */ { mpz_ptr gmpnum_a, gmpnum_b; gmp_temp_t temp_a, temp_b; - zend_bool use_si = 0; + bool use_si = 0; zend_long res; FETCH_GMP_ZVAL(gmpnum_a, a_arg, temp_a, 1); @@ -1627,7 +1627,7 @@ ZEND_FUNCTION(gmp_kronecker) zval *a_arg, *b_arg; mpz_ptr gmpnum_a, gmpnum_b; gmp_temp_t temp_a, temp_b; - zend_bool use_a_si = 0, use_b_si = 0; + bool use_a_si = 0, use_b_si = 0; int result; if (zend_parse_parameters(ZEND_NUM_ARGS(), "zz", &a_arg, &b_arg) == FAILURE){ @@ -1864,7 +1864,7 @@ ZEND_FUNCTION(gmp_setbit) { zval *a_arg; zend_long index; - zend_bool set = 1; + bool set = 1; mpz_ptr gmpnum_a; if (zend_parse_parameters(ZEND_NUM_ARGS(), "Ol|b", &a_arg, gmp_ce, &index, &set) == FAILURE) { diff --git a/ext/gmp/php_gmp.h b/ext/gmp/php_gmp.h index 9db9d696de..82872ef9d2 100644 --- a/ext/gmp/php_gmp.h +++ b/ext/gmp/php_gmp.h @@ -30,7 +30,7 @@ ZEND_MODULE_DEACTIVATE_D(gmp); ZEND_MODULE_INFO_D(gmp); ZEND_BEGIN_MODULE_GLOBALS(gmp) - zend_bool rand_initialized; + bool rand_initialized; gmp_randstate_t rand_state; ZEND_END_MODULE_GLOBALS(gmp) diff --git a/ext/hash/hash.c b/ext/hash/hash.c index 2a68b8387d..216f80687e 100644 --- a/ext/hash/hash.c +++ b/ext/hash/hash.c @@ -353,7 +353,7 @@ PHP_HASH_API int php_hash_unserialize(php_hashcontext_object *hash, zend_long ma /* Userspace */ static void php_hash_do_hash( - zval *return_value, zend_string *algo, char *data, size_t data_len, zend_bool raw_output, bool isfilename, HashTable *args + zval *return_value, zend_string *algo, char *data, size_t data_len, bool raw_output, bool isfilename, HashTable *args ) /* {{{ */ { zend_string *digest; const php_hash_ops *ops; @@ -421,7 +421,7 @@ PHP_FUNCTION(hash) zend_string *algo; char *data; size_t data_len; - zend_bool raw_output = 0; + bool raw_output = 0; HashTable *args = NULL; ZEND_PARSE_PARAMETERS_START(2, 4) @@ -443,7 +443,7 @@ PHP_FUNCTION(hash_file) zend_string *algo; char *data; size_t data_len; - zend_bool raw_output = 0; + bool raw_output = 0; HashTable *args = NULL; ZEND_PARSE_PARAMETERS_START(2, 3) @@ -494,7 +494,7 @@ static inline void php_hash_hmac_round(unsigned char *final, const php_hash_ops } static void php_hash_do_hash_hmac( - zval *return_value, zend_string *algo, char *data, size_t data_len, char *key, size_t key_len, zend_bool raw_output, bool isfilename + zval *return_value, zend_string *algo, char *data, size_t data_len, char *key, size_t key_len, bool raw_output, bool isfilename ) /* {{{ */ { zend_string *digest; unsigned char *K; @@ -578,7 +578,7 @@ PHP_FUNCTION(hash_hmac) zend_string *algo; char *data, *key; size_t data_len, key_len; - zend_bool raw_output = 0; + bool raw_output = 0; if (zend_parse_parameters(ZEND_NUM_ARGS(), "Sss|b", &algo, &data, &data_len, &key, &key_len, &raw_output) == FAILURE) { RETURN_THROWS(); @@ -595,7 +595,7 @@ PHP_FUNCTION(hash_hmac_file) zend_string *algo; char *data, *key; size_t data_len, key_len; - zend_bool raw_output = 0; + bool raw_output = 0; if (zend_parse_parameters(ZEND_NUM_ARGS(), "Sss|b", &algo, &data, &data_len, &key, &key_len, &raw_output) == FAILURE) { RETURN_THROWS(); @@ -777,7 +777,7 @@ PHP_FUNCTION(hash_final) { zval *zhash; php_hashcontext_object *hash; - zend_bool raw_output = 0; + bool raw_output = 0; zend_string *digest; size_t digest_len; @@ -986,7 +986,7 @@ PHP_FUNCTION(hash_pbkdf2) unsigned char *computed_salt, *digest, *temp, *result, *K1, *K2 = NULL; zend_long loops, i, j, iterations, digest_length = 0, length = 0; size_t pass_len, salt_len = 0; - zend_bool raw_output = 0; + bool raw_output = 0; const php_hash_ops *ops; void *context; HashTable *args; diff --git a/ext/iconv/iconv.c b/ext/iconv/iconv.c index 90c209cbcb..7ccbb82662 100644 --- a/ext/iconv/iconv.c +++ b/ext/iconv/iconv.c @@ -1820,7 +1820,7 @@ PHP_FUNCTION(iconv_substr) size_t charset_len; zend_string *str; zend_long offset, length = 0; - zend_bool len_is_null = 1; + bool len_is_null = 1; php_iconv_err_t err; diff --git a/ext/imap/php_imap.c b/ext/imap/php_imap.c index 152e21731f..aa547da000 100644 --- a/ext/imap/php_imap.c +++ b/ext/imap/php_imap.c @@ -2661,7 +2661,7 @@ PHP_FUNCTION(imap_sort) zval *imap_conn_obj; zend_string *criteria = NULL, *charset = NULL; zend_long sort, flags = 0; - zend_bool rev; + bool rev; php_imap_object *imap_conn_struct; unsigned long *slst, *sl; char *search_criteria; diff --git a/ext/imap/php_imap.h b/ext/imap/php_imap.h index 9ff0cf9c73..a35c284106 100644 --- a/ext/imap/php_imap.h +++ b/ext/imap/php_imap.h @@ -142,7 +142,7 @@ ZEND_BEGIN_MODULE_GLOBALS(imap) #endif /* php_stream for php_mail_gets() */ php_stream *gets_stream; - zend_bool enable_rsh; + bool enable_rsh; ZEND_END_MODULE_GLOBALS(imap) #if defined(ZTS) && defined(COMPILE_DL_IMAP) diff --git a/ext/intl/breakiterator/rulebasedbreakiterator_methods.cpp b/ext/intl/breakiterator/rulebasedbreakiterator_methods.cpp index f17733da24..eb54c321f6 100644 --- a/ext/intl/breakiterator/rulebasedbreakiterator_methods.cpp +++ b/ext/intl/breakiterator/rulebasedbreakiterator_methods.cpp @@ -35,7 +35,7 @@ static void _php_intlrbbi_constructor_body(INTERNAL_FUNCTION_PARAMETERS) { char *rules; size_t rules_len; - zend_bool compiled = 0; + bool compiled = 0; UErrorCode status = U_ZERO_ERROR; BREAKITER_METHOD_INIT_VARS; object = ZEND_THIS; diff --git a/ext/intl/calendar/calendar_methods.cpp b/ext/intl/calendar/calendar_methods.cpp index bcef9cf3b9..19d43b2b23 100644 --- a/ext/intl/calendar/calendar_methods.cpp +++ b/ext/intl/calendar/calendar_methods.cpp @@ -165,7 +165,7 @@ U_CFUNC PHP_FUNCTION(intlcal_get_keyword_values_for_locale) *locale; size_t key_len, locale_len; - zend_bool commonly_used; + bool commonly_used; intl_error_reset(NULL); if (zend_parse_parameters(ZEND_NUM_ARGS(), "ssb", @@ -440,7 +440,7 @@ U_CFUNC PHP_FUNCTION(intlcal_roll) U_CFUNC PHP_FUNCTION(intlcal_clear) { zend_long field; - zend_bool field_is_null = 1; + bool field_is_null = 1; CALENDAR_METHOD_INIT_VARS; if (zend_parse_method_parameters(ZEND_NUM_ARGS(), @@ -757,7 +757,7 @@ U_CFUNC PHP_FUNCTION(intlcal_is_set) U_CFUNC PHP_FUNCTION(intlcal_is_weekend) { double date; - zend_bool date_is_null = 1; + bool date_is_null = 1; CALENDAR_METHOD_INIT_VARS; if (zend_parse_method_parameters(ZEND_NUM_ARGS(), getThis(), @@ -799,7 +799,7 @@ U_CFUNC PHP_FUNCTION(intlcal_set_first_day_of_week) U_CFUNC PHP_FUNCTION(intlcal_set_lenient) { - zend_bool is_lenient; + bool is_lenient; CALENDAR_METHOD_INIT_VARS; if (zend_parse_method_parameters(ZEND_NUM_ARGS(), getThis(), diff --git a/ext/intl/calendar/gregoriancalendar_methods.cpp b/ext/intl/calendar/gregoriancalendar_methods.cpp index 64b7539789..9cbb62ebdb 100644 --- a/ext/intl/calendar/gregoriancalendar_methods.cpp +++ b/ext/intl/calendar/gregoriancalendar_methods.cpp @@ -44,7 +44,7 @@ static inline GregorianCalendar *fetch_greg(Calendar_object *co) { } static void _php_intlgregcal_constructor_body( - INTERNAL_FUNCTION_PARAMETERS, zend_bool is_constructor) + INTERNAL_FUNCTION_PARAMETERS, bool is_constructor) { zval *tz_object = NULL; zval args_a[6] = {0}, diff --git a/ext/intl/converter/converter.c b/ext/intl/converter/converter.c index 697ebcda0b..90971302ce 100644 --- a/ext/intl/converter/converter.c +++ b/ext/intl/converter/converter.c @@ -134,7 +134,7 @@ PHP_METHOD(UConverter, fromUCallback) { /* }}} */ /* {{{ php_converter_check_limits */ -static inline zend_bool php_converter_check_limits(php_converter_object *objval, zend_long available, zend_long needed) { +static inline bool php_converter_check_limits(php_converter_object *objval, zend_long available, zend_long needed) { if (available < needed) { php_converter_throw_failure(objval, U_BUFFER_OVERFLOW_ERROR, "Buffer overrun " ZEND_LONG_FMT " bytes needed, " ZEND_LONG_FMT " available", needed, available); return 0; @@ -333,8 +333,8 @@ static void php_converter_from_u_callback(const void *context, /* }}} */ /* {{{ php_converter_set_callbacks */ -static inline zend_bool php_converter_set_callbacks(php_converter_object *objval, UConverter *cnv) { - zend_bool ret = 1; +static inline bool php_converter_set_callbacks(php_converter_object *objval, UConverter *cnv) { + bool ret = 1; UErrorCode error = U_ZERO_ERROR; if (objval->obj.ce == php_converter_ce) { @@ -363,7 +363,7 @@ static inline zend_bool php_converter_set_callbacks(php_converter_object *objval /* }}} */ /* {{{ php_converter_set_encoding */ -static zend_bool php_converter_set_encoding(php_converter_object *objval, +static bool php_converter_set_encoding(php_converter_object *objval, UConverter **pcnv, const char *enc, size_t enc_len ) { @@ -705,7 +705,7 @@ PHP_METHOD(UConverter, convert) { char *str; size_t str_len; zend_string *ret; - zend_bool reverse = 0; + bool reverse = 0; if (zend_parse_parameters(ZEND_NUM_ARGS(), "s|b", &str, &str_len, &reverse) == FAILURE) { diff --git a/ext/intl/dateformat/dateformat_attr.c b/ext/intl/dateformat/dateformat_attr.c index 2d2dbdfb6c..eee33b9925 100644 --- a/ext/intl/dateformat/dateformat_attr.c +++ b/ext/intl/dateformat/dateformat_attr.c @@ -69,7 +69,7 @@ PHP_FUNCTION( datefmt_get_pattern ) UChar value_buf[64]; uint32_t length = USIZE( value_buf ); UChar* value = value_buf; - zend_bool is_pattern_localized = false; + bool is_pattern_localized = false; DATE_FORMAT_METHOD_INIT_VARS; @@ -106,7 +106,7 @@ PHP_FUNCTION( datefmt_set_pattern ) size_t value_len = 0; int32_t slength = 0; UChar* svalue = NULL; - zend_bool is_pattern_localized = false; + bool is_pattern_localized = false; DATE_FORMAT_METHOD_INIT_VARS; @@ -184,7 +184,7 @@ PHP_FUNCTION( datefmt_is_lenient ) /* {{{ Set formatter lenient. */ PHP_FUNCTION( datefmt_set_lenient ) { - zend_bool isLenient = false; + bool isLenient = false; DATE_FORMAT_METHOD_INIT_VARS; diff --git a/ext/intl/dateformat/dateformat_attrcpp.cpp b/ext/intl/dateformat/dateformat_attrcpp.cpp index 343ef170d2..547c00c14c 100644 --- a/ext/intl/dateformat/dateformat_attrcpp.cpp +++ b/ext/intl/dateformat/dateformat_attrcpp.cpp @@ -158,7 +158,7 @@ U_CFUNC PHP_FUNCTION(datefmt_set_calendar) { zend_object *calendar_obj; zend_long calendar_long; - zend_bool calendar_is_null; + bool calendar_is_null; DATE_FORMAT_METHOD_INIT_VARS; object = getThis(); diff --git a/ext/intl/dateformat/dateformat_create.cpp b/ext/intl/dateformat/dateformat_create.cpp index e80b5d0131..40d2077c84 100644 --- a/ext/intl/dateformat/dateformat_create.cpp +++ b/ext/intl/dateformat/dateformat_create.cpp @@ -55,7 +55,7 @@ static zend_result datefmt_ctor(INTERNAL_FUNCTION_PARAMETERS) zend_long time_type = 0; zend_object *calendar_obj = NULL; zend_long calendar_long = 0; - zend_bool calendar_is_null = 1; + bool calendar_is_null = 1; Calendar *cal = NULL; zend_long calendar_type; bool calendar_owned; diff --git a/ext/intl/dateformat/dateformat_helpers.cpp b/ext/intl/dateformat/dateformat_helpers.cpp index 46c909bf95..b6700fdf40 100644 --- a/ext/intl/dateformat/dateformat_helpers.cpp +++ b/ext/intl/dateformat/dateformat_helpers.cpp @@ -29,7 +29,7 @@ extern "C" { using icu::GregorianCalendar; int datefmt_process_calendar_arg( - zend_object *calendar_obj, zend_long calendar_long, zend_bool calendar_is_null, Locale const& locale, + zend_object *calendar_obj, zend_long calendar_long, bool calendar_is_null, Locale const& locale, const char *func_name, intl_error *err, Calendar*& cal, zend_long& cal_int_type, bool& calendar_owned ) { char *msg; diff --git a/ext/intl/dateformat/dateformat_helpers.h b/ext/intl/dateformat/dateformat_helpers.h index 1f2d7eb32e..50466e6ca6 100644 --- a/ext/intl/dateformat/dateformat_helpers.h +++ b/ext/intl/dateformat/dateformat_helpers.h @@ -31,7 +31,7 @@ using icu::Calendar; using icu::DateFormat; int datefmt_process_calendar_arg( - zend_object *calendar_obj, zend_long calendar_long, zend_bool calendar_is_null, Locale const& locale, + zend_object *calendar_obj, zend_long calendar_long, bool calendar_is_null, Locale const& locale, const char *func_name, intl_error *err, Calendar*& cal, zend_long& cal_int_type, bool& calendar_owned ); diff --git a/ext/intl/grapheme/grapheme_string.c b/ext/intl/grapheme/grapheme_string.c index 7d8df14d2e..88a5920001 100644 --- a/ext/intl/grapheme/grapheme_string.c +++ b/ext/intl/grapheme/grapheme_string.c @@ -345,7 +345,7 @@ PHP_FUNCTION(grapheme_substr) UBreakIterator* bi = NULL; int sub_str_start_pos, sub_str_end_pos; int32_t (*iter_func)(UBreakIterator *); - zend_bool no_length = 1; + bool no_length = 1; if (zend_parse_parameters(ZEND_NUM_ARGS(), "sl|l!", &str, &str_len, &lstart, &length, &no_length) == FAILURE) { RETURN_THROWS(); @@ -546,7 +546,7 @@ static void strstr_common_handler(INTERNAL_FUNCTION_PARAMETERS, int f_ignore_cas const char *found; size_t haystack_len, needle_len; int32_t ret_pos, uchar_pos; - zend_bool part = 0; + bool part = 0; if (zend_parse_parameters(ZEND_NUM_ARGS(), "ss|b", &haystack, &haystack_len, &needle, &needle_len, &part) == FAILURE) { RETURN_THROWS(); diff --git a/ext/intl/locale/locale_methods.c b/ext/intl/locale/locale_methods.c index 9357475f55..d002fd0f82 100644 --- a/ext/intl/locale/locale_methods.c +++ b/ext/intl/locale/locale_methods.c @@ -1171,7 +1171,7 @@ PHP_FUNCTION(locale_filter_matches) char* cur_lang_tag = NULL; char* cur_loc_range = NULL; - zend_bool boolCanonical = 0; + bool boolCanonical = 0; UErrorCode status = U_ZERO_ERROR; intl_error_reset( NULL ); @@ -1444,7 +1444,7 @@ PHP_FUNCTION(locale_lookup) zval* arr = NULL; HashTable* hash_arr = NULL; - zend_bool boolCanonical = 0; + bool boolCanonical = 0; zend_string* result_str = NULL; intl_error_reset( NULL ); diff --git a/ext/intl/php_intl.h b/ext/intl/php_intl.h index b878371764..4dfb24e96e 100644 --- a/ext/intl/php_intl.h +++ b/ext/intl/php_intl.h @@ -50,7 +50,7 @@ ZEND_BEGIN_MODULE_GLOBALS(intl) UBreakIterator* grapheme_iterator; intl_error g_error; zend_long error_level; - zend_bool use_exceptions; + bool use_exceptions; ZEND_END_MODULE_GLOBALS(intl) #if defined(ZTS) && defined(COMPILE_DL_INTL) diff --git a/ext/intl/resourcebundle/resourcebundle_class.c b/ext/intl/resourcebundle/resourcebundle_class.c index 98a33b9284..ef82b2fd48 100644 --- a/ext/intl/resourcebundle/resourcebundle_class.c +++ b/ext/intl/resourcebundle/resourcebundle_class.c @@ -80,7 +80,7 @@ static int resourcebundle_ctor(INTERNAL_FUNCTION_PARAMETERS) size_t bundlename_len = 0; const char *locale; size_t locale_len = 0; - zend_bool fallback = 1; + bool fallback = 1; zval *object = return_value; ResourceBundle_object *rb = Z_INTL_RESOURCEBUNDLE_P( object ); @@ -167,7 +167,7 @@ static void resourcebundle_array_fetch(zend_object *object, zval *offset, zval * { int32_t meindex = 0; char * mekey = NULL; - zend_bool is_numeric = 0; + bool is_numeric = 0; char *pbuf; ResourceBundle_object *rb; @@ -231,7 +231,7 @@ zval *resourcebundle_array_get(zend_object *object, zval *offset, int type, zval /* {{{ Get resource identified by numerical index or key name. */ PHP_FUNCTION( resourcebundle_get ) { - zend_bool fallback = 1; + bool fallback = 1; zval * offset; zval * object; diff --git a/ext/intl/resourcebundle/resourcebundle_iterator.h b/ext/intl/resourcebundle/resourcebundle_iterator.h index fa2e24d848..dc92fa824e 100644 --- a/ext/intl/resourcebundle/resourcebundle_iterator.h +++ b/ext/intl/resourcebundle/resourcebundle_iterator.h @@ -22,7 +22,7 @@ typedef struct { zend_object_iterator intern; ResourceBundle_object *subject; - zend_bool is_table; + bool is_table; zend_long length; zval current; char *currentkey; diff --git a/ext/intl/timezone/timezone_class.h b/ext/intl/timezone/timezone_class.h index 8fe4524415..3d5f04008a 100644 --- a/ext/intl/timezone/timezone_class.h +++ b/ext/intl/timezone/timezone_class.h @@ -39,7 +39,7 @@ typedef struct { const TimeZone *utimezone; //whether to delete the timezone on object free - zend_bool should_delete; + bool should_delete; zend_object zo; } TimeZone_object; diff --git a/ext/intl/timezone/timezone_methods.cpp b/ext/intl/timezone/timezone_methods.cpp index 06b807f82f..6b48d4f8ee 100644 --- a/ext/intl/timezone/timezone_methods.cpp +++ b/ext/intl/timezone/timezone_methods.cpp @@ -224,7 +224,7 @@ U_CFUNC PHP_FUNCTION(intltz_create_time_zone_id_enumeration) size_t region_len = 0; int32_t offset, *offsetp = NULL; - zend_bool arg3isnull = 1; + bool arg3isnull = 1; intl_error_reset(NULL); @@ -411,7 +411,7 @@ U_CFUNC PHP_FUNCTION(intltz_use_daylight_time) U_CFUNC PHP_FUNCTION(intltz_get_offset) { double date; - zend_bool local; + bool local; zval *rawOffsetArg, *dstOffsetArg; int32_t rawOffset, @@ -484,7 +484,7 @@ static const TimeZone::EDisplayType display_types[] = { U_CFUNC PHP_FUNCTION(intltz_get_display_name) { - zend_bool daylight = 0; + bool daylight = 0; zend_long display_type = TimeZone::LONG; const char *locale_str = NULL; size_t dummy = 0; diff --git a/ext/json/json.c b/ext/json/json.c index 669f2851e7..872766239e 100644 --- a/ext/json/json.c +++ b/ext/json/json.c @@ -265,8 +265,8 @@ PHP_FUNCTION(json_decode) { char *str; size_t str_len; - zend_bool assoc = 0; /* return JS objects as PHP objects by default */ - zend_bool assoc_null = 1; + bool assoc = 0; /* return JS objects as PHP objects by default */ + bool assoc_null = 1; zend_long depth = PHP_JSON_PARSER_DEFAULT_DEPTH; zend_long options = 0; diff --git a/ext/json/json_scanner.re b/ext/json/json_scanner.re index 03ccdde58b..c8e3e0ebf5 100644 --- a/ext/json/json_scanner.re +++ b/ext/json/json_scanner.re @@ -168,7 +168,7 @@ std: return PHP_JSON_T_FALSE; } <JS>INT { - zend_bool bigint = 0, negative = s->token[0] == '-'; + bool bigint = 0, negative = s->token[0] == '-'; size_t digits = (size_t) (s->cursor - s->token - negative); if (digits >= PHP_JSON_INT_MAX_LENGTH) { if (digits == PHP_JSON_INT_MAX_LENGTH) { diff --git a/ext/json/php_json.h b/ext/json/php_json.h index ee8affa1d1..f6d7b376bd 100644 --- a/ext/json/php_json.h +++ b/ext/json/php_json.h @@ -100,7 +100,7 @@ PHP_JSON_API int php_json_encode_ex(smart_str *buf, zval *val, int options, zend PHP_JSON_API int php_json_encode(smart_str *buf, zval *val, int options); PHP_JSON_API int php_json_decode_ex(zval *return_value, const char *str, size_t str_len, zend_long options, zend_long depth); -static inline int php_json_decode(zval *return_value, const char *str, int str_len, zend_bool assoc, zend_long depth) +static inline int php_json_decode(zval *return_value, const char *str, int str_len, bool assoc, zend_long depth) { return php_json_decode_ex(return_value, str, str_len, assoc ? PHP_JSON_OBJECT_AS_ARRAY : 0, depth); } diff --git a/ext/ldap/ldap.c b/ext/ldap/ldap.c index c4f840b823..0d49bf188e 100644 --- a/ext/ldap/ldap.c +++ b/ext/ldap/ldap.c @@ -3563,7 +3563,7 @@ static void php_ldap_do_rename(INTERNAL_FUNCTION_PARAMETERS, int ext) int rc, msgid; char *dn, *newrdn, *newparent; size_t dn_len, newrdn_len, newparent_len; - zend_bool deleteoldrdn; + bool deleteoldrdn; if (zend_parse_parameters(ZEND_NUM_ARGS(), "rsssb|a!", &link, &dn, &dn_len, &newrdn, &newrdn_len, &newparent, &newparent_len, &deleteoldrdn, &serverctrls) != SUCCESS) { RETURN_THROWS(); @@ -3748,7 +3748,7 @@ PHP_FUNCTION(ldap_set_rebind_proc) /* }}} */ #endif -static zend_string* php_ldap_do_escape(const zend_bool *map, const char *value, size_t valuelen, zend_long flags) +static zend_string* php_ldap_do_escape(const bool *map, const char *value, size_t valuelen, zend_long flags) { char hex[] = "0123456789abcdef"; size_t i, p = 0; @@ -3785,7 +3785,7 @@ static zend_string* php_ldap_do_escape(const zend_bool *map, const char *value, return ret; } -static void php_ldap_escape_map_set_chars(zend_bool *map, const char *chars, const size_t charslen, char escape) +static void php_ldap_escape_map_set_chars(bool *map, const char *chars, const size_t charslen, char escape) { size_t i = 0; while (i < charslen) { @@ -3799,7 +3799,7 @@ PHP_FUNCTION(ldap_escape) size_t valuelen = 0, ignoreslen = 0; int i; zend_long flags = 0; - zend_bool map[256] = {0}, havecharlist = 0; + bool map[256] = {0}, havecharlist = 0; if (zend_parse_parameters(ZEND_NUM_ARGS(), "s|sl", &value, &valuelen, &ignores, &ignoreslen, &flags) != SUCCESS) { RETURN_THROWS(); diff --git a/ext/libxml/libxml.c b/ext/libxml/libxml.c index 7dc4804905..b3ce853ef1 100644 --- a/ext/libxml/libxml.c +++ b/ext/libxml/libxml.c @@ -939,7 +939,7 @@ PHP_FUNCTION(libxml_set_streams_context) PHP_FUNCTION(libxml_use_internal_errors) { xmlStructuredErrorFunc current_handler; - zend_bool use_errors, use_errors_is_null = 1, retval; + bool use_errors, use_errors_is_null = 1, retval; ZEND_PARSE_PARAMETERS_START(0, 1) Z_PARAM_OPTIONAL @@ -1059,9 +1059,9 @@ PHP_FUNCTION(libxml_clear_errors) } /* }}} */ -PHP_LIBXML_API zend_bool php_libxml_disable_entity_loader(zend_bool disable) /* {{{ */ +PHP_LIBXML_API bool php_libxml_disable_entity_loader(bool disable) /* {{{ */ { - zend_bool old = LIBXML(entity_loader_disabled); + bool old = LIBXML(entity_loader_disabled); LIBXML(entity_loader_disabled) = disable; return old; @@ -1070,7 +1070,7 @@ PHP_LIBXML_API zend_bool php_libxml_disable_entity_loader(zend_bool disable) /* /* {{{ Disable/Enable ability to load external entities */ PHP_FUNCTION(libxml_disable_entity_loader) { - zend_bool disable = 1; + bool disable = 1; ZEND_PARSE_PARAMETERS_START(0, 1) Z_PARAM_OPTIONAL diff --git a/ext/libxml/php_libxml.h b/ext/libxml/php_libxml.h index 85ffcd3969..784bc457ae 100644 --- a/ext/libxml/php_libxml.h +++ b/ext/libxml/php_libxml.h @@ -47,7 +47,7 @@ ZEND_BEGIN_MODULE_GLOBALS(libxml) zend_fcall_info fci; zend_fcall_info_cache fcc; } entity_loader; - zend_bool entity_loader_disabled; + bool entity_loader_disabled; ZEND_END_MODULE_GLOBALS(libxml) typedef struct _libxml_doc_props { @@ -106,7 +106,7 @@ PHP_LIBXML_API void php_libxml_ctx_error(void *ctx, const char *msg, ...); PHP_LIBXML_API int php_libxml_xmlCheckUTF8(const unsigned char *s); PHP_LIBXML_API void php_libxml_switch_context(zval *context, zval *oldcontext); PHP_LIBXML_API void php_libxml_issue_error(int level, const char *msg); -PHP_LIBXML_API zend_bool php_libxml_disable_entity_loader(zend_bool disable); +PHP_LIBXML_API bool php_libxml_disable_entity_loader(bool disable); /* Init/shutdown functions*/ PHP_LIBXML_API void php_libxml_initialize(void); diff --git a/ext/mbstring/mbstring.c b/ext/mbstring/mbstring.c index dd3b83649d..f7223e973c 100644 --- a/ext/mbstring/mbstring.c +++ b/ext/mbstring/mbstring.c @@ -73,9 +73,9 @@ static void php_mb_gpc_get_detect_order(const zend_encoding ***list, size_t *lis static void php_mb_gpc_set_input_encoding(const zend_encoding *encoding); -static inline zend_bool php_mb_is_unsupported_no_encoding(enum mbfl_no_encoding no_enc); +static inline bool php_mb_is_unsupported_no_encoding(enum mbfl_no_encoding no_enc); -static inline zend_bool php_mb_is_no_encoding_utf8(enum mbfl_no_encoding no_enc); +static inline bool php_mb_is_no_encoding_utf8(enum mbfl_no_encoding no_enc); /* }}} */ /* {{{ php_mb_default_identify_list */ @@ -252,14 +252,14 @@ static size_t count_commas(const char *p, const char *end) { */ static zend_result php_mb_parse_encoding_list(const char *value, size_t value_length, const mbfl_encoding ***return_list, size_t *return_size, bool persistent, uint32_t arg_num, - zend_bool allow_pass_encoding) + bool allow_pass_encoding) { if (value == NULL || value_length == 0) { *return_list = NULL; *return_size = 0; return SUCCESS; } else { - zend_bool included_auto; + bool included_auto; size_t n, size; char *p1, *endp, *tmpstr; const mbfl_encoding **entry, **list; @@ -347,7 +347,7 @@ static int php_mb_parse_encoding_array(HashTable *target_hash, const mbfl_encodi size_t size = zend_hash_num_elements(target_hash) + MBSTRG(default_detect_order_list_size); const mbfl_encoding **list = ecalloc(size, sizeof(mbfl_encoding*)); const mbfl_encoding **entry = list; - zend_bool included_auto = 0; + bool included_auto = 0; size_t n = 0; zval *hash_entry; ZEND_HASH_FOREACH_VAL(target_hash, hash_entry) { @@ -1421,7 +1421,7 @@ PHP_FUNCTION(mb_substitute_character) { zend_string *substitute_character = NULL; zend_long substitute_codepoint; - zend_bool substitute_is_null = 1; + bool substitute_is_null = 1; ZEND_PARSE_PARAMETERS_START(0, 1) Z_PARAM_OPTIONAL @@ -2000,7 +2000,7 @@ static void php_mb_strstr_variants(INTERNAL_FUNCTION_PARAMETERS, unsigned int va char *haystack_val, *needle_val; mbfl_string haystack, needle, result, *ret = NULL; zend_string *encoding_name = NULL; - zend_bool part = 0; + bool part = 0; ZEND_PARSE_PARAMETERS_START(2, 4) Z_PARAM_STRING(haystack_val, haystack.len) @@ -2124,7 +2124,7 @@ PHP_FUNCTION(mb_substr) zend_long from, len; size_t real_from, real_len; size_t str_len; - zend_bool len_is_null = 1; + bool len_is_null = 1; mbfl_string string, result, *ret; ZEND_PARSE_PARAMETERS_START(2, 4) @@ -2188,7 +2188,7 @@ PHP_FUNCTION(mb_strcut) zend_string *encoding = NULL; char *string_val; zend_long from, len; - zend_bool len_is_null = 1; + bool len_is_null = 1; mbfl_string string, result, *ret; ZEND_PARSE_PARAMETERS_START(2, 4) @@ -2332,7 +2332,7 @@ PHP_FUNCTION(mb_strimwidth) /* See mbfl_no_encoding definition for list of unsupported encodings */ -static inline zend_bool php_mb_is_unsupported_no_encoding(enum mbfl_no_encoding no_enc) +static inline bool php_mb_is_unsupported_no_encoding(enum mbfl_no_encoding no_enc) { return ((no_enc >= mbfl_no_encoding_invalid && no_enc <= mbfl_no_encoding_qprint) || (no_enc >= mbfl_no_encoding_utf7 && no_enc <= mbfl_no_encoding_utf7imap) @@ -2342,7 +2342,7 @@ static inline zend_bool php_mb_is_unsupported_no_encoding(enum mbfl_no_encoding /* See mbfl_no_encoding definition for list of UTF-8 encodings */ -static inline zend_bool php_mb_is_no_encoding_utf8(enum mbfl_no_encoding no_enc) +static inline bool php_mb_is_no_encoding_utf8(enum mbfl_no_encoding no_enc) { return (no_enc >= mbfl_no_encoding_utf8 && no_enc <= mbfl_no_encoding_utf8_sb); } @@ -2501,7 +2501,7 @@ PHP_FUNCTION(mb_convert_encoding) HashTable *input_ht, *from_encodings_ht = NULL; const mbfl_encoding **from_encodings; size_t num_from_encodings; - zend_bool free_from_encodings; + bool free_from_encodings; ZEND_PARSE_PARAMETERS_START(2, 3) Z_PARAM_ARRAY_HT_OR_STR(input_ht, input_str) @@ -2673,13 +2673,13 @@ PHP_FUNCTION(mb_detect_encoding) size_t str_len; zend_string *encoding_str = NULL; HashTable *encoding_ht = NULL; - zend_bool strict = 0; + bool strict = 0; mbfl_string string; const mbfl_encoding *ret; const mbfl_encoding **elist; size_t size; - zend_bool free_elist; + bool free_elist; ZEND_PARSE_PARAMETERS_START(1, 3) Z_PARAM_STRING(str, str_len) @@ -3184,7 +3184,7 @@ PHP_FUNCTION(mb_encode_numericentity) zend_string *encoding = NULL; int mapsize; HashTable *target_hash; - zend_bool is_hex = 0; + bool is_hex = 0; mbfl_string string, result, *ret; ZEND_PARSE_PARAMETERS_START(2, 4) diff --git a/ext/mbstring/mbstring.h b/ext/mbstring/mbstring.h index 561efeb422..eaef0bf63d 100644 --- a/ext/mbstring/mbstring.h +++ b/ext/mbstring/mbstring.h @@ -95,8 +95,8 @@ ZEND_BEGIN_MODULE_GLOBALS(mbstring) int current_filter_illegal_mode; int current_filter_illegal_substchar; enum mbfl_no_language language; - zend_bool encoding_translation; - zend_bool strict_detection; + bool encoding_translation; + bool strict_detection; size_t illegalchars; mbfl_buffer_converter *outconv; void *http_output_conv_mimetypes; @@ -107,9 +107,9 @@ ZEND_BEGIN_MODULE_GLOBALS(mbstring) zend_string *last_used_encoding_name; const mbfl_encoding *last_used_encoding; /* Whether an explicit internal_encoding / http_output / http_input encoding was set. */ - zend_bool internal_encoding_set; - zend_bool http_output_set; - zend_bool http_input_set; + bool internal_encoding_set; + bool http_output_set; + bool http_input_set; #ifdef HAVE_MBREGEX zend_long regex_retry_limit; #endif diff --git a/ext/mysqli/mysqli.c b/ext/mysqli/mysqli.c index 50c5038f15..c250547880 100644 --- a/ext/mysqli/mysqli.c +++ b/ext/mysqli/mysqli.c @@ -70,7 +70,7 @@ zend_class_entry *mysqli_warning_class_entry; zend_class_entry *mysqli_exception_class_entry; -typedef int (*mysqli_read_t)(mysqli_object *obj, zval *rv, zend_bool quiet); +typedef int (*mysqli_read_t)(mysqli_object *obj, zval *rv, bool quiet); typedef int (*mysqli_write_t)(mysqli_object *obj, zval *newval); typedef struct _mysqli_prop_handler { @@ -277,7 +277,7 @@ static void mysqli_warning_free_storage(zend_object *object) /* }}} */ /* {{{ mysqli_read_na */ -static int mysqli_read_na(mysqli_object *obj, zval *retval, zend_bool quiet) +static int mysqli_read_na(mysqli_object *obj, zval *retval, bool quiet) { if (!quiet) { zend_throw_error(NULL, "Cannot read property"); diff --git a/ext/mysqli/mysqli_api.c b/ext/mysqli/mysqli_api.c index 1670a65054..56f762ab09 100644 --- a/ext/mysqli/mysqli_api.c +++ b/ext/mysqli/mysqli_api.c @@ -71,7 +71,7 @@ mysqli_escape_string_for_tx_name_in_comment(const char * const name) { char * ret = NULL; if (name) { - zend_bool warned = FALSE; + bool warned = FALSE; const char * p_orig = name; char * p_copy; p_copy = ret = emalloc(strlen(name) + 1 + 2 + 2 + 1); /* space, open, close, NullS */ @@ -107,7 +107,7 @@ mysqli_escape_string_for_tx_name_in_comment(const char * const name) /* }}} */ /* {{{ mysqli_commit_or_rollback_libmysql */ -static int mysqli_commit_or_rollback_libmysql(MYSQL * conn, zend_bool commit, const uint32_t mode, const char * const name) +static int mysqli_commit_or_rollback_libmysql(MYSQL * conn, bool commit, const uint32_t mode, const char * const name) { int ret; smart_str tmp_str = {0}; @@ -161,7 +161,7 @@ PHP_FUNCTION(mysqli_autocommit) { MY_MYSQL *mysql; zval *mysql_link; - zend_bool automode; + bool automode; if (zend_parse_method_parameters(ZEND_NUM_ARGS(), getThis(), "Ob", &mysql_link, mysqli_link_class_entry, &automode) == FAILURE) { RETURN_THROWS(); @@ -1057,7 +1057,7 @@ void mysqli_stmt_fetch_mysqlnd(INTERNAL_FUNCTION_PARAMETERS) { MY_STMT *stmt; zval *mysql_stmt; - zend_bool fetched_anything; + bool fetched_anything; if (zend_parse_method_parameters(ZEND_NUM_ARGS(), getThis(), "O", &mysql_stmt, mysqli_stmt_class_entry) == FAILURE) { RETURN_THROWS(); @@ -1426,7 +1426,7 @@ PHP_FUNCTION(mysqli_info) /* }}} */ /* {{{ php_mysqli_init() */ -void php_mysqli_init(INTERNAL_FUNCTION_PARAMETERS, zend_bool is_method) +void php_mysqli_init(INTERNAL_FUNCTION_PARAMETERS, bool is_method) { MYSQLI_RESOURCE *mysqli_resource; MY_MYSQL *mysql; diff --git a/ext/mysqli/mysqli_driver.c b/ext/mysqli/mysqli_driver.c index c3fb5e48bb..5557b0ac2b 100644 --- a/ext/mysqli/mysqli_driver.c +++ b/ext/mysqli/mysqli_driver.c @@ -27,7 +27,7 @@ #include "zend_exceptions.h" #define MAP_PROPERTY_MYG_BOOL_READ(name, value) \ -static int name(mysqli_object *obj, zval *retval, zend_bool quiet) \ +static int name(mysqli_object *obj, zval *retval, bool quiet) \ { \ ZVAL_BOOL(retval, MyG(value)); \ return SUCCESS; \ @@ -41,7 +41,7 @@ static int name(mysqli_object *obj, zval *value) \ } \ #define MAP_PROPERTY_MYG_LONG_READ(name, value) \ -static int name(mysqli_object *obj, zval *retval, zend_bool quiet) \ +static int name(mysqli_object *obj, zval *retval, bool quiet) \ { \ ZVAL_LONG(retval, MyG(value)); \ return SUCCESS; \ @@ -55,7 +55,7 @@ static int name(mysqli_object *obj, zval *value) \ } \ #define MAP_PROPERTY_MYG_STRING_READ(name, value) \ -static int name(mysqli_object *obj, zval *retval, zend_bool quiet) \ +static int name(mysqli_object *obj, zval *retval, bool quiet) \ { \ ZVAL_STRING(retval, MyG(value)); \ return SUCCESS; \ @@ -79,7 +79,7 @@ static int driver_report_write(mysqli_object *obj, zval *value) /* }}} */ /* {{{ property driver_client_version_read */ -static int driver_client_version_read(mysqli_object *obj, zval *retval, zend_bool quiet) +static int driver_client_version_read(mysqli_object *obj, zval *retval, bool quiet) { ZVAL_LONG(retval, mysql_get_client_version()); @@ -88,7 +88,7 @@ static int driver_client_version_read(mysqli_object *obj, zval *retval, zend_boo /* }}} */ /* {{{ property driver_client_info_read */ -static int driver_client_info_read(mysqli_object *obj, zval *retval, zend_bool quiet) +static int driver_client_info_read(mysqli_object *obj, zval *retval, bool quiet) { ZVAL_STRING(retval, (char *)mysql_get_client_info()); @@ -97,7 +97,7 @@ static int driver_client_info_read(mysqli_object *obj, zval *retval, zend_bool q /* }}} */ /* {{{ property driver_driver_version_read */ -static int driver_driver_version_read(mysqli_object *obj, zval *retval, zend_bool quiet) +static int driver_driver_version_read(mysqli_object *obj, zval *retval, bool quiet) { ZVAL_LONG(retval, MYSQLI_VERSION_ID); diff --git a/ext/mysqli/mysqli_nonapi.c b/ext/mysqli/mysqli_nonapi.c index 30b197d10d..4870a4319a 100644 --- a/ext/mysqli/mysqli_nonapi.c +++ b/ext/mysqli/mysqli_nonapi.c @@ -47,7 +47,7 @@ static void php_mysqli_set_error(zend_long mysql_errno, char *mysql_err) } /* }}} */ -void mysqli_common_connect(INTERNAL_FUNCTION_PARAMETERS, zend_bool is_real_connect, zend_bool in_ctor) /* {{{ */ +void mysqli_common_connect(INTERNAL_FUNCTION_PARAMETERS, bool is_real_connect, bool in_ctor) /* {{{ */ { MY_MYSQL *mysql = NULL; MYSQLI_RESOURCE *mysqli_resource = NULL; @@ -56,14 +56,14 @@ void mysqli_common_connect(INTERNAL_FUNCTION_PARAMETERS, zend_bool is_real_conne *ssl_key = NULL, *ssl_cert = NULL, *ssl_ca = NULL, *ssl_capath = NULL, *ssl_cipher = NULL; size_t hostname_len = 0, username_len = 0, passwd_len = 0, dbname_len = 0, socket_len = 0; - zend_bool persistent = FALSE, ssl = FALSE; + bool persistent = FALSE, ssl = FALSE; zend_long port = 0, flags = 0; - zend_bool port_is_null = 1; + bool port_is_null = 1; zend_string *hash_key = NULL; - zend_bool new_connection = FALSE; + bool new_connection = FALSE; zend_resource *le; mysqli_plist_entry *plist = NULL; - zend_bool self_alloced = 0; + bool self_alloced = 0; #if !defined(MYSQL_USE_MYSQLND) @@ -1203,7 +1203,7 @@ PHP_FUNCTION(mysqli_begin_transaction) #ifndef MYSQLI_USE_MYSQLND /* {{{ */ -static int mysqli_savepoint_libmysql(MYSQL * conn, const char * const name, zend_bool release) +static int mysqli_savepoint_libmysql(MYSQL * conn, const char * const name, bool release) { int ret; char * query; diff --git a/ext/mysqli/mysqli_priv.h b/ext/mysqli/mysqli_priv.h index f537514968..0e8baba576 100644 --- a/ext/mysqli/mysqli_priv.h +++ b/ext/mysqli/mysqli_priv.h @@ -127,8 +127,8 @@ if ((MyG(report_mode) & MYSQLI_REPORT_ERROR) && mysql_stmt_errno(stmt)) { \ php_mysqli_report_error(mysql_stmt_sqlstate(stmt), mysql_stmt_errno(stmt), mysql_stmt_error(stmt)); \ } -void mysqli_common_connect(INTERNAL_FUNCTION_PARAMETERS, zend_bool is_real_connect, zend_bool in_ctor); +void mysqli_common_connect(INTERNAL_FUNCTION_PARAMETERS, bool is_real_connect, bool in_ctor); -void php_mysqli_init(INTERNAL_FUNCTION_PARAMETERS, zend_bool is_method); +void php_mysqli_init(INTERNAL_FUNCTION_PARAMETERS, bool is_method); #endif /* MYSQLI_PRIV_H */ diff --git a/ext/mysqli/mysqli_prop.c b/ext/mysqli/mysqli_prop.c index 2ee059c756..9749fe5632 100644 --- a/ext/mysqli/mysqli_prop.c +++ b/ext/mysqli/mysqli_prop.c @@ -72,7 +72,7 @@ if (!obj->ptr) { \ } #define MYSQLI_MAP_PROPERTY_FUNC_LONG( __func, __int_func, __get_type, __ret_type, __ret_type_sprint_mod)\ -static int __func(mysqli_object *obj, zval *retval, zend_bool quiet) \ +static int __func(mysqli_object *obj, zval *retval, bool quiet) \ {\ __ret_type l;\ __get_type;\ @@ -90,7 +90,7 @@ static int __func(mysqli_object *obj, zval *retval, zend_bool quiet) \ } #define MYSQLI_MAP_PROPERTY_FUNC_STRING(__func, __int_func, __get_type)\ -static int __func(mysqli_object *obj, zval *retval, zend_bool quiet)\ +static int __func(mysqli_object *obj, zval *retval, bool quiet)\ {\ char *c;\ __get_type;\ @@ -108,7 +108,7 @@ static int __func(mysqli_object *obj, zval *retval, zend_bool quiet)\ } /* {{{ property link_client_version_read */ -static int link_client_version_read(mysqli_object *obj, zval *retval, zend_bool quiet) +static int link_client_version_read(mysqli_object *obj, zval *retval, bool quiet) { ZVAL_LONG(retval, MYSQL_VERSION_ID); @@ -117,7 +117,7 @@ static int link_client_version_read(mysqli_object *obj, zval *retval, zend_bool /* }}} */ /* {{{ property link_client_info_read */ -static int link_client_info_read(mysqli_object *obj, zval *retval, zend_bool quiet) +static int link_client_info_read(mysqli_object *obj, zval *retval, bool quiet) { CHECK_STATUS(MYSQLI_STATUS_INITIALIZED, quiet); ZVAL_STRING(retval, MYSQL_SERVER_VERSION); @@ -127,7 +127,7 @@ static int link_client_info_read(mysqli_object *obj, zval *retval, zend_bool qui /* }}} */ /* {{{ property link_connect_errno_read */ -static int link_connect_errno_read(mysqli_object *obj, zval *retval, zend_bool quiet) +static int link_connect_errno_read(mysqli_object *obj, zval *retval, bool quiet) { ZVAL_LONG(retval, (zend_long)MyG(error_no)); @@ -136,7 +136,7 @@ static int link_connect_errno_read(mysqli_object *obj, zval *retval, zend_bool q /* }}} */ /* {{{ property link_connect_error_read */ -static int link_connect_error_read(mysqli_object *obj, zval *retval, zend_bool quiet) +static int link_connect_error_read(mysqli_object *obj, zval *retval, bool quiet) { if (MyG(error_msg)) { ZVAL_STRING(retval, MyG(error_msg)); @@ -149,7 +149,7 @@ static int link_connect_error_read(mysqli_object *obj, zval *retval, zend_bool q /* }}} */ /* {{{ property link_affected_rows_read */ -static int link_affected_rows_read(mysqli_object *obj, zval *retval, zend_bool quiet) +static int link_affected_rows_read(mysqli_object *obj, zval *retval, bool quiet) { MY_MYSQL *mysql; my_ulonglong rc; @@ -182,7 +182,7 @@ static int link_affected_rows_read(mysqli_object *obj, zval *retval, zend_bool q /* }}} */ /* {{{ property link_error_list_read */ -static int link_error_list_read(mysqli_object *obj, zval *retval, zend_bool quiet) +static int link_error_list_read(mysqli_object *obj, zval *retval, bool quiet) { MY_MYSQL *mysql; @@ -243,7 +243,7 @@ MYSQLI_MAP_PROPERTY_FUNC_LONG(link_warning_count_read, mysql_warning_count, MYSQ /* result properties */ /* {{{ property result_type_read */ -static int result_type_read(mysqli_object *obj, zval *retval, zend_bool quiet) +static int result_type_read(mysqli_object *obj, zval *retval, bool quiet) { MYSQL_RES *p; @@ -261,7 +261,7 @@ static int result_type_read(mysqli_object *obj, zval *retval, zend_bool quiet) /* }}} */ /* {{{ property result_lengths_read */ -static int result_lengths_read(mysqli_object *obj, zval *retval, zend_bool quiet) +static int result_lengths_read(mysqli_object *obj, zval *retval, bool quiet) { MYSQL_RES *p; #ifdef MYSQLI_USE_MYSQLND @@ -297,7 +297,7 @@ MYSQLI_MAP_PROPERTY_FUNC_LONG(result_num_rows_read, mysql_num_rows, MYSQLI_GET_R /* statement properties */ /* {{{ property stmt_id_read */ -static int stmt_id_read(mysqli_object *obj, zval *retval, zend_bool quiet) +static int stmt_id_read(mysqli_object *obj, zval *retval, bool quiet) { MY_STMT *p; @@ -316,7 +316,7 @@ static int stmt_id_read(mysqli_object *obj, zval *retval, zend_bool quiet) /* }}} */ /* {{{ property stmt_affected_rows_read */ -static int stmt_affected_rows_read(mysqli_object *obj, zval *retval, zend_bool quiet) +static int stmt_affected_rows_read(mysqli_object *obj, zval *retval, bool quiet) { MY_STMT *p; my_ulonglong rc; @@ -347,7 +347,7 @@ static int stmt_affected_rows_read(mysqli_object *obj, zval *retval, zend_bool q /* }}} */ /* {{{ property stmt_error_list_read */ -static int stmt_error_list_read(mysqli_object *obj, zval *retval, zend_bool quiet) +static int stmt_error_list_read(mysqli_object *obj, zval *retval, bool quiet) { MY_STMT * stmt; diff --git a/ext/mysqli/mysqli_warning.c b/ext/mysqli/mysqli_warning.c index 30af6cb960..9d2b05b30a 100644 --- a/ext/mysqli/mysqli_warning.c +++ b/ext/mysqli/mysqli_warning.c @@ -195,7 +195,7 @@ PHP_METHOD(mysqli_warning, next) /* }}} */ /* {{{ property mysqli_warning_message */ -static int mysqli_warning_message(mysqli_object *obj, zval *retval, zend_bool quiet) +static int mysqli_warning_message(mysqli_object *obj, zval *retval, bool quiet) { MYSQLI_WARNING *w; @@ -215,7 +215,7 @@ static int mysqli_warning_message(mysqli_object *obj, zval *retval, zend_bool qu /* }}} */ /* {{{ property mysqli_warning_sqlstate */ -static int mysqli_warning_sqlstate(mysqli_object *obj, zval *retval, zend_bool quiet) +static int mysqli_warning_sqlstate(mysqli_object *obj, zval *retval, bool quiet) { MYSQLI_WARNING *w; @@ -235,7 +235,7 @@ static int mysqli_warning_sqlstate(mysqli_object *obj, zval *retval, zend_bool q /* }}} */ /* {{{ property mysqli_warning_error */ -static int mysqli_warning_errno(mysqli_object *obj, zval *retval, zend_bool quiet) +static int mysqli_warning_errno(mysqli_object *obj, zval *retval, bool quiet) { MYSQLI_WARNING *w; diff --git a/ext/mysqli/php_mysqli_structs.h b/ext/mysqli/php_mysqli_structs.h index 16ed9ddefc..6ab9615985 100644 --- a/ext/mysqli/php_mysqli_structs.h +++ b/ext/mysqli/php_mysqli_structs.h @@ -88,7 +88,7 @@ typedef struct { zval li_read; php_stream *li_stream; unsigned int multi_query; - zend_bool persistent; + bool persistent; #ifdef MYSQLI_USE_MYSQLND int async_result_fetch_type; #endif @@ -124,7 +124,7 @@ struct st_mysqli_warning { typedef struct _mysqli_property_entry { const char *pname; size_t pname_length; - int (*r_func)(mysqli_object *obj, zval *retval, zend_bool quiet); + int (*r_func)(mysqli_object *obj, zval *retval, bool quiet); int (*w_func)(mysqli_object *obj, zval *value); } mysqli_property_entry; @@ -289,7 +289,7 @@ ZEND_BEGIN_MODULE_GLOBALS(mysqli) zend_long report_mode; HashTable *report_ht; zend_ulong multi_query; - zend_bool rollback_on_cached_plink; + bool rollback_on_cached_plink; ZEND_END_MODULE_GLOBALS(mysqli) #define MyG(v) ZEND_MODULE_GLOBALS_ACCESSOR(mysqli, v) diff --git a/ext/mysqlnd/mysqlnd.h b/ext/mysqlnd/mysqlnd.h index e8db599b9d..09aee0cc81 100644 --- a/ext/mysqlnd/mysqlnd.h +++ b/ext/mysqlnd/mysqlnd.h @@ -80,7 +80,7 @@ PHPAPI const MYSQLND_CHARSET * mysqlnd_find_charset_name(const char * const char #define mysqlnd_connect(conn, host, user, pass, pass_len, db, db_len, port, socket, mysql_flags, client_api_flags) \ mysqlnd_connection_connect((conn), (host), (user), (pass), (pass_len), (db), (db_len), (port), (socket), (mysql_flags), (client_api_flags)) -PHPAPI MYSQLND * mysqlnd_connection_init(const size_t client_flags, const zend_bool persistent, MYSQLND_CLASS_METHODS_TYPE(mysqlnd_object_factory) *object_factory); +PHPAPI MYSQLND * mysqlnd_connection_init(const size_t client_flags, const bool persistent, MYSQLND_CLASS_METHODS_TYPE(mysqlnd_object_factory) *object_factory); PHPAPI MYSQLND * mysqlnd_connection_connect(MYSQLND * conn, const char * const host, const char * const user, @@ -308,8 +308,8 @@ ZEND_BEGIN_MODULE_GLOBALS(mysqlnd) zend_long net_read_timeout; zend_long mempool_default_size; char * sha256_server_public_key; - zend_bool collect_statistics; - zend_bool collect_memory_statistics; + bool collect_statistics; + bool collect_memory_statistics; ZEND_END_MODULE_GLOBALS(mysqlnd) PHPAPI ZEND_EXTERN_MODULE_GLOBALS(mysqlnd) diff --git a/ext/mysqlnd/mysqlnd_alloc.c b/ext/mysqlnd/mysqlnd_alloc.c index 44a691e413..ad32ba666c 100644 --- a/ext/mysqlnd/mysqlnd_alloc.c +++ b/ext/mysqlnd/mysqlnd_alloc.c @@ -69,7 +69,7 @@ PHPAPI const char * mysqlnd_debug_std_no_trace_funcs[] = static void * _mysqlnd_emalloc(size_t size MYSQLND_MEM_D) { void *ret; - zend_bool collect_memory_statistics = MYSQLND_G(collect_memory_statistics); + bool collect_memory_statistics = MYSQLND_G(collect_memory_statistics); TRACE_ALLOC_ENTER(mysqlnd_emalloc_name); ret = emalloc_rel(REAL_SIZE(size)); @@ -85,10 +85,10 @@ static void * _mysqlnd_emalloc(size_t size MYSQLND_MEM_D) /* {{{ _mysqlnd_pemalloc */ -static void * _mysqlnd_pemalloc(size_t size, zend_bool persistent MYSQLND_MEM_D) +static void * _mysqlnd_pemalloc(size_t size, bool persistent MYSQLND_MEM_D) { void *ret; - zend_bool collect_memory_statistics = MYSQLND_G(collect_memory_statistics); + bool collect_memory_statistics = MYSQLND_G(collect_memory_statistics); TRACE_ALLOC_ENTER(mysqlnd_pemalloc_name); ret = pemalloc_rel(REAL_SIZE(size), persistent); @@ -110,7 +110,7 @@ static void * _mysqlnd_pemalloc(size_t size, zend_bool persistent MYSQLND_MEM_D) static void * _mysqlnd_ecalloc(unsigned int nmemb, size_t size MYSQLND_MEM_D) { void *ret; - zend_bool collect_memory_statistics = MYSQLND_G(collect_memory_statistics); + bool collect_memory_statistics = MYSQLND_G(collect_memory_statistics); TRACE_ALLOC_ENTER(mysqlnd_ecalloc_name); TRACE_ALLOC_INF_FMT("before: %lu", zend_memory_usage(FALSE)); ret = ecalloc_rel(nmemb, REAL_SIZE(size)); @@ -127,10 +127,10 @@ static void * _mysqlnd_ecalloc(unsigned int nmemb, size_t size MYSQLND_MEM_D) /* {{{ _mysqlnd_pecalloc */ -static void * _mysqlnd_pecalloc(unsigned int nmemb, size_t size, zend_bool persistent MYSQLND_MEM_D) +static void * _mysqlnd_pecalloc(unsigned int nmemb, size_t size, bool persistent MYSQLND_MEM_D) { void *ret; - zend_bool collect_memory_statistics = MYSQLND_G(collect_memory_statistics); + bool collect_memory_statistics = MYSQLND_G(collect_memory_statistics); TRACE_ALLOC_ENTER(mysqlnd_pecalloc_name); ret = pecalloc_rel(nmemb, REAL_SIZE(size), persistent); @@ -152,7 +152,7 @@ static void * _mysqlnd_pecalloc(unsigned int nmemb, size_t size, zend_bool persi static void * _mysqlnd_erealloc(void *ptr, size_t new_size MYSQLND_MEM_D) { void *ret; - zend_bool collect_memory_statistics = MYSQLND_G(collect_memory_statistics); + bool collect_memory_statistics = MYSQLND_G(collect_memory_statistics); size_t old_size = collect_memory_statistics && ptr? *(size_t *) (((char*)ptr) - sizeof(size_t)) : 0; TRACE_ALLOC_ENTER(mysqlnd_erealloc_name); TRACE_ALLOC_INF_FMT("ptr=%p old_size=%lu, new_size=%lu", ptr, old_size, new_size); @@ -169,10 +169,10 @@ static void * _mysqlnd_erealloc(void *ptr, size_t new_size MYSQLND_MEM_D) /* {{{ _mysqlnd_perealloc */ -static void * _mysqlnd_perealloc(void *ptr, size_t new_size, zend_bool persistent MYSQLND_MEM_D) +static void * _mysqlnd_perealloc(void *ptr, size_t new_size, bool persistent MYSQLND_MEM_D) { void *ret; - zend_bool collect_memory_statistics = MYSQLND_G(collect_memory_statistics); + bool collect_memory_statistics = MYSQLND_G(collect_memory_statistics); size_t old_size = collect_memory_statistics && ptr? *(size_t *) (((char*)ptr) - sizeof(size_t)) : 0; TRACE_ALLOC_ENTER(mysqlnd_perealloc_name); TRACE_ALLOC_INF_FMT("ptr=%p old_size=%lu new_size=%lu persistent=%u", ptr, old_size, new_size, persistent); @@ -195,7 +195,7 @@ static void * _mysqlnd_perealloc(void *ptr, size_t new_size, zend_bool persisten static void _mysqlnd_efree(void *ptr MYSQLND_MEM_D) { size_t free_amount = 0; - zend_bool collect_memory_statistics = MYSQLND_G(collect_memory_statistics); + bool collect_memory_statistics = MYSQLND_G(collect_memory_statistics); TRACE_ALLOC_ENTER(mysqlnd_efree_name); #if PHP_DEBUG @@ -223,10 +223,10 @@ static void _mysqlnd_efree(void *ptr MYSQLND_MEM_D) /* {{{ _mysqlnd_pefree */ -static void _mysqlnd_pefree(void *ptr, zend_bool persistent MYSQLND_MEM_D) +static void _mysqlnd_pefree(void *ptr, bool persistent MYSQLND_MEM_D) { size_t free_amount = 0; - zend_bool collect_memory_statistics = MYSQLND_G(collect_memory_statistics); + bool collect_memory_statistics = MYSQLND_G(collect_memory_statistics); TRACE_ALLOC_ENTER(mysqlnd_pefree_name); #if PHP_DEBUG @@ -255,10 +255,10 @@ static void _mysqlnd_pefree(void *ptr, zend_bool persistent MYSQLND_MEM_D) /* {{{ _mysqlnd_pememdup */ -static char * _mysqlnd_pememdup(const char * const ptr, size_t length, zend_bool persistent MYSQLND_MEM_D) +static char * _mysqlnd_pememdup(const char * const ptr, size_t length, bool persistent MYSQLND_MEM_D) { char * ret; - zend_bool collect_memory_statistics = MYSQLND_G(collect_memory_statistics); + bool collect_memory_statistics = MYSQLND_G(collect_memory_statistics); TRACE_ALLOC_ENTER(mysqlnd_pememdup_name); #if PHP_DEBUG @@ -286,10 +286,10 @@ static char * _mysqlnd_pememdup(const char * const ptr, size_t length, zend_bool /* {{{ _mysqlnd_pestrndup */ -static char * _mysqlnd_pestrndup(const char * const ptr, size_t length, zend_bool persistent MYSQLND_MEM_D) +static char * _mysqlnd_pestrndup(const char * const ptr, size_t length, bool persistent MYSQLND_MEM_D) { char * ret; - zend_bool collect_memory_statistics = MYSQLND_G(collect_memory_statistics); + bool collect_memory_statistics = MYSQLND_G(collect_memory_statistics); TRACE_ALLOC_ENTER(mysqlnd_pestrndup_name); #if PHP_DEBUG @@ -327,12 +327,12 @@ static char * _mysqlnd_pestrndup(const char * const ptr, size_t length, zend_boo /* {{{ _mysqlnd_pestrdup */ -static char * _mysqlnd_pestrdup(const char * const ptr, zend_bool persistent MYSQLND_MEM_D) +static char * _mysqlnd_pestrdup(const char * const ptr, bool persistent MYSQLND_MEM_D) { char * ret; smart_str tmp_str = {0, 0}; const char * p = ptr; - zend_bool collect_memory_statistics = MYSQLND_G(collect_memory_statistics); + bool collect_memory_statistics = MYSQLND_G(collect_memory_statistics); TRACE_ALLOC_ENTER(mysqlnd_pestrdup_name); #if PHP_DEBUG { @@ -403,7 +403,7 @@ static void * mysqlnd_zend_mm_emalloc(size_t size MYSQLND_MEM_D) /* {{{ mysqlnd_zend_mm_pemalloc */ -static void * mysqlnd_zend_mm_pemalloc(size_t size, zend_bool persistent MYSQLND_MEM_D) +static void * mysqlnd_zend_mm_pemalloc(size_t size, bool persistent MYSQLND_MEM_D) { return pemalloc_rel(size, persistent); } @@ -419,7 +419,7 @@ static void * mysqlnd_zend_mm_ecalloc(unsigned int nmemb, size_t size MYSQLND_ME /* {{{ mysqlnd_zend_mm_pecalloc */ -static void * mysqlnd_zend_mm_pecalloc(unsigned int nmemb, size_t size, zend_bool persistent MYSQLND_MEM_D) +static void * mysqlnd_zend_mm_pecalloc(unsigned int nmemb, size_t size, bool persistent MYSQLND_MEM_D) { return pecalloc_rel(nmemb, size, persistent); } @@ -435,7 +435,7 @@ static void * mysqlnd_zend_mm_erealloc(void *ptr, size_t new_size MYSQLND_MEM_D) /* {{{ mysqlnd_zend_mm_perealloc */ -static void * mysqlnd_zend_mm_perealloc(void *ptr, size_t new_size, zend_bool persistent MYSQLND_MEM_D) +static void * mysqlnd_zend_mm_perealloc(void *ptr, size_t new_size, bool persistent MYSQLND_MEM_D) { return perealloc_rel(ptr, new_size, persistent); } @@ -451,7 +451,7 @@ static void mysqlnd_zend_mm_efree(void * ptr MYSQLND_MEM_D) /* {{{ mysqlnd_zend_mm_pefree */ -static void mysqlnd_zend_mm_pefree(void * ptr, zend_bool persistent MYSQLND_MEM_D) +static void mysqlnd_zend_mm_pefree(void * ptr, bool persistent MYSQLND_MEM_D) { pefree_rel(ptr, persistent); } @@ -459,7 +459,7 @@ static void mysqlnd_zend_mm_pefree(void * ptr, zend_bool persistent MYSQLND_MEM_ /* {{{ mysqlnd_zend_mm_pememdup */ -static char * mysqlnd_zend_mm_pememdup(const char * const ptr, size_t length, zend_bool persistent MYSQLND_MEM_D) +static char * mysqlnd_zend_mm_pememdup(const char * const ptr, size_t length, bool persistent MYSQLND_MEM_D) { char * dest = pemalloc_rel(length, persistent); if (dest) { @@ -471,7 +471,7 @@ static char * mysqlnd_zend_mm_pememdup(const char * const ptr, size_t length, ze /* {{{ mysqlnd_zend_mm_pestrndup */ -static char * mysqlnd_zend_mm_pestrndup(const char * const ptr, size_t length, zend_bool persistent MYSQLND_MEM_D) +static char * mysqlnd_zend_mm_pestrndup(const char * const ptr, size_t length, bool persistent MYSQLND_MEM_D) { return persistent? zend_strndup(ptr, length ) : estrndup_rel(ptr, length); } @@ -479,7 +479,7 @@ static char * mysqlnd_zend_mm_pestrndup(const char * const ptr, size_t length, z /* {{{ mysqlnd_zend_mm_pestrdup */ -static char * mysqlnd_zend_mm_pestrdup(const char * const ptr, zend_bool persistent MYSQLND_MEM_D) +static char * mysqlnd_zend_mm_pestrdup(const char * const ptr, bool persistent MYSQLND_MEM_D) { return pestrdup_rel(ptr, persistent); } diff --git a/ext/mysqlnd/mysqlnd_alloc.h b/ext/mysqlnd/mysqlnd_alloc.h index a84b49a995..5ced16abeb 100644 --- a/ext/mysqlnd/mysqlnd_alloc.h +++ b/ext/mysqlnd/mysqlnd_alloc.h @@ -26,16 +26,16 @@ PHPAPI extern const char * mysqlnd_debug_std_no_trace_funcs[]; struct st_mysqlnd_allocator_methods { void * (*m_emalloc)(size_t size MYSQLND_MEM_D); - void * (*m_pemalloc)(size_t size, zend_bool persistent MYSQLND_MEM_D); + void * (*m_pemalloc)(size_t size, bool persistent MYSQLND_MEM_D); void * (*m_ecalloc)(unsigned int nmemb, size_t size MYSQLND_MEM_D); - void * (*m_pecalloc)(unsigned int nmemb, size_t size, zend_bool persistent MYSQLND_MEM_D); + void * (*m_pecalloc)(unsigned int nmemb, size_t size, bool persistent MYSQLND_MEM_D); void * (*m_erealloc)(void *ptr, size_t new_size MYSQLND_MEM_D); - void * (*m_perealloc)(void *ptr, size_t new_size, zend_bool persistent MYSQLND_MEM_D); + void * (*m_perealloc)(void *ptr, size_t new_size, bool persistent MYSQLND_MEM_D); void (*m_efree)(void *ptr MYSQLND_MEM_D); - void (*m_pefree)(void *ptr, zend_bool persistent MYSQLND_MEM_D); - char * (*m_pememdup)(const char * const ptr, size_t size, zend_bool persistent MYSQLND_MEM_D); - char * (*m_pestrndup)(const char * const ptr, size_t size, zend_bool persistent MYSQLND_MEM_D); - char * (*m_pestrdup)(const char * const ptr, zend_bool persistent MYSQLND_MEM_D); + void (*m_pefree)(void *ptr, bool persistent MYSQLND_MEM_D); + char * (*m_pememdup)(const char * const ptr, size_t size, bool persistent MYSQLND_MEM_D); + char * (*m_pestrndup)(const char * const ptr, size_t size, bool persistent MYSQLND_MEM_D); + char * (*m_pestrdup)(const char * const ptr, bool persistent MYSQLND_MEM_D); int (*m_sprintf)(char **pbuf, size_t max_len, const char *format, ...); int (*m_vsprintf)(char **pbuf, size_t max_len, const char *format, va_list ap); void (*m_sprintf_free)(char * p); @@ -58,7 +58,7 @@ PHPAPI extern struct st_mysqlnd_allocator_methods mysqlnd_allocator; #define mnd_vsprintf(p, mx_len, fmt,ap) mysqlnd_allocator.m_vsprintf((p), (mx_len), (fmt), (ap)) #define mnd_sprintf_free(p) mysqlnd_allocator.m_sprintf_free((p)) -static inline MYSQLND_STRING mnd_dup_cstring(const MYSQLND_CSTRING str, const zend_bool persistent) +static inline MYSQLND_STRING mnd_dup_cstring(const MYSQLND_CSTRING str, const bool persistent) { const MYSQLND_STRING ret = {(char*) mnd_pemalloc(str.l + 1, persistent), str.l}; if (ret.s) { diff --git a/ext/mysqlnd/mysqlnd_auth.c b/ext/mysqlnd/mysqlnd_auth.c index 057c0a6a82..ce2fa63d6e 100644 --- a/ext/mysqlnd/mysqlnd_auth.c +++ b/ext/mysqlnd/mysqlnd_auth.c @@ -45,12 +45,12 @@ mysqlnd_run_authentication( const unsigned int charset_no, const MYSQLND_SESSION_OPTIONS * const session_options, const zend_ulong mysql_flags, - const zend_bool silent, - const zend_bool is_change_user + const bool silent, + const bool is_change_user ) { enum_func_status ret = FAIL; - zend_bool first_call = TRUE; + bool first_call = TRUE; char * switch_to_auth_protocol = NULL; size_t switch_to_auth_protocol_len = 0; @@ -242,7 +242,7 @@ mysqlnd_auth_handshake(MYSQLND_CONN_DATA * conn, const MYSQLND_SESSION_OPTIONS * const session_options, const zend_ulong mysql_flags, const unsigned int server_charset_no, - const zend_bool use_full_blown_auth_packet, + const bool use_full_blown_auth_packet, const char * const auth_protocol, struct st_mysqlnd_authentication_plugin * auth_plugin, const zend_uchar * const orig_auth_plugin_data, @@ -371,8 +371,8 @@ mysqlnd_auth_change_user(MYSQLND_CONN_DATA * const conn, const size_t passwd_len, const char * const db, const size_t db_len, - const zend_bool silent, - const zend_bool use_full_blown_auth_packet, + const bool silent, + const bool use_full_blown_auth_packet, const char * const auth_protocol, struct st_mysqlnd_authentication_plugin * auth_plugin, const zend_uchar * const orig_auth_plugin_data, diff --git a/ext/mysqlnd/mysqlnd_auth.h b/ext/mysqlnd/mysqlnd_auth.h index be51294e92..0cb555cfb5 100644 --- a/ext/mysqlnd/mysqlnd_auth.h +++ b/ext/mysqlnd/mysqlnd_auth.h @@ -27,7 +27,7 @@ mysqlnd_auth_handshake(MYSQLND_CONN_DATA * conn, const MYSQLND_SESSION_OPTIONS * const session_options, const zend_ulong mysql_flags, const unsigned int server_charset_no, - const zend_bool use_full_blown_auth_packet, + const bool use_full_blown_auth_packet, const char * const auth_protocol, struct st_mysqlnd_authentication_plugin * auth_plugin, const zend_uchar * const orig_auth_plugin_data, @@ -48,8 +48,8 @@ mysqlnd_auth_change_user(MYSQLND_CONN_DATA * const conn, const size_t passwd_len, const char * const db, const size_t db_len, - const zend_bool silent, - const zend_bool use_full_blown_auth_packet, + const bool silent, + const bool use_full_blown_auth_packet, const char * const auth_protocol, struct st_mysqlnd_authentication_plugin * auth_plugin, const zend_uchar * const orig_auth_plugin_data, @@ -92,8 +92,8 @@ mysqlnd_run_authentication( const unsigned int charset_no, const MYSQLND_SESSION_OPTIONS * const session_options, const zend_ulong mysql_flags, - const zend_bool silent, - const zend_bool is_change_user + const bool silent, + const bool is_change_user ); PHPAPI void php_mysqlnd_scramble(zend_uchar * const buffer, const zend_uchar * const scramble, const zend_uchar * const pass, const size_t pass_len); diff --git a/ext/mysqlnd/mysqlnd_charset.c b/ext/mysqlnd/mysqlnd_charset.c index 48bef05e49..5cf4e6a099 100644 --- a/ext/mysqlnd/mysqlnd_charset.c +++ b/ext/mysqlnd/mysqlnd_charset.c @@ -777,7 +777,7 @@ PHPAPI zend_ulong mysqlnd_cset_escape_quotes(const MYSQLND_CHARSET * const cset, const char *newstr_s = newstr; const char *newstr_e = newstr + 2 * escapestr_len; const char *end = escapestr + escapestr_len; - zend_bool escape_overflow = FALSE; + bool escape_overflow = FALSE; DBG_ENTER("mysqlnd_cset_escape_quotes"); @@ -831,7 +831,7 @@ PHPAPI zend_ulong mysqlnd_cset_escape_slashes(const MYSQLND_CHARSET * const cset const char *newstr_s = newstr; const char *newstr_e = newstr + 2 * escapestr_len; const char *end = escapestr + escapestr_len; - zend_bool escape_overflow = FALSE; + bool escape_overflow = FALSE; DBG_ENTER("mysqlnd_cset_escape_slashes"); DBG_INF_FMT("charset=%s", cset->name); diff --git a/ext/mysqlnd/mysqlnd_commands.c b/ext/mysqlnd/mysqlnd_commands.c index 15beda9a6f..c5ca7a763e 100644 --- a/ext/mysqlnd/mysqlnd_commands.c +++ b/ext/mysqlnd/mysqlnd_commands.c @@ -187,7 +187,7 @@ MYSQLND_METHOD(mysqlnd_command, statistics)(MYSQLND_CONN_DATA * const conn, zend /* {{{ mysqlnd_command::process_kill */ static enum_func_status -MYSQLND_METHOD(mysqlnd_command, process_kill)(MYSQLND_CONN_DATA * const conn, const unsigned int process_id, const zend_bool read_response) +MYSQLND_METHOD(mysqlnd_command, process_kill)(MYSQLND_CONN_DATA * const conn, const unsigned int process_id, const bool read_response) { const func_mysqlnd_protocol_payload_decoder_factory__send_command send_command = conn->payload_decoder_factory->m.send_command; const func_mysqlnd_protocol_payload_decoder_factory__send_command_handle_response send_command_handle_response = conn->payload_decoder_factory->m.send_command_handle_response; @@ -333,7 +333,7 @@ MYSQLND_METHOD(mysqlnd_command, query)(MYSQLND_CONN_DATA * const conn, MYSQLND_C /* {{{ mysqlnd_command::change_user */ static enum_func_status -MYSQLND_METHOD(mysqlnd_command, change_user)(MYSQLND_CONN_DATA * const conn, const MYSQLND_CSTRING payload, const zend_bool silent) +MYSQLND_METHOD(mysqlnd_command, change_user)(MYSQLND_CONN_DATA * const conn, const MYSQLND_CSTRING payload, const bool silent) { const func_mysqlnd_protocol_payload_decoder_factory__send_command send_command = conn->payload_decoder_factory->m.send_command; enum_func_status ret = FAIL; @@ -558,7 +558,7 @@ MYSQLND_METHOD(mysqlnd_command, enable_ssl)(MYSQLND_CONN_DATA * const conn, cons #ifdef MYSQLND_SSL_SUPPORTED if (client_capabilities & CLIENT_SSL) { - const zend_bool server_has_ssl = (server_capabilities & CLIENT_SSL)? TRUE:FALSE; + const bool server_has_ssl = (server_capabilities & CLIENT_SSL)? TRUE:FALSE; if (server_has_ssl == FALSE) { goto close_conn; } else { diff --git a/ext/mysqlnd/mysqlnd_connection.c b/ext/mysqlnd/mysqlnd_connection.c index 1134eb99b5..168e161d1b 100644 --- a/ext/mysqlnd/mysqlnd_connection.c +++ b/ext/mysqlnd/mysqlnd_connection.c @@ -147,7 +147,7 @@ MYSQLND_CLASS_METHODS_END; /* {{{ mysqlnd_error_info_init */ PHPAPI void -mysqlnd_error_info_init(MYSQLND_ERROR_INFO * const info, const zend_bool persistent) +mysqlnd_error_info_init(MYSQLND_ERROR_INFO * const info, const bool persistent) { DBG_ENTER("mysqlnd_error_info_init"); info->m = mysqlnd_error_info_get_methods(); @@ -219,7 +219,7 @@ mysqlnd_connection_state_init(struct st_mysqlnd_connection_state * const state) static void MYSQLND_METHOD(mysqlnd_conn_data, free_options)(MYSQLND_CONN_DATA * conn) { - zend_bool pers = conn->persistent; + bool pers = conn->persistent; if (conn->options->charset_name) { mnd_pefree(conn->options->charset_name, pers); @@ -259,7 +259,7 @@ MYSQLND_METHOD(mysqlnd_conn_data, free_options)(MYSQLND_CONN_DATA * conn) static void MYSQLND_METHOD(mysqlnd_conn_data, free_contents)(MYSQLND_CONN_DATA * conn) { - zend_bool pers = conn->persistent; + bool pers = conn->persistent; DBG_ENTER("mysqlnd_conn_data::free_contents"); @@ -544,7 +544,7 @@ MYSQLND_METHOD(mysqlnd_conn_data, connect_handshake)(MYSQLND_CONN_DATA * conn, /* {{{ mysqlnd_conn_data::get_scheme */ static MYSQLND_STRING -MYSQLND_METHOD(mysqlnd_conn_data, get_scheme)(MYSQLND_CONN_DATA * conn, MYSQLND_CSTRING hostname, MYSQLND_CSTRING *socket_or_pipe, unsigned int port, zend_bool * unix_socket, zend_bool * named_pipe) +MYSQLND_METHOD(mysqlnd_conn_data, get_scheme)(MYSQLND_CONN_DATA * conn, MYSQLND_CSTRING hostname, MYSQLND_CSTRING *socket_or_pipe, unsigned int port, bool * unix_socket, bool * named_pipe) { MYSQLND_STRING transport; DBG_ENTER("mysqlnd_conn_data::get_scheme"); @@ -592,11 +592,11 @@ MYSQLND_METHOD(mysqlnd_conn_data, connect)(MYSQLND_CONN_DATA * conn, ) { const size_t this_func = STRUCT_OFFSET(MYSQLND_CLASS_METHODS_TYPE(mysqlnd_conn_data), connect); - zend_bool unix_socket = FALSE; - zend_bool named_pipe = FALSE; - zend_bool reconnect = FALSE; - zend_bool saved_compression = FALSE; - zend_bool local_tx_started = FALSE; + bool unix_socket = FALSE; + bool named_pipe = FALSE; + bool reconnect = FALSE; + bool saved_compression = FALSE; + bool local_tx_started = FALSE; MYSQLND_PFC * pfc = conn->protocol_frame_codec; MYSQLND_STRING transport = { NULL, 0 }; @@ -1441,7 +1441,7 @@ MYSQLND_METHOD(mysqlnd_conn_data, get_server_version)(const MYSQLND_CONN_DATA * /* {{{ mysqlnd_conn_data::more_results */ -static zend_bool +static bool MYSQLND_METHOD(mysqlnd_conn_data, more_results)(const MYSQLND_CONN_DATA * const conn) { DBG_ENTER("mysqlnd_conn_data::more_results"); @@ -1559,7 +1559,7 @@ MYSQLND_METHOD(mysqlnd_conn_data, change_user)(MYSQLND_CONN_DATA * const conn, const char * user, const char * passwd, const char * db, - zend_bool silent, + bool silent, size_t passwd_len ) { @@ -1977,7 +1977,7 @@ mysqlnd_escape_string_for_tx_name_in_comment(const char * const name) char * ret = NULL; DBG_ENTER("mysqlnd_escape_string_for_tx_name_in_comment"); if (name) { - zend_bool warned = FALSE; + bool warned = FALSE; const char * p_orig = name; char * p_copy; p_copy = ret = mnd_emalloc(strlen(name) + 1 + 2 + 2 + 1); /* space, open, close, NullS */ @@ -2015,7 +2015,7 @@ mysqlnd_escape_string_for_tx_name_in_comment(const char * const name) /* {{{ mysqlnd_conn_data::tx_commit_ex */ static enum_func_status -MYSQLND_METHOD(mysqlnd_conn_data, tx_commit_or_rollback)(MYSQLND_CONN_DATA * conn, const zend_bool commit, const unsigned int flags, const char * const name) +MYSQLND_METHOD(mysqlnd_conn_data, tx_commit_or_rollback)(MYSQLND_CONN_DATA * conn, const bool commit, const unsigned int flags, const char * const name) { const size_t this_func = STRUCT_OFFSET(MYSQLND_CLASS_METHODS_TYPE(mysqlnd_conn_data), tx_commit_or_rollback); enum_func_status ret = FAIL; @@ -2485,7 +2485,7 @@ mysqlnd_stream_array_from_fd_set(MYSQLND ** conn_array, fd_set * fds) php_socket_t this_fd; php_stream *stream = NULL; unsigned int ret = 0; - zend_bool disproportion = FALSE; + bool disproportion = FALSE; MYSQLND **fwd = conn_array, **bckwd = conn_array; DBG_ENTER("mysqlnd_stream_array_from_fd_set"); @@ -2612,7 +2612,7 @@ PHPAPI MYSQLND * mysqlnd_connection_connect(MYSQLND * conn_handle, ) { enum_func_status ret = FAIL; - zend_bool self_alloced = FALSE; + bool self_alloced = FALSE; MYSQLND_CSTRING hostname = { host, host? strlen(host) : 0 }; MYSQLND_CSTRING username = { user, user? strlen(user) : 0 }; MYSQLND_CSTRING password = { passwd, passwd_len }; @@ -2649,7 +2649,7 @@ PHPAPI MYSQLND * mysqlnd_connection_connect(MYSQLND * conn_handle, /* {{{ mysqlnd_connection_init */ PHPAPI MYSQLND * -mysqlnd_connection_init(const size_t client_flags, const zend_bool persistent, MYSQLND_CLASS_METHODS_TYPE(mysqlnd_object_factory) *object_factory) +mysqlnd_connection_init(const size_t client_flags, const bool persistent, MYSQLND_CLASS_METHODS_TYPE(mysqlnd_object_factory) *object_factory) { MYSQLND_CLASS_METHODS_TYPE(mysqlnd_object_factory) *factory = object_factory? object_factory : &MYSQLND_CLASS_METHOD_TABLE_NAME(mysqlnd_object_factory); MYSQLND * ret; diff --git a/ext/mysqlnd/mysqlnd_connection.h b/ext/mysqlnd/mysqlnd_connection.h index 412913e6a7..a9f3cbd685 100644 --- a/ext/mysqlnd/mysqlnd_connection.h +++ b/ext/mysqlnd/mysqlnd_connection.h @@ -65,7 +65,7 @@ void mysqlnd_upsert_status_init(MYSQLND_UPSERT_STATUS * const upsert_status); } -PHPAPI void mysqlnd_error_info_init(MYSQLND_ERROR_INFO * const info, const zend_bool persistent); +PHPAPI void mysqlnd_error_info_init(MYSQLND_ERROR_INFO * const info, const bool persistent); PHPAPI void mysqlnd_error_info_free_contents(MYSQLND_ERROR_INFO * const info); #define GET_CONNECTION_STATE(state_struct) (state_struct)->m->get((state_struct)) diff --git a/ext/mysqlnd/mysqlnd_debug.c b/ext/mysqlnd/mysqlnd_debug.c index 55590f45c9..edc3c250b5 100644 --- a/ext/mysqlnd/mysqlnd_debug.c +++ b/ext/mysqlnd/mysqlnd_debug.c @@ -26,7 +26,7 @@ static const char * const mysqlnd_debug_empty_string = ""; /* {{{ mysqlnd_debug::open */ static enum_func_status -MYSQLND_METHOD(mysqlnd_debug, open)(MYSQLND_DEBUG * self, zend_bool reopen) +MYSQLND_METHOD(mysqlnd_debug, open)(MYSQLND_DEBUG * self, bool reopen) { if (!self->file_name) { return FAIL; @@ -239,7 +239,7 @@ MYSQLND_METHOD(mysqlnd_debug, log_va)(MYSQLND_DEBUG *self, /* FALSE - The DBG_ calls won't be traced, TRUE - will be traced */ /* {{{ mysqlnd_debug::func_enter */ -static zend_bool +static bool MYSQLND_METHOD(mysqlnd_debug, func_enter)(MYSQLND_DEBUG * self, unsigned int line, const char * const file, const char * const func_name, unsigned int func_name_len) @@ -313,7 +313,7 @@ MYSQLND_METHOD(mysqlnd_debug, func_leave)(MYSQLND_DEBUG * self, unsigned int lin char **func_name; uint64_t * parent_non_own_time_ptr = NULL, * mine_non_own_time_ptr = NULL; uint64_t mine_non_own_time = 0; - zend_bool profile_calls = self->flags & MYSQLND_DEBUG_PROFILE_CALLS? TRUE:FALSE; + bool profile_calls = self->flags & MYSQLND_DEBUG_PROFILE_CALLS? TRUE:FALSE; if ((self->flags & MYSQLND_DEBUG_DUMP_TRACE) == 0 || self->file_name == NULL) { return PASS; diff --git a/ext/mysqlnd/mysqlnd_debug.h b/ext/mysqlnd/mysqlnd_debug.h index 79d53ad700..7c9b57bc0c 100644 --- a/ext/mysqlnd/mysqlnd_debug.h +++ b/ext/mysqlnd/mysqlnd_debug.h @@ -23,13 +23,13 @@ struct st_mysqlnd_debug_methods { - enum_func_status (*open)(MYSQLND_DEBUG * self, zend_bool reopen); + enum_func_status (*open)(MYSQLND_DEBUG * self, bool reopen); void (*set_mode)(MYSQLND_DEBUG * self, const char * const mode); enum_func_status (*log)(MYSQLND_DEBUG * self, unsigned int line, const char * const file, unsigned int level, const char * type, const char *message); enum_func_status (*log_va)(MYSQLND_DEBUG * self, unsigned int line, const char * const file, unsigned int level, const char * type, const char *format, ...); - zend_bool (*func_enter)(MYSQLND_DEBUG * self, unsigned int line, const char * const file, + bool (*func_enter)(MYSQLND_DEBUG * self, unsigned int line, const char * const file, const char * const func_name, unsigned int func_name_len); enum_func_status (*func_leave)(MYSQLND_DEBUG * self, unsigned int line, const char * const file, uint64_t call_time); enum_func_status (*close)(MYSQLND_DEBUG * self); @@ -117,7 +117,7 @@ PHPAPI MYSQLND_DEBUG * mysqlnd_debug_init(const char * skip_functions[]); #define DBG_ENTER_EX2(dbg_obj1, dbg_obj2, func_name) \ struct timeval __dbg_prof_tp = {0}; \ uint64_t __dbg_prof_start = 0; /* initialization is needed */ \ - zend_bool dbg_skip_trace = TRUE; \ + bool dbg_skip_trace = TRUE; \ ((void)__dbg_prof_start); \ if ((dbg_obj1)) { \ dbg_skip_trace = !(dbg_obj1)->m->func_enter((dbg_obj1), __LINE__, __FILE__, func_name, strlen(func_name)); \ diff --git a/ext/mysqlnd/mysqlnd_driver.c b/ext/mysqlnd/mysqlnd_driver.c index d5e2dc7cd6..d553a98ce9 100644 --- a/ext/mysqlnd/mysqlnd_driver.c +++ b/ext/mysqlnd/mysqlnd_driver.c @@ -29,7 +29,7 @@ #include "mysqlnd_reverse_api.h" #include "mysqlnd_ext_plugin.h" -static zend_bool mysqlnd_library_initted = FALSE; +static bool mysqlnd_library_initted = FALSE; static struct st_mysqlnd_plugin_core mysqlnd_plugin_core = { @@ -94,7 +94,7 @@ PHPAPI void mysqlnd_library_init(void) /* {{{ mysqlnd_object_factory::get_connection */ static MYSQLND * -MYSQLND_METHOD(mysqlnd_object_factory, get_connection)(MYSQLND_CLASS_METHODS_TYPE(mysqlnd_object_factory) *factory, const zend_bool persistent) +MYSQLND_METHOD(mysqlnd_object_factory, get_connection)(MYSQLND_CLASS_METHODS_TYPE(mysqlnd_object_factory) *factory, const bool persistent) { const size_t alloc_size_ret = sizeof(MYSQLND) + mysqlnd_plugin_count() * sizeof(void *); const size_t alloc_size_ret_data = sizeof(MYSQLND_CONN_DATA) + mysqlnd_plugin_count() * sizeof(void *); @@ -217,7 +217,7 @@ MYSQLND_METHOD(mysqlnd_object_factory, get_prepared_statement)(MYSQLND_CONN_DATA /* {{{ mysqlnd_object_factory::get_pfc */ static MYSQLND_PFC * -MYSQLND_METHOD(mysqlnd_object_factory, get_pfc)(const zend_bool persistent, MYSQLND_STATS * stats, MYSQLND_ERROR_INFO * error_info) +MYSQLND_METHOD(mysqlnd_object_factory, get_pfc)(const bool persistent, MYSQLND_STATS * stats, MYSQLND_ERROR_INFO * error_info) { const size_t pfc_alloc_size = ZEND_MM_ALIGNED_SIZE(sizeof(MYSQLND_PFC) + mysqlnd_plugin_count() * sizeof(void *)); const size_t pfc_data_alloc_size = sizeof(MYSQLND_PFC_DATA) + mysqlnd_plugin_count() * sizeof(void *); @@ -242,7 +242,7 @@ MYSQLND_METHOD(mysqlnd_object_factory, get_pfc)(const zend_bool persistent, MYSQ /* {{{ mysqlnd_object_factory::get_vio */ static MYSQLND_VIO * -MYSQLND_METHOD(mysqlnd_object_factory, get_vio)(const zend_bool persistent, MYSQLND_STATS * stats, MYSQLND_ERROR_INFO * error_info) +MYSQLND_METHOD(mysqlnd_object_factory, get_vio)(const bool persistent, MYSQLND_STATS * stats, MYSQLND_ERROR_INFO * error_info) { const size_t vio_alloc_size = ZEND_MM_ALIGNED_SIZE(sizeof(MYSQLND_VIO) + mysqlnd_plugin_count() * sizeof(void *)); const size_t vio_data_alloc_size = sizeof(MYSQLND_VIO_DATA) + mysqlnd_plugin_count() * sizeof(void *); @@ -267,7 +267,7 @@ MYSQLND_METHOD(mysqlnd_object_factory, get_vio)(const zend_bool persistent, MYSQ /* {{{ mysqlnd_object_factory::get_protocol_payload_decoder_factory */ static MYSQLND_PROTOCOL_PAYLOAD_DECODER_FACTORY * -MYSQLND_METHOD(mysqlnd_object_factory, get_protocol_payload_decoder_factory)(MYSQLND_CONN_DATA * conn, const zend_bool persistent) +MYSQLND_METHOD(mysqlnd_object_factory, get_protocol_payload_decoder_factory)(MYSQLND_CONN_DATA * conn, const bool persistent) { const size_t alloc_size = sizeof(MYSQLND_PROTOCOL_PAYLOAD_DECODER_FACTORY) + mysqlnd_plugin_count() * sizeof(void *); MYSQLND_PROTOCOL_PAYLOAD_DECODER_FACTORY *ret = mnd_pecalloc(1, alloc_size, persistent); diff --git a/ext/mysqlnd/mysqlnd_libmysql_compat.h b/ext/mysqlnd/mysqlnd_libmysql_compat.h index 092659e9dd..93d229281f 100644 --- a/ext/mysqlnd/mysqlnd_libmysql_compat.h +++ b/ext/mysqlnd/mysqlnd_libmysql_compat.h @@ -26,7 +26,7 @@ #define MYSQL_RES MYSQLND_RES #define MYSQL_ROW MYSQLND_ROW_C #define MYSQL MYSQLND -#define my_bool zend_bool +#define my_bool bool #define my_ulonglong uint64_t #define MYSQL_VERSION_ID MYSQLND_VERSION_ID diff --git a/ext/mysqlnd/mysqlnd_loaddata.c b/ext/mysqlnd/mysqlnd_loaddata.c index 677378f5cd..4cd0433877 100644 --- a/ext/mysqlnd/mysqlnd_loaddata.c +++ b/ext/mysqlnd/mysqlnd_loaddata.c @@ -137,7 +137,7 @@ static const char *lost_conn = "Lost connection to MySQL server during LOAD DATA /* {{{ mysqlnd_handle_local_infile */ enum_func_status -mysqlnd_handle_local_infile(MYSQLND_CONN_DATA * conn, const char * const filename, zend_bool * is_warning) +mysqlnd_handle_local_infile(MYSQLND_CONN_DATA * conn, const char * const filename, bool * is_warning) { zend_uchar *buf = NULL; zend_uchar empty_packet[MYSQLND_HEADER_SIZE]; diff --git a/ext/mysqlnd/mysqlnd_priv.h b/ext/mysqlnd/mysqlnd_priv.h index d0b97eb16e..c19bc10723 100644 --- a/ext/mysqlnd/mysqlnd_priv.h +++ b/ext/mysqlnd/mysqlnd_priv.h @@ -30,5 +30,5 @@ PHPAPI extern MYSQLND_CLASS_METHOD_TABLE_NAME_FORWARD(mysqlnd_upsert_status); PHPAPI extern MYSQLND_CLASS_METHOD_TABLE_NAME_FORWARD(mysqlnd_error_info); PHPAPI extern MYSQLND_CLASS_METHOD_TABLE_NAME_FORWARD(mysqlnd_command); -enum_func_status mysqlnd_handle_local_infile(MYSQLND_CONN_DATA * conn, const char * const filename, zend_bool * is_warning); +enum_func_status mysqlnd_handle_local_infile(MYSQLND_CONN_DATA * conn, const char * const filename, bool * is_warning); #endif /* MYSQLND_PRIV_H */ diff --git a/ext/mysqlnd/mysqlnd_protocol_frame_codec.c b/ext/mysqlnd/mysqlnd_protocol_frame_codec.c index ddceaa7f5b..f16ce7bf9d 100644 --- a/ext/mysqlnd/mysqlnd_protocol_frame_codec.c +++ b/ext/mysqlnd/mysqlnd_protocol_frame_codec.c @@ -387,7 +387,7 @@ MYSQLND_METHOD(mysqlnd_pfc, set_client_option)(MYSQLND_PFC * const pfc, enum_mys pfc->data->flags |= MYSQLND_PROTOCOL_FLAG_USE_COMPRESSION; break; case MYSQL_SERVER_PUBLIC_KEY: { - const zend_bool pers = pfc->persistent; + const bool pers = pfc->persistent; if (pfc->data->sha256_server_public_key) { mnd_pefree(pfc->data->sha256_server_public_key, pers); } @@ -498,7 +498,7 @@ MYSQLND_CLASS_METHODS_END; /* {{{ mysqlnd_pfc_init */ PHPAPI MYSQLND_PFC * -mysqlnd_pfc_init(const zend_bool persistent, MYSQLND_CLASS_METHODS_TYPE(mysqlnd_object_factory) *object_factory, MYSQLND_STATS * stats, MYSQLND_ERROR_INFO * error_info) +mysqlnd_pfc_init(const bool persistent, MYSQLND_CLASS_METHODS_TYPE(mysqlnd_object_factory) *object_factory, MYSQLND_STATS * stats, MYSQLND_ERROR_INFO * error_info) { MYSQLND_CLASS_METHODS_TYPE(mysqlnd_object_factory) *factory = object_factory? object_factory : &MYSQLND_CLASS_METHOD_TABLE_NAME(mysqlnd_object_factory); MYSQLND_PFC * pfc; diff --git a/ext/mysqlnd/mysqlnd_protocol_frame_codec.h b/ext/mysqlnd/mysqlnd_protocol_frame_codec.h index 8ba317f0e2..1aa6d703d9 100644 --- a/ext/mysqlnd/mysqlnd_protocol_frame_codec.h +++ b/ext/mysqlnd/mysqlnd_protocol_frame_codec.h @@ -18,7 +18,7 @@ #ifndef MYSQLND_PROTOCOL_FRAME_CODEC_H #define MYSQLND_PROTOCOL_FRAME_CODEC_H -PHPAPI MYSQLND_PFC * mysqlnd_pfc_init(const zend_bool persistent, MYSQLND_CLASS_METHODS_TYPE(mysqlnd_object_factory) *object_factory, MYSQLND_STATS * stats, MYSQLND_ERROR_INFO * error_info); +PHPAPI MYSQLND_PFC * mysqlnd_pfc_init(const bool persistent, MYSQLND_CLASS_METHODS_TYPE(mysqlnd_object_factory) *object_factory, MYSQLND_STATS * stats, MYSQLND_ERROR_INFO * error_info); PHPAPI void mysqlnd_pfc_free(MYSQLND_PFC * const pfc, MYSQLND_STATS * stats, MYSQLND_ERROR_INFO * error_info); #endif /* MYSQLND_PROTOCOL_FRAME_CODEC_H */ diff --git a/ext/mysqlnd/mysqlnd_ps.c b/ext/mysqlnd/mysqlnd_ps.c index da42091d34..512ca9b9ef 100644 --- a/ext/mysqlnd/mysqlnd_ps.c +++ b/ext/mysqlnd/mysqlnd_ps.c @@ -32,8 +32,8 @@ const char * const mysqlnd_not_bound_as_blob = "Can't send long data for non-str const char * const mysqlnd_stmt_not_prepared = "Statement not prepared"; /* Exported by mysqlnd_ps_codec.c */ -enum_func_status mysqlnd_stmt_execute_generate_request(MYSQLND_STMT * const s, zend_uchar ** request, size_t *request_len, zend_bool * free_buffer); -enum_func_status mysqlnd_stmt_execute_batch_generate_request(MYSQLND_STMT * const s, zend_uchar ** request, size_t *request_len, zend_bool * free_buffer); +enum_func_status mysqlnd_stmt_execute_generate_request(MYSQLND_STMT * const s, zend_uchar ** request, size_t *request_len, bool * free_buffer); +enum_func_status mysqlnd_stmt_execute_batch_generate_request(MYSQLND_STMT * const s, zend_uchar ** request, size_t *request_len, bool * free_buffer); static void mysqlnd_stmt_separate_result_bind(MYSQLND_STMT * const stmt); @@ -54,7 +54,7 @@ static enum_func_status mysqlnd_stmt_send_cursor_fetch_command( return PASS; } -static zend_bool mysqlnd_stmt_check_state(const MYSQLND_STMT_DATA *stmt) +static bool mysqlnd_stmt_check_state(const MYSQLND_STMT_DATA *stmt) { const MYSQLND_CONN_DATA *conn = stmt->conn; if (stmt->state != MYSQLND_STMT_WAITING_USE_OR_STORE) { @@ -207,7 +207,7 @@ MYSQLND_METHOD(mysqlnd_stmt, get_result)(MYSQLND_STMT * const s) /* {{{ mysqlnd_stmt::more_results */ -static zend_bool +static bool MYSQLND_METHOD(mysqlnd_stmt, more_results)(const MYSQLND_STMT * s) { MYSQLND_STMT_DATA * stmt = s? s->data : NULL; @@ -653,7 +653,7 @@ MYSQLND_METHOD(mysqlnd_stmt, send_execute)(MYSQLND_STMT * const s, const enum_my enum_func_status ret; zend_uchar *request = NULL; size_t request_len; - zend_bool free_request; + bool free_request; DBG_ENTER("mysqlnd_stmt::send_execute"); if (!stmt || !conn) { @@ -770,7 +770,7 @@ MYSQLND_METHOD(mysqlnd_stmt, use_result)(MYSQLND_STMT * s) /* {{{ mysqlnd_fetch_row_cursor */ enum_func_status -mysqlnd_fetch_stmt_row_cursor(MYSQLND_RES * result, zval **row_ptr, const unsigned int flags, zend_bool * fetched_anything) +mysqlnd_fetch_stmt_row_cursor(MYSQLND_RES * result, zval **row_ptr, const unsigned int flags, bool * fetched_anything) { enum_func_status ret; MYSQLND_STMT_DATA * stmt = result->unbuf->stmt; @@ -865,7 +865,7 @@ mysqlnd_fetch_stmt_row_cursor(MYSQLND_RES * result, zval **row_ptr, const unsign /* {{{ mysqlnd_stmt::fetch */ static enum_func_status -MYSQLND_METHOD(mysqlnd_stmt, fetch)(MYSQLND_STMT * const s, zend_bool * const fetched_anything) +MYSQLND_METHOD(mysqlnd_stmt, fetch)(MYSQLND_STMT * const s, bool * const fetched_anything) { MYSQLND_STMT_DATA * stmt = s? s->data : NULL; MYSQLND_CONN_DATA * conn = stmt? stmt->conn : NULL; @@ -1616,7 +1616,7 @@ MYSQLND_METHOD(mysqlnd_stmt, attr_get)(const MYSQLND_STMT * const s, switch (attr_type) { case STMT_ATTR_UPDATE_MAX_LENGTH: - *(zend_bool *) value= stmt->update_max_length; + *(bool *) value= stmt->update_max_length; break; case STMT_ATTR_CURSOR_TYPE: *(unsigned long *) value= stmt->flags; @@ -1790,7 +1790,7 @@ MYSQLND_METHOD(mysqlnd_stmt, free_stmt_content)(MYSQLND_STMT * const s) /* {{{ mysqlnd_stmt::close_on_server */ static enum_func_status -MYSQLND_METHOD_PRIVATE(mysqlnd_stmt, close_on_server)(MYSQLND_STMT * const s, zend_bool implicit) +MYSQLND_METHOD_PRIVATE(mysqlnd_stmt, close_on_server)(MYSQLND_STMT * const s, bool implicit) { MYSQLND_STMT_DATA * stmt = s? s->data : NULL; MYSQLND_CONN_DATA * conn = stmt? stmt->conn : NULL; @@ -1874,7 +1874,7 @@ MYSQLND_METHOD_PRIVATE(mysqlnd_stmt, close_on_server)(MYSQLND_STMT * const s, ze /* {{{ mysqlnd_stmt::dtor */ static enum_func_status -MYSQLND_METHOD(mysqlnd_stmt, dtor)(MYSQLND_STMT * const s, zend_bool implicit) +MYSQLND_METHOD(mysqlnd_stmt, dtor)(MYSQLND_STMT * const s, bool implicit) { MYSQLND_STMT_DATA * stmt = (s != NULL) ? s->data:NULL; enum_func_status ret = FAIL; diff --git a/ext/mysqlnd/mysqlnd_ps.h b/ext/mysqlnd/mysqlnd_ps.h index 9e10fbab77..f590d4d798 100644 --- a/ext/mysqlnd/mysqlnd_ps.h +++ b/ext/mysqlnd/mysqlnd_ps.h @@ -26,14 +26,14 @@ struct st_mysqlnd_perm_bind { /* should be signed int */ int pack_len; unsigned int php_type; - zend_bool is_possibly_blob; - zend_bool can_ret_as_str_in_uni; + bool is_possibly_blob; + bool can_ret_as_str_in_uni; }; extern struct st_mysqlnd_perm_bind mysqlnd_ps_fetch_functions[MYSQL_TYPE_LAST + 1]; -enum_func_status mysqlnd_stmt_fetch_row_buffered(MYSQLND_RES * result, zval **row_data, const unsigned int flags, zend_bool * fetched_anything); -enum_func_status mysqlnd_fetch_stmt_row_cursor(MYSQLND_RES * result, zval **row_data, const unsigned int flags, zend_bool * fetched_anything); +enum_func_status mysqlnd_stmt_fetch_row_buffered(MYSQLND_RES * result, zval **row_data, const unsigned int flags, bool * fetched_anything); +enum_func_status mysqlnd_fetch_stmt_row_cursor(MYSQLND_RES * result, zval **row_data, const unsigned int flags, bool * fetched_anything); void _mysqlnd_init_ps_subsystem();/* This one is private, mysqlnd_library_init() will call it */ void _mysqlnd_init_ps_fetch_subsystem(); diff --git a/ext/mysqlnd/mysqlnd_ps_codec.c b/ext/mysqlnd/mysqlnd_ps_codec.c index ebe0c5a9d8..e695d6ba79 100644 --- a/ext/mysqlnd/mysqlnd_ps_codec.c +++ b/ext/mysqlnd/mysqlnd_ps_codec.c @@ -40,7 +40,7 @@ struct st_mysqlnd_time { unsigned int year, month, day, hour, minute, second; zend_ulong second_part; - zend_bool neg; + bool neg; enum mysqlnd_timestamp_type time_type; }; @@ -57,7 +57,7 @@ ps_fetch_from_1_to_8_bytes(zval * zv, const MYSQLND_FIELD * const field, const u { char tmp[22]; size_t tmp_len = 0; - zend_bool is_bit = field->type == MYSQL_TYPE_BIT; + bool is_bit = field->type == MYSQL_TYPE_BIT; DBG_ENTER("ps_fetch_from_1_to_8_bytes"); DBG_INF_FMT("zv=%p byte_count=%u", zv, byte_count); if (field->flags & UNSIGNED_FLAG) { @@ -219,7 +219,7 @@ ps_fetch_time(zval * zv, const MYSQLND_FIELD * const field, const unsigned int p const zend_uchar * to = *row; t.time_type = MYSQLND_TIMESTAMP_TIME; - t.neg = (zend_bool) to[0]; + t.neg = (bool) to[0]; t.day = (zend_ulong) sint4korr(to+1); t.hour = (unsigned int) to[5]; @@ -905,7 +905,7 @@ end: /* {{{ mysqlnd_stmt_execute_generate_request */ enum_func_status -mysqlnd_stmt_execute_generate_request(MYSQLND_STMT * const s, zend_uchar ** request, size_t *request_len, zend_bool * free_buffer) +mysqlnd_stmt_execute_generate_request(MYSQLND_STMT * const s, zend_uchar ** request, size_t *request_len, bool * free_buffer) { MYSQLND_STMT_DATA * stmt = s->data; zend_uchar *p = stmt->execute_cmd_buffer.buffer, diff --git a/ext/mysqlnd/mysqlnd_read_buffer.c b/ext/mysqlnd/mysqlnd_read_buffer.c index d2ff02e7ca..e4c761c7de 100644 --- a/ext/mysqlnd/mysqlnd_read_buffer.c +++ b/ext/mysqlnd/mysqlnd_read_buffer.c @@ -22,7 +22,7 @@ /* {{{ mysqlnd_read_buffer_is_empty */ -static zend_bool +static bool mysqlnd_read_buffer_is_empty(const MYSQLND_READ_BUFFER * const buffer) { return buffer->len? FALSE:TRUE; diff --git a/ext/mysqlnd/mysqlnd_result.c b/ext/mysqlnd/mysqlnd_result.c index f7b69749d2..ac8e707757 100644 --- a/ext/mysqlnd/mysqlnd_result.c +++ b/ext/mysqlnd/mysqlnd_result.c @@ -217,7 +217,7 @@ mysqlnd_query_read_result_set_header(MYSQLND_CONN_DATA * conn, MYSQLND_STMT * s) switch (rset_header.field_count) { case MYSQLND_NULL_LENGTH: { /* LOAD DATA LOCAL INFILE */ - zend_bool is_warning; + bool is_warning; DBG_INF("LOAD DATA"); conn->last_query_type = QUERY_LOAD_LOCAL; conn->field_count = 0; /* overwrite previous value, or the last value could be used and lead to bug#53503 */ @@ -407,7 +407,7 @@ MYSQLND_METHOD(mysqlnd_res, fetch_lengths)(const MYSQLND_RES * const result) /* {{{ mysqlnd_result_unbuffered::fetch_row */ static enum_func_status -MYSQLND_METHOD(mysqlnd_result_unbuffered, fetch_row)(MYSQLND_RES * result, zval **row_ptr, const unsigned int flags, zend_bool * fetched_anything) +MYSQLND_METHOD(mysqlnd_result_unbuffered, fetch_row)(MYSQLND_RES * result, zval **row_ptr, const unsigned int flags, bool * fetched_anything) { enum_func_status ret; MYSQLND_PACKET_ROW *row_packet = result->unbuf->row_packet; @@ -548,7 +548,7 @@ MYSQLND_METHOD(mysqlnd_res, use_result)(MYSQLND_RES * const result, MYSQLND_STMT /* {{{ mysqlnd_result_buffered::fetch_row */ static enum_func_status -MYSQLND_METHOD(mysqlnd_result_buffered, fetch_row)(MYSQLND_RES * result, zval **row_ptr, const unsigned int flags, zend_bool * fetched_anything) +MYSQLND_METHOD(mysqlnd_result_buffered, fetch_row)(MYSQLND_RES * result, zval **row_ptr, const unsigned int flags, bool * fetched_anything) { MYSQLND_RES_BUFFERED *set = result->stored_data; @@ -601,7 +601,7 @@ MYSQLND_METHOD(mysqlnd_result_buffered, fetch_row)(MYSQLND_RES * result, zval ** /* {{{ mysqlnd_res::fetch_row */ static enum_func_status -MYSQLND_METHOD(mysqlnd_res, fetch_row)(MYSQLND_RES *result, zval **row_ptr, const unsigned int flags, zend_bool *fetched_anything) +MYSQLND_METHOD(mysqlnd_res, fetch_row)(MYSQLND_RES *result, zval **row_ptr, const unsigned int flags, bool *fetched_anything) { const mysqlnd_fetch_row_func f = result->stored_data ? result->stored_data->m.fetch_row : @@ -620,7 +620,7 @@ enum_func_status MYSQLND_METHOD(mysqlnd_res, store_result_fetch_data)(MYSQLND_CONN_DATA * const conn, MYSQLND_RES * result, MYSQLND_RES_METADATA * meta, MYSQLND_ROW_BUFFER **row_buffers, - zend_bool binary_protocol) + bool binary_protocol) { enum_func_status ret; uint64_t total_allocated_rows = 0; @@ -785,7 +785,7 @@ MYSQLND_METHOD(mysqlnd_res, store_result)(MYSQLND_RES * result, static enum_func_status MYSQLND_METHOD(mysqlnd_res, skip_result)(MYSQLND_RES * const result) { - zend_bool fetched_anything; + bool fetched_anything; DBG_ENTER("mysqlnd_res::skip_result"); /* @@ -814,7 +814,7 @@ MYSQLND_METHOD(mysqlnd_res, skip_result)(MYSQLND_RES * const result) /* {{{ mysqlnd_res::free_result */ static enum_func_status -MYSQLND_METHOD(mysqlnd_res, free_result)(MYSQLND_RES * result, const zend_bool implicit) +MYSQLND_METHOD(mysqlnd_res, free_result)(MYSQLND_RES * result, const bool implicit) { DBG_ENTER("mysqlnd_res::free_result"); @@ -966,7 +966,7 @@ static void MYSQLND_METHOD(mysqlnd_res, fetch_into)(MYSQLND_RES * result, const unsigned int flags, zval *return_value ZEND_FILE_LINE_DC) { - zend_bool fetched_anything; + bool fetched_anything; zval *row_data; DBG_ENTER("mysqlnd_res::fetch_into"); @@ -1023,7 +1023,7 @@ MYSQLND_METHOD(mysqlnd_res, fetch_into)(MYSQLND_RES * result, const unsigned int static MYSQLND_ROW_C MYSQLND_METHOD(mysqlnd_res, fetch_row_c)(MYSQLND_RES * result) { - zend_bool fetched_anything; + bool fetched_anything; zval *row_data; MYSQLND_ROW_C ret = NULL; DBG_ENTER("mysqlnd_res::fetch_row_c"); diff --git a/ext/mysqlnd/mysqlnd_statistics.c b/ext/mysqlnd/mysqlnd_statistics.c index 0a34ebc81c..117847a5f3 100644 --- a/ext/mysqlnd/mysqlnd_statistics.c +++ b/ext/mysqlnd/mysqlnd_statistics.c @@ -212,7 +212,7 @@ mysqlnd_fill_stats_hash(const MYSQLND_STATS * const stats, const MYSQLND_STRING /* {{{ mysqlnd_stats_init */ PHPAPI void -mysqlnd_stats_init(MYSQLND_STATS ** stats, const size_t statistic_count, const zend_bool persistent) +mysqlnd_stats_init(MYSQLND_STATS ** stats, const size_t statistic_count, const bool persistent) { *stats = pecalloc(1, sizeof(MYSQLND_STATS), persistent); (*stats)->values = pecalloc(statistic_count, sizeof(uint64_t), persistent); @@ -228,7 +228,7 @@ mysqlnd_stats_init(MYSQLND_STATS ** stats, const size_t statistic_count, const z /* {{{ mysqlnd_stats_end */ PHPAPI void -mysqlnd_stats_end(MYSQLND_STATS * stats, const zend_bool persistent) +mysqlnd_stats_end(MYSQLND_STATS * stats, const bool persistent) { #ifdef ZTS tsrm_mutex_free(stats->LOCK_access); diff --git a/ext/mysqlnd/mysqlnd_statistics.h b/ext/mysqlnd/mysqlnd_statistics.h index 0a6310d716..99e3903492 100644 --- a/ext/mysqlnd/mysqlnd_statistics.h +++ b/ext/mysqlnd/mysqlnd_statistics.h @@ -108,8 +108,8 @@ -PHPAPI void mysqlnd_stats_init(MYSQLND_STATS ** stats, const size_t statistic_count, const zend_bool persistent); -PHPAPI void mysqlnd_stats_end(MYSQLND_STATS * stats, const zend_bool persistent); +PHPAPI void mysqlnd_stats_init(MYSQLND_STATS ** stats, const size_t statistic_count, const bool persistent); +PHPAPI void mysqlnd_stats_end(MYSQLND_STATS * stats, const bool persistent); PHPAPI void mysqlnd_fill_stats_hash(const MYSQLND_STATS * const stats, const MYSQLND_STRING * names, zval *return_value ZEND_FILE_LINE_DC); diff --git a/ext/mysqlnd/mysqlnd_structs.h b/ext/mysqlnd/mysqlnd_structs.h index af2cafc576..75d8af9acd 100644 --- a/ext/mysqlnd/mysqlnd_structs.h +++ b/ext/mysqlnd/mysqlnd_structs.h @@ -79,7 +79,7 @@ typedef struct st_mysqlnd_cmd_buffer typedef struct st_mysqlnd_field { zend_string *sname; /* Name of column */ - zend_bool is_numeric; + bool is_numeric; zend_ulong num_key; const char *name; /* Name of column in C string */ const char *org_name; /* Original column name, if an alias */ @@ -149,7 +149,7 @@ struct st_mysqlnd_error_info unsigned int error_no; zend_llist error_list; - zend_bool persistent; + bool persistent; MYSQLND_CLASS_METHODS_TYPE(mysqlnd_error_info) *m; }; @@ -230,7 +230,7 @@ typedef struct st_mysqlnd_session_options /* maximum allowed packet size for communication */ unsigned int max_allowed_packet; - zend_bool int_and_float_native; + bool int_and_float_native; } MYSQLND_SESSION_OPTIONS; @@ -289,7 +289,7 @@ typedef MYSQLND_RES* (*mysqlnd_stmt_use_or_store_func)(MYSQLND_STMT * const); typedef enum_func_status (*mysqlnd_fetch_row_func)(MYSQLND_RES *result, zval **row, const unsigned int flags, - zend_bool * fetched_anything + bool * fetched_anything ); @@ -302,7 +302,7 @@ struct st_mysqlnd_stats uint64_t *values; mysqlnd_stat_trigger *triggers; size_t count; - zend_bool in_trigger; + bool in_trigger; #ifdef ZTS MUTEX_T LOCK_access; #endif @@ -314,12 +314,12 @@ typedef enum_func_status (*func_mysqlnd_execute_com_debug)(MYSQLND_CONN_DATA * c typedef enum_func_status (*func_mysqlnd_execute_com_init_db)(MYSQLND_CONN_DATA * const conn, const MYSQLND_CSTRING db); typedef enum_func_status (*func_mysqlnd_execute_com_ping)(MYSQLND_CONN_DATA * const conn); typedef enum_func_status (*func_mysqlnd_execute_com_statistics)(MYSQLND_CONN_DATA * const conn, zend_string ** message); -typedef enum_func_status (*func_mysqlnd_execute_com_process_kill)(MYSQLND_CONN_DATA * const conn, const unsigned int process_id, const zend_bool read_response); +typedef enum_func_status (*func_mysqlnd_execute_com_process_kill)(MYSQLND_CONN_DATA * const conn, const unsigned int process_id, const bool read_response); typedef enum_func_status (*func_mysqlnd_execute_com_refresh)(MYSQLND_CONN_DATA * const conn, const uint8_t options); typedef enum_func_status (*func_mysqlnd_execute_com_shutdown)(MYSQLND_CONN_DATA * const conn, const uint8_t level); typedef enum_func_status (*func_mysqlnd_execute_com_quit)(MYSQLND_CONN_DATA * const conn); typedef enum_func_status (*func_mysqlnd_execute_com_query)(MYSQLND_CONN_DATA * const conn, MYSQLND_CSTRING query); -typedef enum_func_status (*func_mysqlnd_execute_com_change_user)(MYSQLND_CONN_DATA * const conn, const MYSQLND_CSTRING payload, const zend_bool silent); +typedef enum_func_status (*func_mysqlnd_execute_com_change_user)(MYSQLND_CONN_DATA * const conn, const MYSQLND_CSTRING payload, const bool silent); typedef enum_func_status (*func_mysqlnd_execute_com_reap_result)(MYSQLND_CONN_DATA * const conn); typedef enum_func_status (*func_mysqlnd_execute_com_stmt_prepare)(MYSQLND_CONN_DATA * const conn, const MYSQLND_CSTRING query); typedef enum_func_status (*func_mysqlnd_execute_com_stmt_execute)(MYSQLND_CONN_DATA * conn, const MYSQLND_CSTRING payload); @@ -360,13 +360,13 @@ MYSQLND_CLASS_METHODS_TYPE(mysqlnd_command) typedef enum_func_status (*func_mysqlnd_vio__init)(MYSQLND_VIO * const vio, MYSQLND_STATS * const stats, MYSQLND_ERROR_INFO * const error_info); typedef void (*func_mysqlnd_vio__dtor)(MYSQLND_VIO * const vio, MYSQLND_STATS * const conn_stats, MYSQLND_ERROR_INFO * const error_info); -typedef enum_func_status (*func_mysqlnd_vio__connect)(MYSQLND_VIO * const vio, const MYSQLND_CSTRING scheme, const zend_bool persistent, MYSQLND_STATS * const conn_stats, MYSQLND_ERROR_INFO * const error_info); +typedef enum_func_status (*func_mysqlnd_vio__connect)(MYSQLND_VIO * const vio, const MYSQLND_CSTRING scheme, const bool persistent, MYSQLND_STATS * const conn_stats, MYSQLND_ERROR_INFO * const error_info); typedef void (*func_mysqlnd_vio__close_stream)(MYSQLND_VIO * const vio, MYSQLND_STATS * const conn_stats, MYSQLND_ERROR_INFO * const error_info); -typedef php_stream * (*func_mysqlnd_vio__open_stream)(MYSQLND_VIO * const vio, const MYSQLND_CSTRING scheme, const zend_bool persistent, MYSQLND_STATS * const conn_stats, MYSQLND_ERROR_INFO * const error_info); +typedef php_stream * (*func_mysqlnd_vio__open_stream)(MYSQLND_VIO * const vio, const MYSQLND_CSTRING scheme, const bool persistent, MYSQLND_STATS * const conn_stats, MYSQLND_ERROR_INFO * const error_info); typedef php_stream * (*func_mysqlnd_vio__get_stream)(const MYSQLND_VIO * const vio); typedef enum_func_status (*func_mysqlnd_vio__set_stream)(MYSQLND_VIO * const vio, php_stream * vio_stream); -typedef zend_bool (*func_mysqlnd_vio__has_valid_stream)(const MYSQLND_VIO * const vio); +typedef bool (*func_mysqlnd_vio__has_valid_stream)(const MYSQLND_VIO * const vio); typedef func_mysqlnd_vio__open_stream (*func_mysqlnd_vio__get_open_stream)(MYSQLND_VIO * const vio, const MYSQLND_CSTRING scheme, MYSQLND_ERROR_INFO * const error_info); typedef enum_func_status (*func_mysqlnd_vio__set_client_option)(MYSQLND_VIO * const vio, enum_mysqlnd_client_option option, const char * const value); @@ -414,12 +414,12 @@ MYSQLND_CLASS_METHODS_TYPE(mysqlnd_vio) MYSQLND_CLASS_METHODS_TYPE(mysqlnd_object_factory); -typedef MYSQLND * (*func_mysqlnd_object_factory__get_connection)(MYSQLND_CLASS_METHODS_TYPE(mysqlnd_object_factory) * factory, const zend_bool persistent); +typedef MYSQLND * (*func_mysqlnd_object_factory__get_connection)(MYSQLND_CLASS_METHODS_TYPE(mysqlnd_object_factory) * factory, const bool persistent); typedef MYSQLND * (*func_mysqlnd_object_factory__clone_connection_object)(MYSQLND * conn); typedef MYSQLND_STMT * (*func_mysqlnd_object_factory__get_prepared_statement)(MYSQLND_CONN_DATA * conn); -typedef MYSQLND_PFC * (*func_mysqlnd_object_factory__get_pfc)(const zend_bool persistent, MYSQLND_STATS * stats, MYSQLND_ERROR_INFO * error_info); -typedef MYSQLND_VIO * (*func_mysqlnd_object_factory__get_vio)(const zend_bool persistent, MYSQLND_STATS * stats, MYSQLND_ERROR_INFO * error_info); -typedef MYSQLND_PROTOCOL_PAYLOAD_DECODER_FACTORY * (*func_mysqlnd_object_factory__get_protocol_payload_decoder_factory)(MYSQLND_CONN_DATA * conn, const zend_bool persistent); +typedef MYSQLND_PFC * (*func_mysqlnd_object_factory__get_pfc)(const bool persistent, MYSQLND_STATS * stats, MYSQLND_ERROR_INFO * error_info); +typedef MYSQLND_VIO * (*func_mysqlnd_object_factory__get_vio)(const bool persistent, MYSQLND_STATS * stats, MYSQLND_ERROR_INFO * error_info); +typedef MYSQLND_PROTOCOL_PAYLOAD_DECODER_FACTORY * (*func_mysqlnd_object_factory__get_protocol_payload_decoder_factory)(MYSQLND_CONN_DATA * conn, const bool persistent); MYSQLND_CLASS_METHODS_TYPE(mysqlnd_object_factory) @@ -442,7 +442,7 @@ typedef enum_func_status (*func_mysqlnd_conn_data__reap_query)(MYSQLND_CONN_DATA typedef MYSQLND_RES * (*func_mysqlnd_conn_data__use_result)(MYSQLND_CONN_DATA * const conn); typedef MYSQLND_RES * (*func_mysqlnd_conn_data__store_result)(MYSQLND_CONN_DATA * const conn); typedef enum_func_status (*func_mysqlnd_conn_data__next_result)(MYSQLND_CONN_DATA * const conn); -typedef zend_bool (*func_mysqlnd_conn_data__more_results)(const MYSQLND_CONN_DATA * const conn); +typedef bool (*func_mysqlnd_conn_data__more_results)(const MYSQLND_CONN_DATA * const conn); typedef MYSQLND_STMT * (*func_mysqlnd_conn_data__stmt_init)(MYSQLND_CONN_DATA * const conn); @@ -453,7 +453,7 @@ typedef enum_func_status (*func_mysqlnd_conn_data__ping)(MYSQLND_CONN_DATA * con typedef enum_func_status (*func_mysqlnd_conn_data__kill_connection)(MYSQLND_CONN_DATA * conn, unsigned int pid); typedef enum_func_status (*func_mysqlnd_conn_data__select_db)(MYSQLND_CONN_DATA * const conn, const char * const db, const size_t db_len); typedef enum_func_status (*func_mysqlnd_conn_data__server_dump_debug_information)(MYSQLND_CONN_DATA * const conn); -typedef enum_func_status (*func_mysqlnd_conn_data__change_user)(MYSQLND_CONN_DATA * const conn, const char * user, const char * passwd, const char * db, zend_bool silent, size_t passwd_len); +typedef enum_func_status (*func_mysqlnd_conn_data__change_user)(MYSQLND_CONN_DATA * const conn, const char * user, const char * passwd, const char * db, bool silent, size_t passwd_len); typedef unsigned int (*func_mysqlnd_conn_data__get_error_no)(const MYSQLND_CONN_DATA * const conn); typedef const char * (*func_mysqlnd_conn_data__get_error_str)(const MYSQLND_CONN_DATA * const conn); @@ -488,8 +488,8 @@ typedef enum_func_status (*func_mysqlnd_conn_data__query_read_result_set_header) typedef MYSQLND_CONN_DATA * (*func_mysqlnd_conn_data__get_reference)(MYSQLND_CONN_DATA * const conn); typedef enum_func_status (*func_mysqlnd_conn_data__free_reference)(MYSQLND_CONN_DATA * const conn); -typedef enum_func_status (*func_mysqlnd_conn_data__send_command_do_request)(MYSQLND_CONN_DATA * const conn, const enum php_mysqlnd_server_command command, const zend_uchar * const arg, const size_t arg_len, const zend_bool silent, const zend_bool ignore_upsert_status); -typedef enum_func_status (*func_mysqlnd_conn_data__send_command_handle_response)(MYSQLND_CONN_DATA * const conn, const enum mysqlnd_packet_type ok_packet, const zend_bool silent, const enum php_mysqlnd_server_command command, const zend_bool ignore_upsert_status); +typedef enum_func_status (*func_mysqlnd_conn_data__send_command_do_request)(MYSQLND_CONN_DATA * const conn, const enum php_mysqlnd_server_command command, const zend_uchar * const arg, const size_t arg_len, const bool silent, const bool ignore_upsert_status); +typedef enum_func_status (*func_mysqlnd_conn_data__send_command_handle_response)(MYSQLND_CONN_DATA * const conn, const enum mysqlnd_packet_type ok_packet, const bool silent, const enum php_mysqlnd_server_command command, const bool ignore_upsert_status); typedef enum_func_status (*func_mysqlnd_conn_data__restart_psession)(MYSQLND_CONN_DATA * conn); typedef enum_func_status (*func_mysqlnd_conn_data__end_psession)(MYSQLND_CONN_DATA * conn); @@ -503,7 +503,7 @@ typedef enum_func_status (*func_mysqlnd_conn_data__set_autocommit)(MYSQLND_CONN_ typedef enum_func_status (*func_mysqlnd_conn_data__tx_commit)(MYSQLND_CONN_DATA * conn); typedef enum_func_status (*func_mysqlnd_conn_data__tx_rollback)(MYSQLND_CONN_DATA * conn); typedef enum_func_status (*func_mysqlnd_conn_data__tx_begin)(MYSQLND_CONN_DATA * conn, const unsigned int mode, const char * const name); -typedef enum_func_status (*func_mysqlnd_conn_data__tx_commit_or_rollback)(MYSQLND_CONN_DATA * conn, const zend_bool commit, const unsigned int flags, const char * const name); +typedef enum_func_status (*func_mysqlnd_conn_data__tx_commit_or_rollback)(MYSQLND_CONN_DATA * conn, const bool commit, const unsigned int flags, const char * const name); typedef void (*func_mysqlnd_conn_data__tx_cor_options_to_string)(const MYSQLND_CONN_DATA * const conn, smart_str * tmp_str, const unsigned int mode); typedef enum_func_status (*func_mysqlnd_conn_data__tx_savepoint)(MYSQLND_CONN_DATA * conn, const char * const name); typedef enum_func_status (*func_mysqlnd_conn_data__tx_savepoint_release)(MYSQLND_CONN_DATA * conn, const char * const name); @@ -521,7 +521,7 @@ typedef enum_func_status (*func_mysqlnd_conn_data__set_client_option_2d)(MYSQLND typedef size_t (*func_mysqlnd_conn_data__negotiate_client_api_capabilities)(MYSQLND_CONN_DATA * const conn, const size_t flags); typedef size_t (*func_mysqlnd_conn_data__get_client_api_capabilities)(const MYSQLND_CONN_DATA * const conn); -typedef MYSQLND_STRING (*func_mysqlnd_conn_data__get_scheme)(MYSQLND_CONN_DATA * conn, MYSQLND_CSTRING hostname, MYSQLND_CSTRING *socket_or_pipe, unsigned int port, zend_bool * unix_socket, zend_bool * named_pipe); +typedef MYSQLND_STRING (*func_mysqlnd_conn_data__get_scheme)(MYSQLND_CONN_DATA * conn, MYSQLND_CSTRING hostname, MYSQLND_CSTRING *socket_or_pipe, unsigned int port, bool * unix_socket, bool * named_pipe); @@ -633,7 +633,7 @@ MYSQLND_CLASS_METHODS_TYPE(mysqlnd_conn) /* for decoding - binary or text protocol */ typedef enum_func_status (*func_mysqlnd_res__row_decoder)(MYSQLND_ROW_BUFFER * row_buffer, zval * fields, const unsigned int field_count, const MYSQLND_FIELD * const fields_metadata, - const zend_bool as_int_or_float, MYSQLND_STATS * const stats); + const bool as_int_or_float, MYSQLND_STATS * const stats); typedef MYSQLND_RES * (*func_mysqlnd_res__use_result)(MYSQLND_RES * const result, MYSQLND_STMT_DATA *stmt); @@ -652,10 +652,10 @@ typedef const MYSQLND_FIELD *(*func_mysqlnd_res__fetch_fields)(MYSQLND_RES * con typedef enum_func_status (*func_mysqlnd_res__read_result_metadata)(MYSQLND_RES * result, MYSQLND_CONN_DATA * conn); typedef const size_t * (*func_mysqlnd_res__fetch_lengths)(const MYSQLND_RES * const result); -typedef enum_func_status (*func_mysqlnd_res__store_result_fetch_data)(MYSQLND_CONN_DATA * const conn, MYSQLND_RES * result, MYSQLND_RES_METADATA * meta, MYSQLND_ROW_BUFFER ** row_buffers, zend_bool binary_protocol); +typedef enum_func_status (*func_mysqlnd_res__store_result_fetch_data)(MYSQLND_CONN_DATA * const conn, MYSQLND_RES * result, MYSQLND_RES_METADATA * meta, MYSQLND_ROW_BUFFER ** row_buffers, bool binary_protocol); typedef void (*func_mysqlnd_res__free_result_buffers)(MYSQLND_RES * result); /* private */ -typedef enum_func_status (*func_mysqlnd_res__free_result)(MYSQLND_RES * result, const zend_bool implicit); +typedef enum_func_status (*func_mysqlnd_res__free_result)(MYSQLND_RES * result, const bool implicit); typedef void (*func_mysqlnd_res__free_result_contents)(MYSQLND_RES *result); typedef void (*func_mysqlnd_res__free_buffered_data)(MYSQLND_RES *result); @@ -753,14 +753,14 @@ typedef enum_func_status (*func_mysqlnd_stmt__execute)(MYSQLND_STMT * const stmt typedef MYSQLND_RES * (*func_mysqlnd_stmt__use_result)(MYSQLND_STMT * const stmt); typedef MYSQLND_RES * (*func_mysqlnd_stmt__store_result)(MYSQLND_STMT * const stmt); typedef MYSQLND_RES * (*func_mysqlnd_stmt__get_result)(MYSQLND_STMT * const stmt); -typedef zend_bool (*func_mysqlnd_stmt__more_results)(const MYSQLND_STMT * const stmt); +typedef bool (*func_mysqlnd_stmt__more_results)(const MYSQLND_STMT * const stmt); typedef enum_func_status (*func_mysqlnd_stmt__next_result)(MYSQLND_STMT * const stmt); typedef enum_func_status (*func_mysqlnd_stmt__free_result)(MYSQLND_STMT * const stmt); typedef enum_func_status (*func_mysqlnd_stmt__seek_data)(const MYSQLND_STMT * const stmt, uint64_t row); typedef enum_func_status (*func_mysqlnd_stmt__reset)(MYSQLND_STMT * const stmt); -typedef enum_func_status (*func_mysqlnd_stmt__close_on_server)(MYSQLND_STMT * const stmt, zend_bool implicit); /* private */ -typedef enum_func_status (*func_mysqlnd_stmt__dtor)(MYSQLND_STMT * const stmt, zend_bool implicit); /* use this for mysqlnd_stmt_close */ -typedef enum_func_status (*func_mysqlnd_stmt__fetch)(MYSQLND_STMT * const stmt, zend_bool * const fetched_anything); +typedef enum_func_status (*func_mysqlnd_stmt__close_on_server)(MYSQLND_STMT * const stmt, bool implicit); /* private */ +typedef enum_func_status (*func_mysqlnd_stmt__dtor)(MYSQLND_STMT * const stmt, bool implicit); /* use this for mysqlnd_stmt_close */ +typedef enum_func_status (*func_mysqlnd_stmt__fetch)(MYSQLND_STMT * const stmt, bool * const fetched_anything); typedef enum_func_status (*func_mysqlnd_stmt__bind_parameters)(MYSQLND_STMT * const stmt, MYSQLND_PARAM_BIND * const param_bind); typedef enum_func_status (*func_mysqlnd_stmt__bind_one_parameter)(MYSQLND_STMT * const stmt, unsigned int param_no, zval * const zv, zend_uchar type); typedef enum_func_status (*func_mysqlnd_stmt__refresh_bind_param)(MYSQLND_STMT * const stmt); @@ -785,7 +785,7 @@ typedef MYSQLND_RESULT_BIND*(*func_mysqlnd_stmt__alloc_result_bind)(MYSQLND_STMT typedef void (*func_mysqlnd_stmt__free_parameter_bind)(MYSQLND_STMT * const stmt, MYSQLND_PARAM_BIND *); typedef void (*func_mysqlnd_stmt__free_result_bind)(MYSQLND_STMT * const stmt, MYSQLND_RESULT_BIND *); typedef unsigned int (*func_mysqlnd_stmt__server_status)(const MYSQLND_STMT * const stmt); -typedef enum_func_status (*func_mysqlnd_stmt__generate_execute_request)(MYSQLND_STMT * const s, zend_uchar ** request, size_t *request_len, zend_bool * free_buffer); +typedef enum_func_status (*func_mysqlnd_stmt__generate_execute_request)(MYSQLND_STMT * const s, zend_uchar ** request, size_t *request_len, bool * free_buffer); typedef enum_func_status (*func_mysqlnd_stmt__parse_execute_response)(MYSQLND_STMT * const s, enum_mysqlnd_parse_exec_response_type type); typedef void (*func_mysqlnd_stmt__free_stmt_content)(MYSQLND_STMT * const s); typedef enum_func_status (*func_mysqlnd_stmt__flush)(MYSQLND_STMT * const stmt); @@ -854,7 +854,7 @@ MYSQLND_CLASS_METHODS_TYPE(mysqlnd_stmt) struct st_mysqlnd_vio_data { php_stream *stream; - zend_bool ssl; + bool ssl; MYSQLND_VIO_OPTIONS options; #ifdef MYSQLND_DO_WIRE_CHECK_BEFORE_COMMAND zend_uchar last_command; @@ -862,7 +862,7 @@ struct st_mysqlnd_vio_data zend_uchar unused_pad1; #endif - zend_bool persistent; + bool persistent; MYSQLND_CLASS_METHODS_TYPE(mysqlnd_vio) m; }; @@ -872,7 +872,7 @@ struct st_mysqlnd_vio { struct st_mysqlnd_vio_data * data; - zend_bool persistent; + bool persistent; }; @@ -957,22 +957,22 @@ struct st_mysqlnd_connection_data zval async_read_cb; zval async_err_cb; - zend_bool in_async_read_cb; - zend_bool in_async_err_cb; + bool in_async_read_cb; + bool in_async_err_cb; MYSQLND_CLASS_METHODS_TYPE(mysqlnd_object_factory) object_factory; MYSQLND_CLASS_METHODS_TYPE(mysqlnd_command) * command; MYSQLND_CLASS_METHODS_TYPE(mysqlnd_conn_data) * m; /* persistent connection */ - zend_bool persistent; + bool persistent; }; struct st_mysqlnd_connection { MYSQLND_CONN_DATA * data; - zend_bool persistent; + bool persistent; MYSQLND_CLASS_METHODS_TYPE(mysqlnd_conn) * m; }; @@ -1017,7 +1017,7 @@ typedef enum_func_status (*func_mysqlnd_protocol_payload_decoder_factory__send_c MYSQLND_PROTOCOL_PAYLOAD_DECODER_FACTORY * payload_decoder_factory, const enum php_mysqlnd_server_command command, const zend_uchar * const arg, const size_t arg_len, - const zend_bool silent, + const bool silent, MYSQLND_CONNECTION_STATE * connection_state, MYSQLND_ERROR_INFO * error_info, @@ -1030,7 +1030,7 @@ typedef enum_func_status (*func_mysqlnd_protocol_payload_decoder_factory__send_c MYSQLND_PROTOCOL_PAYLOAD_DECODER_FACTORY * const payload_decoder_factory, MYSQLND_ERROR_INFO * const error_info, MYSQLND_UPSERT_STATUS * const upsert_status, - const zend_bool ignore_upsert_status, /* actually used only by LOAD DATA. COM_QUERY and COM_EXECUTE handle the responses themselves */ + const bool ignore_upsert_status, /* actually used only by LOAD DATA. COM_QUERY and COM_EXECUTE handle the responses themselves */ MYSQLND_STRING * const last_message); typedef enum_func_status (*func_mysqlnd_protocol_payload_decoder_factory__send_command_handle_EOF)( @@ -1041,9 +1041,9 @@ typedef enum_func_status (*func_mysqlnd_protocol_payload_decoder_factory__send_c typedef enum_func_status (*func_mysqlnd_protocol_payload_decoder_factory__send_command_handle_response)( MYSQLND_PROTOCOL_PAYLOAD_DECODER_FACTORY * payload_decoder_factory, const enum mysqlnd_packet_type ok_packet, - const zend_bool silent, + const bool silent, const enum php_mysqlnd_server_command command, - const zend_bool ignore_upsert_status, /* actually used only by LOAD DATA. COM_QUERY and COM_EXECUTE handle the responses themselves */ + const bool ignore_upsert_status, /* actually used only by LOAD DATA. COM_QUERY and COM_EXECUTE handle the responses themselves */ MYSQLND_ERROR_INFO * error_info, MYSQLND_UPSERT_STATUS * upsert_status, @@ -1078,7 +1078,7 @@ MYSQLND_CLASS_METHODS_TYPE(mysqlnd_protocol_payload_decoder_factory) struct st_mysqlnd_protocol_payload_decoder_factory { MYSQLND_CONN_DATA * conn; - zend_bool persistent; + bool persistent; MYSQLND_CLASS_METHODS_TYPE(mysqlnd_protocol_payload_decoder_factory) m; }; @@ -1088,7 +1088,7 @@ typedef struct st_mysqlnd_read_buffer { size_t offset; size_t size; size_t len; - zend_bool (*is_empty)(const struct st_mysqlnd_read_buffer *); + bool (*is_empty)(const struct st_mysqlnd_read_buffer *); void (*read)(struct st_mysqlnd_read_buffer *, size_t count, zend_uchar * dest); size_t (*bytes_left)(const struct st_mysqlnd_read_buffer *); void (*free_buffer)(struct st_mysqlnd_read_buffer **); @@ -1129,8 +1129,8 @@ MYSQLND_CLASS_METHODS_TYPE(mysqlnd_protocol_packet_frame_codec) struct st_mysqlnd_protocol_frame_codec_data { php_stream *stream; - zend_bool compressed; - zend_bool ssl; + bool compressed; + bool ssl; uint64_t flags; char * sha256_server_public_key; @@ -1144,7 +1144,7 @@ struct st_mysqlnd_protocol_frame_codec_data zend_uchar packet_no; zend_uchar compressed_envelope_packet_no; - zend_bool persistent; + bool persistent; MYSQLND_CLASS_METHODS_TYPE(mysqlnd_protocol_packet_frame_codec) m; }; @@ -1156,7 +1156,7 @@ struct st_mysqlnd_protocol_frame_codec struct st_mysqlnd_protocol_frame_codec_data * data; - zend_bool persistent; + bool persistent; }; @@ -1218,7 +1218,7 @@ struct st_mysqlnd_unbuffered_result unsigned int field_count; - zend_bool eof_reached; + bool eof_reached; MYSQLND_STMT_DATA *stmt; }; @@ -1256,7 +1256,7 @@ struct st_mysqlnd_param_bind struct st_mysqlnd_result_bind { zval zv; - zend_bool bound; + bool bound; }; @@ -1279,16 +1279,16 @@ struct st_mysqlnd_stmt_data MYSQLND_ERROR_INFO * error_info; MYSQLND_ERROR_INFO error_info_impl; - zend_bool update_max_length; + bool update_max_length; zend_ulong prefetch_rows; - zend_bool cursor_exists; + bool cursor_exists; mysqlnd_stmt_use_or_store_func default_rset_handler; zval execute_read_cb; zval execute_err_cb; - zend_bool in_execute_read_cb; - zend_bool in_execute_err_cb; + bool in_execute_read_cb; + bool in_execute_err_cb; MYSQLND_CMD_BUFFER execute_cmd_buffer; unsigned int execute_count;/* count how many times the stmt was executed */ diff --git a/ext/mysqlnd/mysqlnd_vio.c b/ext/mysqlnd/mysqlnd_vio.c index e33761f278..82a45ed7f0 100644 --- a/ext/mysqlnd/mysqlnd_vio.c +++ b/ext/mysqlnd/mysqlnd_vio.c @@ -115,7 +115,7 @@ MYSQLND_METHOD(mysqlnd_vio, network_write)(MYSQLND_VIO * const vio, const zend_u /* {{{ mysqlnd_vio::open_pipe */ static php_stream * -MYSQLND_METHOD(mysqlnd_vio, open_pipe)(MYSQLND_VIO * const vio, const MYSQLND_CSTRING scheme, const zend_bool persistent, +MYSQLND_METHOD(mysqlnd_vio, open_pipe)(MYSQLND_VIO * const vio, const MYSQLND_CSTRING scheme, const bool persistent, MYSQLND_STATS * const conn_stats, MYSQLND_ERROR_INFO * const error_info) { unsigned int streams_options = 0; @@ -150,7 +150,7 @@ MYSQLND_METHOD(mysqlnd_vio, open_pipe)(MYSQLND_VIO * const vio, const MYSQLND_CS /* {{{ mysqlnd_vio::open_tcp_or_unix */ static php_stream * -MYSQLND_METHOD(mysqlnd_vio, open_tcp_or_unix)(MYSQLND_VIO * const vio, const MYSQLND_CSTRING scheme, const zend_bool persistent, +MYSQLND_METHOD(mysqlnd_vio, open_tcp_or_unix)(MYSQLND_VIO * const vio, const MYSQLND_CSTRING scheme, const bool persistent, MYSQLND_STATS * const conn_stats, MYSQLND_ERROR_INFO * const error_info) { unsigned int streams_options = 0; @@ -298,7 +298,7 @@ MYSQLND_METHOD(mysqlnd_vio, get_open_stream)(MYSQLND_VIO * const vio, const MYSQ /* {{{ mysqlnd_vio::connect */ static enum_func_status -MYSQLND_METHOD(mysqlnd_vio, connect)(MYSQLND_VIO * const vio, const MYSQLND_CSTRING scheme, const zend_bool persistent, +MYSQLND_METHOD(mysqlnd_vio, connect)(MYSQLND_VIO * const vio, const MYSQLND_CSTRING scheme, const bool persistent, MYSQLND_STATS * const conn_stats, MYSQLND_ERROR_INFO * const error_info) { enum_func_status ret = FAIL; @@ -339,7 +339,7 @@ MYSQLND_METHOD(mysqlnd_vio, set_client_option)(MYSQLND_VIO * const net, enum_mys break; case MYSQLND_OPT_SSL_KEY: { - zend_bool pers = net->persistent; + bool pers = net->persistent; if (net->data->options.ssl_key) { mnd_pefree(net->data->options.ssl_key, pers); } @@ -348,7 +348,7 @@ MYSQLND_METHOD(mysqlnd_vio, set_client_option)(MYSQLND_VIO * const net, enum_mys } case MYSQLND_OPT_SSL_CERT: { - zend_bool pers = net->persistent; + bool pers = net->persistent; if (net->data->options.ssl_cert) { mnd_pefree(net->data->options.ssl_cert, pers); } @@ -357,7 +357,7 @@ MYSQLND_METHOD(mysqlnd_vio, set_client_option)(MYSQLND_VIO * const net, enum_mys } case MYSQLND_OPT_SSL_CA: { - zend_bool pers = net->persistent; + bool pers = net->persistent; if (net->data->options.ssl_ca) { mnd_pefree(net->data->options.ssl_ca, pers); } @@ -366,7 +366,7 @@ MYSQLND_METHOD(mysqlnd_vio, set_client_option)(MYSQLND_VIO * const net, enum_mys } case MYSQLND_OPT_SSL_CAPATH: { - zend_bool pers = net->persistent; + bool pers = net->persistent; if (net->data->options.ssl_capath) { mnd_pefree(net->data->options.ssl_capath, pers); } @@ -375,7 +375,7 @@ MYSQLND_METHOD(mysqlnd_vio, set_client_option)(MYSQLND_VIO * const net, enum_mys } case MYSQLND_OPT_SSL_CIPHER: { - zend_bool pers = net->persistent; + bool pers = net->persistent; if (net->data->options.ssl_cipher) { mnd_pefree(net->data->options.ssl_cipher, pers); } @@ -384,7 +384,7 @@ MYSQLND_METHOD(mysqlnd_vio, set_client_option)(MYSQLND_VIO * const net, enum_mys } case MYSQLND_OPT_SSL_PASSPHRASE: { - zend_bool pers = net->persistent; + bool pers = net->persistent; if (net->data->options.ssl_passphrase) { mnd_pefree(net->data->options.ssl_passphrase, pers); } @@ -492,7 +492,7 @@ MYSQLND_METHOD(mysqlnd_vio, enable_ssl)(MYSQLND_VIO * const net) #ifdef MYSQLND_SSL_SUPPORTED php_stream_context * context = php_stream_context_alloc(); php_stream * net_stream = net->data->m.get_stream(net); - zend_bool any_flag = FALSE; + bool any_flag = FALSE; DBG_ENTER("mysqlnd_vio::enable_ssl"); @@ -543,7 +543,7 @@ MYSQLND_METHOD(mysqlnd_vio, enable_ssl)(MYSQLND_VIO * const net) } { zval verify_peer_zval; - zend_bool verify; + bool verify; if (net->data->options.ssl_verify_peer == MYSQLND_SSL_PEER_DEFAULT) { net->data->options.ssl_verify_peer = any_flag? MYSQLND_SSL_PEER_DEFAULT_ACTION:MYSQLND_SSL_PEER_DONT_VERIFY; @@ -610,7 +610,7 @@ MYSQLND_METHOD(mysqlnd_vio, disable_ssl)(MYSQLND_VIO * const vio) static void MYSQLND_METHOD(mysqlnd_vio, free_contents)(MYSQLND_VIO * net) { - zend_bool pers = net->persistent; + bool pers = net->persistent; DBG_ENTER("mysqlnd_vio::free_contents"); if (net->data->options.ssl_key) { @@ -646,7 +646,7 @@ MYSQLND_METHOD(mysqlnd_vio, close_stream)(MYSQLND_VIO * const net, MYSQLND_STATS php_stream * net_stream; DBG_ENTER("mysqlnd_vio::close_stream"); if (net && (net_stream = net->data->m.get_stream(net))) { - zend_bool pers = net->persistent; + bool pers = net->persistent; DBG_INF_FMT("Freeing stream. abstract=%p", net_stream->abstract); /* We removed the resource from the stream, so pass FREE_RSRC_DTOR now to force * destruction to occur during shutdown, because it won't happen through the resource. */ @@ -728,7 +728,7 @@ MYSQLND_METHOD(mysqlnd_vio, set_stream)(MYSQLND_VIO * const vio, php_stream * ne /* {{{ mysqlnd_vio::has_valid_stream */ -static zend_bool +static bool MYSQLND_METHOD(mysqlnd_vio, has_valid_stream)(const MYSQLND_VIO * const vio) { DBG_ENTER("mysqlnd_vio::has_valid_stream"); @@ -770,7 +770,7 @@ MYSQLND_CLASS_METHODS_END; /* {{{ mysqlnd_vio_init */ PHPAPI MYSQLND_VIO * -mysqlnd_vio_init(zend_bool persistent, MYSQLND_CLASS_METHODS_TYPE(mysqlnd_object_factory) *object_factory, MYSQLND_STATS * stats, MYSQLND_ERROR_INFO * error_info) +mysqlnd_vio_init(bool persistent, MYSQLND_CLASS_METHODS_TYPE(mysqlnd_object_factory) *object_factory, MYSQLND_STATS * stats, MYSQLND_ERROR_INFO * error_info) { MYSQLND_CLASS_METHODS_TYPE(mysqlnd_object_factory) *factory = object_factory? object_factory : &MYSQLND_CLASS_METHOD_TABLE_NAME(mysqlnd_object_factory); MYSQLND_VIO * vio; diff --git a/ext/mysqlnd/mysqlnd_vio.h b/ext/mysqlnd/mysqlnd_vio.h index 7c71aaa01e..c4982e0312 100644 --- a/ext/mysqlnd/mysqlnd_vio.h +++ b/ext/mysqlnd/mysqlnd_vio.h @@ -18,7 +18,7 @@ #ifndef MYSQLND_VIO_H #define MYSQLND_VIO_H -PHPAPI MYSQLND_VIO * mysqlnd_vio_init(zend_bool persistent, MYSQLND_CLASS_METHODS_TYPE(mysqlnd_object_factory) *object_factory, MYSQLND_STATS * stats, MYSQLND_ERROR_INFO * error_info); +PHPAPI MYSQLND_VIO * mysqlnd_vio_init(bool persistent, MYSQLND_CLASS_METHODS_TYPE(mysqlnd_object_factory) *object_factory, MYSQLND_STATS * stats, MYSQLND_ERROR_INFO * error_info); PHPAPI void mysqlnd_vio_free(MYSQLND_VIO * const vio, MYSQLND_STATS * stats, MYSQLND_ERROR_INFO * error_info); #endif /* MYSQLND_VIO_H */ diff --git a/ext/mysqlnd/mysqlnd_wireprotocol.c b/ext/mysqlnd/mysqlnd_wireprotocol.c index 0d601e5b98..7a66d05c75 100644 --- a/ext/mysqlnd/mysqlnd_wireprotocol.c +++ b/ext/mysqlnd/mysqlnd_wireprotocol.c @@ -1436,7 +1436,7 @@ php_mysqlnd_read_row_ex(MYSQLND_PFC * pfc, enum_func_status php_mysqlnd_rowp_read_binary_protocol(MYSQLND_ROW_BUFFER * row_buffer, zval * fields, const unsigned int field_count, const MYSQLND_FIELD * const fields_metadata, - const zend_bool as_int_or_float, MYSQLND_STATS * const stats) + const bool as_int_or_float, MYSQLND_STATS * const stats) { unsigned int i; const zend_uchar * p = row_buffer->ptr; @@ -1527,7 +1527,7 @@ php_mysqlnd_rowp_read_binary_protocol(MYSQLND_ROW_BUFFER * row_buffer, zval * fi enum_func_status php_mysqlnd_rowp_read_text_protocol(MYSQLND_ROW_BUFFER * row_buffer, zval * fields, unsigned int field_count, const MYSQLND_FIELD * fields_metadata, - zend_bool as_int_or_float, MYSQLND_STATS * stats) + bool as_int_or_float, MYSQLND_STATS * stats) { unsigned int i; zval *current_field, *end_field, *start_field; @@ -1631,7 +1631,7 @@ php_mysqlnd_rowp_read_text_protocol(MYSQLND_ROW_BUFFER * row_buffer, zval * fiel #else (uint64_t) _atoi64((char *) p); #endif - zend_bool uns = fields_metadata[i].flags & UNSIGNED_FLAG? TRUE:FALSE; + bool uns = fields_metadata[i].flags & UNSIGNED_FLAG? TRUE:FALSE; /* We have to make it ASCIIZ temporarily */ #if SIZEOF_ZEND_LONG==8 if (uns == TRUE && v > 9223372036854775807L) @@ -2436,7 +2436,7 @@ MYSQLND_METHOD(mysqlnd_protocol, send_command)( MYSQLND_PROTOCOL_PAYLOAD_DECODER_FACTORY * payload_decoder_factory, const enum php_mysqlnd_server_command command, const zend_uchar * const arg, const size_t arg_len, - const zend_bool silent, + const bool silent, struct st_mysqlnd_connection_state * connection_state, MYSQLND_ERROR_INFO * error_info, @@ -2502,7 +2502,7 @@ MYSQLND_METHOD(mysqlnd_protocol, send_command_handle_OK)( MYSQLND_PROTOCOL_PAYLOAD_DECODER_FACTORY * const payload_decoder_factory, MYSQLND_ERROR_INFO * const error_info, MYSQLND_UPSERT_STATUS * const upsert_status, - const zend_bool ignore_upsert_status, /* actually used only by LOAD DATA. COM_QUERY and COM_EXECUTE handle the responses themselves */ + const bool ignore_upsert_status, /* actually used only by LOAD DATA. COM_QUERY and COM_EXECUTE handle the responses themselves */ MYSQLND_STRING * const last_message) { enum_func_status ret = FAIL; @@ -2596,9 +2596,9 @@ static enum_func_status MYSQLND_METHOD(mysqlnd_protocol, send_command_handle_response)( MYSQLND_PROTOCOL_PAYLOAD_DECODER_FACTORY * payload_decoder_factory, const enum mysqlnd_packet_type ok_packet, - const zend_bool silent, + const bool silent, const enum php_mysqlnd_server_command command, - const zend_bool ignore_upsert_status, /* actually used only by LOAD DATA. COM_QUERY and COM_EXECUTE handle the responses themselves */ + const bool ignore_upsert_status, /* actually used only by LOAD DATA. COM_QUERY and COM_EXECUTE handle the responses themselves */ MYSQLND_ERROR_INFO * error_info, MYSQLND_UPSERT_STATUS * upsert_status, @@ -2658,7 +2658,7 @@ MYSQLND_CLASS_METHODS_END; /* {{{ mysqlnd_protocol_payload_decoder_factory_init */ PHPAPI MYSQLND_PROTOCOL_PAYLOAD_DECODER_FACTORY * -mysqlnd_protocol_payload_decoder_factory_init(MYSQLND_CONN_DATA * conn, const zend_bool persistent) +mysqlnd_protocol_payload_decoder_factory_init(MYSQLND_CONN_DATA * conn, const bool persistent) { MYSQLND_PROTOCOL_PAYLOAD_DECODER_FACTORY * ret; DBG_ENTER("mysqlnd_protocol_payload_decoder_factory_init"); @@ -2675,7 +2675,7 @@ mysqlnd_protocol_payload_decoder_factory_free(MYSQLND_PROTOCOL_PAYLOAD_DECODER_F DBG_ENTER("mysqlnd_protocol_payload_decoder_factory_free"); if (factory) { - zend_bool pers = factory->persistent; + bool pers = factory->persistent; mnd_pefree(factory, pers); } DBG_VOID_RETURN; diff --git a/ext/mysqlnd/mysqlnd_wireprotocol.h b/ext/mysqlnd/mysqlnd_wireprotocol.h index 7cbfe0afd6..7b5b6194ae 100644 --- a/ext/mysqlnd/mysqlnd_wireprotocol.h +++ b/ext/mysqlnd/mysqlnd_wireprotocol.h @@ -69,7 +69,7 @@ typedef struct st_mysqlnd_packet_greet { uint8_t charset_no; uint16_t server_status; /* 13 byte pad, in 5.5 first 2 bytes are more capabilities followed by 1 byte scramble_length */ - zend_bool pre41; + bool pre41; /* If error packet, we use these */ char error[MYSQLND_ERRMSG_SIZE+1]; char sqlstate[MYSQLND_SQLSTATE_LENGTH + 1]; @@ -90,9 +90,9 @@ typedef struct st_mysqlnd_packet_auth { uint32_t max_packet_size; uint8_t charset_no; /* Here the packet ends. This is user supplied data */ - zend_bool send_auth_data; - zend_bool is_change_user_packet; - zend_bool silent; + bool send_auth_data; + bool is_change_user_packet; + bool silent; HashTable *connect_attr; size_t db_len; } MYSQLND_PACKET_AUTH; @@ -197,7 +197,7 @@ typedef struct st_mysqlnd_packet_res_field { MYSQLND_MEMORY_POOL *memory_pool; MYSQLND_FIELD *metadata; /* For table definitions, empty for result sets */ - zend_bool skip_parsing; + bool skip_parsing; MYSQLND_ERROR_INFO error_info; } MYSQLND_PACKET_RES_FIELD; @@ -207,7 +207,7 @@ typedef struct st_mysqlnd_packet_res_field { typedef struct st_mysqlnd_packet_row { MYSQLND_PACKET_HEADER header; uint32_t field_count; - zend_bool eof; + bool eof; /* These are, of course, only for SELECT in the EOF packet, which is detected by this packet @@ -218,7 +218,7 @@ typedef struct st_mysqlnd_packet_row { MYSQLND_ROW_BUFFER row_buffer; MYSQLND_MEMORY_POOL * result_set_memory_pool; - zend_bool binary_protocol; + bool binary_protocol; MYSQLND_FIELD *fields_metadata; /* If error packet, we use these */ @@ -257,7 +257,7 @@ typedef struct st_mysqlnd_packet_chg_user_resp { uint16_t server_capabilities; /* If error packet, we use these */ MYSQLND_ERROR_INFO error_info; - zend_bool server_asked_323_auth; + bool server_asked_323_auth; char *new_auth_protocol; size_t new_auth_protocol_len; @@ -305,15 +305,15 @@ PHPAPI extern const char * const mysqlnd_empty_string; enum_func_status php_mysqlnd_rowp_read_binary_protocol(MYSQLND_ROW_BUFFER * row_buffer, zval * fields, unsigned int field_count, const MYSQLND_FIELD * fields_metadata, - zend_bool as_int_or_float, MYSQLND_STATS * stats); + bool as_int_or_float, MYSQLND_STATS * stats); enum_func_status php_mysqlnd_rowp_read_text_protocol(MYSQLND_ROW_BUFFER * row_buffer, zval * fields, unsigned int field_count, const MYSQLND_FIELD * fields_metadata, - zend_bool as_int_or_float, MYSQLND_STATS * stats); + bool as_int_or_float, MYSQLND_STATS * stats); -PHPAPI MYSQLND_PROTOCOL_PAYLOAD_DECODER_FACTORY * mysqlnd_protocol_payload_decoder_factory_init(MYSQLND_CONN_DATA * conn, const zend_bool persistent); +PHPAPI MYSQLND_PROTOCOL_PAYLOAD_DECODER_FACTORY * mysqlnd_protocol_payload_decoder_factory_init(MYSQLND_CONN_DATA * conn, const bool persistent); PHPAPI void mysqlnd_protocol_payload_decoder_factory_free(MYSQLND_PROTOCOL_PAYLOAD_DECODER_FACTORY * const payload_decoder_factory); #endif /* MYSQLND_WIREPROTOCOL_H */ diff --git a/ext/oci8/oci8.c b/ext/oci8/oci8.c index ad9b23a9c4..c333a4d3a4 100644 --- a/ext/oci8/oci8.c +++ b/ext/oci8/oci8.c @@ -923,8 +923,8 @@ php_oci_connection *php_oci_do_connect_ex(char *username, int username_len, char smart_str hashed_details = {0}; time_t timestamp; php_oci_spool *session_pool = NULL; - zend_bool use_spool = 1; /* Default is to use client-side session pool */ - zend_bool ping_done = 0; + bool use_spool = 1; /* Default is to use client-side session pool */ + bool ping_done = 0; ub2 charsetid = 0; ub2 charsetid_nls_lang = 0; @@ -1042,7 +1042,7 @@ php_oci_connection *php_oci_do_connect_ex(char *username, int username_len, char php_strtolower(ZSTR_VAL(hashed_details.s), ZSTR_LEN(hashed_details.s)); if (!exclusive && !new_password) { - zend_bool found = 0; + bool found = 0; if (persistent && ((zvp = zend_hash_find(&EG(persistent_list), hashed_details.s))) != NULL) { zend_resource *le = Z_RES_P(zvp); @@ -1190,7 +1190,7 @@ php_oci_connection *php_oci_do_connect_ex(char *username, int username_len, char * a last resort, return a non-persistent connection. */ if (persistent) { - zend_bool alloc_non_persistent = 0; + bool alloc_non_persistent = 0; if (OCI_G(max_persistent) != -1 && OCI_G(num_persistent) >= OCI_G(max_persistent)) { /* try to find an idle connection and kill it */ @@ -1436,7 +1436,7 @@ int php_oci_connection_commit(php_oci_connection *connection) static int php_oci_connection_close(php_oci_connection *connection) { int result = 0; - zend_bool in_call_save = OCI_G(in_call); + bool in_call_save = OCI_G(in_call); #ifdef HAVE_OCI8_DTRACE if (DTRACE_OCI8_CONNECTION_CLOSE_ENABLED()) { @@ -1528,7 +1528,7 @@ static int php_oci_connection_close(php_oci_connection *connection) int php_oci_connection_release(php_oci_connection *connection) { int result = 0; - zend_bool in_call_save = OCI_G(in_call); + bool in_call_save = OCI_G(in_call); time_t timestamp = time(NULL); if (connection->is_stub) { @@ -1989,7 +1989,7 @@ static int php_oci_persistent_helper(zval *zv) static php_oci_spool *php_oci_create_spool(char *username, int username_len, char *password, int password_len, char *dbname, int dbname_len, zend_string *hash_key, int charsetid) { php_oci_spool *session_pool = NULL; - zend_bool iserror = 0; + bool iserror = 0; ub4 poolmode = OCI_DEFAULT; /* Mode to be passed to OCISessionPoolCreate */ OCIAuthInfo *spoolAuth = NULL; sword errstatus; @@ -2128,7 +2128,7 @@ static php_oci_spool *php_oci_get_spool(char *username, int username_len, char * smart_str spool_hashed_details = {0}; php_oci_spool *session_pool = NULL; zend_resource *spool_out_le = NULL; - zend_bool iserror = 0; + bool iserror = 0; zval *spool_out_zv = NULL; /* {{{ Create the spool hash key */ diff --git a/ext/oci8/oci8_interface.c b/ext/oci8/oci8_interface.c index df71b510fd..416ab92677 100644 --- a/ext/oci8/oci8_interface.c +++ b/ext/oci8/oci8_interface.c @@ -528,7 +528,7 @@ PHP_FUNCTION(oci_lob_write) php_oci_descriptor *descriptor; size_t data_len; zend_long write_len; - zend_bool write_len_is_null = 1; + bool write_len_is_null = 1; ub4 bytes_written; char *data; @@ -628,7 +628,7 @@ PHP_FUNCTION(oci_lob_erase) php_oci_descriptor *descriptor; ub4 bytes_erased; zend_long offset, length; - zend_bool offset_is_null = 1, length_is_null = 1; + bool offset_is_null = 1, length_is_null = 1; if (zend_parse_method_parameters(ZEND_NUM_ARGS(), getThis(), "O|l!l!", &z_descriptor, oci_lob_class_entry_ptr, &offset, &offset_is_null, &length, &length_is_null) == FAILURE) { RETURN_THROWS(); @@ -697,7 +697,7 @@ PHP_FUNCTION(ocisetbufferinglob) { zval *tmp, *z_descriptor; php_oci_descriptor *descriptor; - zend_bool flag; + bool flag; if (zend_parse_method_parameters(ZEND_NUM_ARGS(), getThis(), "Ob", &z_descriptor, oci_lob_class_entry_ptr, &flag) == FAILURE) { RETURN_THROWS(); @@ -747,7 +747,7 @@ PHP_FUNCTION(oci_lob_copy) zval *tmp_dest, *tmp_from, *z_descriptor_dest, *z_descriptor_from; php_oci_descriptor *descriptor_dest, *descriptor_from; zend_long length; - zend_bool length_is_null = 1; + bool length_is_null = 1; if (zend_parse_parameters(ZEND_NUM_ARGS(), "OO|l!", &z_descriptor_dest, oci_lob_class_entry_ptr, &z_descriptor_from, oci_lob_class_entry_ptr, &length, &length_is_null) == FAILURE) { RETURN_THROWS(); @@ -824,7 +824,7 @@ PHP_FUNCTION(oci_lob_export) char *buffer; size_t filename_len; zend_long start, length, block_length; - zend_bool start_is_null = 1, length_is_null = 1; + bool start_is_null = 1, length_is_null = 1; php_stream *stream; ub4 lob_length; diff --git a/ext/oci8/oci8_statement.c b/ext/oci8/oci8_statement.c index 852439e114..e08878f81d 100644 --- a/ext/oci8/oci8_statement.c +++ b/ext/oci8/oci8_statement.c @@ -250,7 +250,7 @@ int php_oci_statement_fetch(php_oci_statement *statement, ub4 nrows) void *handlepp; ub4 typep, iterp, idxp; ub1 in_outp, piecep; - zend_bool piecewisecols = 0; + bool piecewisecols = 0; php_oci_out_column *column; sword errstatus; diff --git a/ext/oci8/php_oci8_int.h b/ext/oci8/php_oci8_int.h index 825437bc57..b462aa762d 100644 --- a/ext/oci8/php_oci8_int.h +++ b/ext/oci8/php_oci8_int.h @@ -519,16 +519,16 @@ ZEND_BEGIN_MODULE_GLOBALS(oci) /* {{{ Module globals */ zend_long persistent_timeout; /* time period after which idle persistent connection is considered expired */ zend_long statement_cache_size; /* statement cache size. used with 9i+ clients only*/ zend_long default_prefetch; /* default prefetch setting */ - zend_bool privileged_connect; /* privileged connect flag (On/Off) */ - zend_bool old_oci_close_semantics; /* old_oci_close_semantics flag (to determine the way oci_close() should behave) */ + bool privileged_connect; /* privileged connect flag (On/Off) */ + bool old_oci_close_semantics; /* old_oci_close_semantics flag (to determine the way oci_close() should behave) */ int shutdown; /* in shutdown flag */ OCIEnv *env; /* global environment handle */ - zend_bool in_call; + bool in_call; char *connection_class; - zend_bool events; + bool events; char *edition; ZEND_END_MODULE_GLOBALS(oci) /* }}} */ diff --git a/ext/odbc/php_odbc.c b/ext/odbc/php_odbc.c index e7498ee2b7..05e371d05f 100644 --- a/ext/odbc/php_odbc.c +++ b/ext/odbc/php_odbc.c @@ -1661,7 +1661,7 @@ PHP_FUNCTION(odbc_fetch_row) RETCODE rc; zval *pv_res; zend_long pv_row; - zend_bool pv_row_is_null = 1; + bool pv_row_is_null = 1; #ifdef HAVE_SQL_EXTENDED_FETCH SQLULEN crow; SQLUSMALLINT RowStatus[1]; @@ -2540,7 +2540,7 @@ PHP_FUNCTION(odbc_autocommit) odbc_connection *conn; RETCODE rc; zval *pv_conn; - zend_bool pv_onoff = 0; + bool pv_onoff = 0; if (zend_parse_parameters(ZEND_NUM_ARGS(), "r|b", &pv_conn, &pv_onoff) == FAILURE) { RETURN_THROWS(); diff --git a/ext/opcache/Optimizer/block_pass.c b/ext/opcache/Optimizer/block_pass.c index bad814ed6e..e833ff3dbf 100644 --- a/ext/opcache/Optimizer/block_pass.c +++ b/ext/opcache/Optimizer/block_pass.c @@ -893,7 +893,7 @@ optimize_const_unary_op: src = VAR_SOURCE(opline->op1); if (src && src->opcode == ZEND_QM_ASSIGN) { zend_op *op = src + 1; - zend_bool optimize = 1; + bool optimize = 1; while (op < opline) { if ((op->op1_type == opline->op1_type diff --git a/ext/opcache/Optimizer/dce.c b/ext/opcache/Optimizer/dce.c index d21c40d189..339b08167d 100644 --- a/ext/opcache/Optimizer/dce.c +++ b/ext/opcache/Optimizer/dce.c @@ -60,7 +60,7 @@ typedef struct { unsigned reorder_dtor_effects : 1; } context; -static inline zend_bool is_bad_mod(const zend_ssa *ssa, int use, int def) { +static inline bool is_bad_mod(const zend_ssa *ssa, int use, int def) { if (def < 0) { /* This modification is not tracked by SSA, assume the worst */ return 1; @@ -72,10 +72,10 @@ static inline zend_bool is_bad_mod(const zend_ssa *ssa, int use, int def) { return 0; } -static inline zend_bool may_have_side_effects( +static inline bool may_have_side_effects( zend_op_array *op_array, zend_ssa *ssa, const zend_op *opline, const zend_ssa_op *ssa_op, - zend_bool reorder_dtor_effects) { + bool reorder_dtor_effects) { switch (opline->opcode) { case ZEND_NOP: case ZEND_IS_IDENTICAL: @@ -310,7 +310,7 @@ static zend_always_inline void add_phi_sources_to_worklists(context *ctx, zend_s } FOREACH_PHI_SOURCE_END(); } -static inline zend_bool is_var_dead(context *ctx, int var_num) { +static inline bool is_var_dead(context *ctx, int var_num) { zend_ssa_var *var = &ctx->ssa->vars[var_num]; if (var->definition_phi) { return zend_bitset_in(ctx->phi_dead, var_num); @@ -325,7 +325,7 @@ static inline zend_bool is_var_dead(context *ctx, int var_num) { } // Sometimes we can mark the var as EXT_UNUSED -static zend_bool try_remove_var_def(context *ctx, int free_var, int use_chain, zend_op *opline) { +static bool try_remove_var_def(context *ctx, int free_var, int use_chain, zend_op *opline) { if (use_chain >= 0) { return 0; } @@ -379,7 +379,7 @@ static zend_bool try_remove_var_def(context *ctx, int free_var, int use_chain, z return 0; } -static inline zend_bool is_free_of_live_var(context *ctx, zend_op *opline, zend_ssa_op *ssa_op) { +static inline bool is_free_of_live_var(context *ctx, zend_op *opline, zend_ssa_op *ssa_op) { switch (opline->opcode) { case ZEND_FREE: /* It is always safe to remove FREEs of non-refcounted values, even if they are live. */ @@ -395,7 +395,7 @@ static inline zend_bool is_free_of_live_var(context *ctx, zend_op *opline, zend_ } /* Returns whether the instruction has been DCEd */ -static zend_bool dce_instr(context *ctx, zend_op *opline, zend_ssa_op *ssa_op) { +static bool dce_instr(context *ctx, zend_op *opline, zend_ssa_op *ssa_op) { zend_ssa *ssa = ctx->ssa; int free_var = -1; zend_uchar free_var_type; @@ -483,7 +483,7 @@ static void try_remove_trivial_phi(context *ctx, zend_ssa_phi *phi) { } } -static inline zend_bool may_break_varargs(const zend_op_array *op_array, const zend_ssa *ssa, const zend_ssa_op *ssa_op) { +static inline bool may_break_varargs(const zend_op_array *op_array, const zend_ssa *ssa, const zend_ssa_op *ssa_op) { if (ssa_op->op1_def >= 0 && ssa->vars[ssa_op->op1_def].var < op_array->num_args) { return 1; @@ -499,13 +499,13 @@ static inline zend_bool may_break_varargs(const zend_op_array *op_array, const z return 0; } -int dce_optimize_op_array(zend_op_array *op_array, zend_ssa *ssa, zend_bool reorder_dtor_effects) { +int dce_optimize_op_array(zend_op_array *op_array, zend_ssa *ssa, bool reorder_dtor_effects) { int i; zend_ssa_phi *phi; int removed_ops = 0; /* DCE of CV operations that changes arguments may affect vararg functions. */ - zend_bool has_varargs = (ssa->cfg.flags & ZEND_FUNC_VARARG) != 0; + bool has_varargs = (ssa->cfg.flags & ZEND_FUNC_VARARG) != 0; context ctx; ctx.ssa = ssa; diff --git a/ext/opcache/Optimizer/dfa_pass.c b/ext/opcache/Optimizer/dfa_pass.c index 0ac6c563d0..fe06de276b 100644 --- a/ext/opcache/Optimizer/dfa_pass.c +++ b/ext/opcache/Optimizer/dfa_pass.c @@ -280,7 +280,7 @@ static void zend_ssa_remove_nops(zend_op_array *op_array, zend_ssa *ssa, zend_op free_alloca(shiftlist, use_heap); } -static zend_bool safe_instanceof(zend_class_entry *ce1, zend_class_entry *ce2) { +static bool safe_instanceof(zend_class_entry *ce1, zend_class_entry *ce2) { if (ce1 == ce2) { return 1; } @@ -291,7 +291,7 @@ static zend_bool safe_instanceof(zend_class_entry *ce1, zend_class_entry *ce2) { return instanceof_function(ce1, ce2); } -static inline zend_bool can_elide_return_type_check( +static inline bool can_elide_return_type_check( zend_op_array *op_array, zend_ssa *ssa, zend_ssa_op *ssa_op) { zend_arg_info *info = &op_array->arg_info[-1]; zend_ssa_var_info *use_info = &ssa->var_info[ssa_op->op1_use]; @@ -322,7 +322,7 @@ static inline zend_bool can_elide_return_type_check( return 1; } -static zend_bool opline_supports_assign_contraction( +static bool opline_supports_assign_contraction( zend_ssa *ssa, zend_op *opline, int src_var, uint32_t cv_var) { if (opline->opcode == ZEND_NEW) { /* see Zend/tests/generators/aborted_yield_during_new.phpt */ @@ -380,7 +380,7 @@ int zend_dfa_optimize_calls(zend_op_array *op_array, zend_ssa *ssa) zend_op *send_array; zend_op *send_needly; - zend_bool strict = 0; + bool strict = 0; if (call_info->caller_init_opline->extended_value == 2) { send_array = call_info->caller_call_opline - 1; @@ -924,7 +924,7 @@ optimize_jmpnz: if (opline->op1_type == IS_CONST) { zval *zv = CT_CONSTANT_EX(op_array, opline->op1.constant); zend_uchar type = Z_TYPE_P(zv); - zend_bool correct_type = + bool correct_type = (opline->opcode == ZEND_SWITCH_LONG && type == IS_LONG) || (opline->opcode == ZEND_SWITCH_STRING && type == IS_STRING) || (opline->opcode == ZEND_MATCH && (type == IS_LONG || type == IS_STRING)); diff --git a/ext/opcache/Optimizer/escape_analysis.c b/ext/opcache/Optimizer/escape_analysis.c index a5577d5995..c0d5081c1f 100644 --- a/ext/opcache/Optimizer/escape_analysis.c +++ b/ext/opcache/Optimizer/escape_analysis.c @@ -388,7 +388,7 @@ int zend_ssa_escape_analysis(const zend_script *script, zend_op_array *op_array, int ssa_vars_count = ssa->vars_count; int i, root, use; int *ees; - zend_bool has_allocations; + bool has_allocations; int num_non_escaped; ALLOCA_FLAG(use_heap) @@ -469,7 +469,7 @@ int zend_ssa_escape_analysis(const zend_script *script, zend_op_array *op_array, /* 4. Process referential dependencies */ if (num_non_escaped) { - zend_bool changed; + bool changed; do { changed = 0; diff --git a/ext/opcache/Optimizer/optimize_func_calls.c b/ext/opcache/Optimizer/optimize_func_calls.c index b1d8f6b929..319b17438d 100644 --- a/ext/opcache/Optimizer/optimize_func_calls.c +++ b/ext/opcache/Optimizer/optimize_func_calls.c @@ -39,8 +39,8 @@ typedef struct _optimizer_call_info { zend_function *func; zend_op *opline; - zend_bool is_prototype; - zend_bool try_inline; + bool is_prototype; + bool try_inline; uint32_t func_arg_num; } optimizer_call_info; diff --git a/ext/opcache/Optimizer/pass1.c b/ext/opcache/Optimizer/pass1.c index 74f6153670..86774afef4 100644 --- a/ext/opcache/Optimizer/pass1.c +++ b/ext/opcache/Optimizer/pass1.c @@ -40,7 +40,7 @@ void zend_optimizer_pass1(zend_op_array *op_array, zend_optimizer_ctx *ctx) { zend_op *opline = op_array->opcodes; zend_op *end = opline + op_array->last; - zend_bool collect_constants = (ZEND_OPTIMIZER_PASS_15 & ctx->optimization_level)? + bool collect_constants = (ZEND_OPTIMIZER_PASS_15 & ctx->optimization_level)? (op_array == &ctx->script->main_op_array) : 0; while (opline < end) { diff --git a/ext/opcache/Optimizer/sccp.c b/ext/opcache/Optimizer/sccp.c index 6ca1301e2d..7f9bdbdbb5 100644 --- a/ext/opcache/Optimizer/sccp.c +++ b/ext/opcache/Optimizer/sccp.c @@ -142,7 +142,7 @@ static void dup_partial_object(zval *dst, zval *src) Z_ARR_P(dst) = zend_array_dup(Z_ARR_P(src)); } -static inline zend_bool value_known(zval *zv) { +static inline bool value_known(zval *zv) { return !IS_TOP(zv) && !IS_BOT(zv); } @@ -207,7 +207,7 @@ static zval *get_op2_value(sccp_ctx *ctx, zend_op *opline, zend_ssa_op *ssa_op) } } -static zend_bool can_replace_op1( +static bool can_replace_op1( const zend_op_array *op_array, zend_op *opline, zend_ssa_op *ssa_op) { switch (opline->opcode) { case ZEND_PRE_INC: @@ -276,7 +276,7 @@ static zend_bool can_replace_op1( return 1; } -static zend_bool can_replace_op2( +static bool can_replace_op2( const zend_op_array *op_array, zend_op *opline, zend_ssa_op *ssa_op) { switch (opline->opcode) { /* Do not accept CONST */ @@ -289,7 +289,7 @@ static zend_bool can_replace_op2( return 1; } -static zend_bool try_replace_op1( +static bool try_replace_op1( sccp_ctx *ctx, zend_op *opline, zend_ssa_op *ssa_op, int var, zval *value) { if (ssa_op->op1_use == var && can_replace_op1(ctx->scdf.op_array, opline, ssa_op)) { zval zv; @@ -339,7 +339,7 @@ replace_op1_simple: return 0; } -static zend_bool try_replace_op2( +static bool try_replace_op2( sccp_ctx *ctx, zend_op *opline, zend_ssa_op *ssa_op, int var, zval *value) { if (ssa_op->op2_use == var && can_replace_op2(ctx->scdf.op_array, opline, ssa_op)) { zval zv; @@ -728,7 +728,7 @@ static inline void ct_eval_type_check(zval *result, uint32_t type_mask, zval *op static inline int ct_eval_in_array(zval *result, uint32_t extended_value, zval *op1, zval *op2) { HashTable *ht; - zend_bool res; + bool res; if (Z_TYPE_P(op2) != IS_ARRAY) { return FAILURE; @@ -781,7 +781,7 @@ static inline int ct_eval_array_key_exists(zval *result, zval *op1, zval *op2) { return SUCCESS; } -static zend_bool can_ct_eval_func_call(zend_string *name, uint32_t num_args, zval **args) { +static bool can_ct_eval_func_call(zend_string *name, uint32_t num_args, zval **args) { /* Functions that can be evaluated independently of what the arguments are. * It's okay if these functions throw on invalid arguments, but they should not warn. */ if (false @@ -1957,9 +1957,9 @@ static void sccp_mark_feasible_successors( case ZEND_SWITCH_STRING: case ZEND_MATCH: { - zend_bool strict_comparison = opline->opcode == ZEND_MATCH; + bool strict_comparison = opline->opcode == ZEND_MATCH; zend_uchar type = Z_TYPE_P(op1); - zend_bool correct_type = + bool correct_type = (opline->opcode == ZEND_SWITCH_LONG && type == IS_LONG) || (opline->opcode == ZEND_SWITCH_STRING && type == IS_STRING) || (opline->opcode == ZEND_MATCH && (type == IS_LONG || type == IS_STRING)); @@ -2055,7 +2055,7 @@ static int join_partial_objects(zval *a, zval *b) return SUCCESS; } -static void join_phi_values(zval *a, zval *b, zend_bool escape) { +static void join_phi_values(zval *a, zval *b, bool escape) { if (IS_BOT(a) || IS_TOP(b)) { return; } diff --git a/ext/opcache/Optimizer/scdf.c b/ext/opcache/Optimizer/scdf.c index aa7ea3a1a2..89852e89e0 100644 --- a/ext/opcache/Optimizer/scdf.c +++ b/ext/opcache/Optimizer/scdf.c @@ -185,7 +185,7 @@ void scdf_solve(scdf_ctx *scdf, const char *name) { /* If a live range starts in a reachable block and ends in an unreachable block, we should * not eliminate the latter. While it cannot be reached, the FREE opcode of the loop var * is necessary for the correctness of temporary compaction. */ -static zend_bool kept_alive_by_loop_var_free(scdf_ctx *scdf, uint32_t block_idx) { +static bool kept_alive_by_loop_var_free(scdf_ctx *scdf, uint32_t block_idx) { uint32_t i; const zend_op_array *op_array = scdf->op_array; const zend_cfg *cfg = &scdf->ssa->cfg; diff --git a/ext/opcache/Optimizer/scdf.h b/ext/opcache/Optimizer/scdf.h index 64b4b61340..1ab1cec3bd 100644 --- a/ext/opcache/Optimizer/scdf.h +++ b/ext/opcache/Optimizer/scdf.h @@ -89,7 +89,7 @@ static inline uint32_t scdf_edge(zend_cfg *cfg, int from, int to) { ZEND_UNREACHABLE(); } -static inline zend_bool scdf_is_edge_feasible(scdf_ctx *scdf, int from, int to) { +static inline bool scdf_is_edge_feasible(scdf_ctx *scdf, int from, int to) { uint32_t edge = scdf_edge(&scdf->ssa->cfg, from, to); return zend_bitset_in(scdf->feasible_edges, edge); } diff --git a/ext/opcache/Optimizer/ssa_integrity.c b/ext/opcache/Optimizer/ssa_integrity.c index 5cb383c77a..47b9d6053e 100644 --- a/ext/opcache/Optimizer/ssa_integrity.c +++ b/ext/opcache/Optimizer/ssa_integrity.c @@ -22,7 +22,7 @@ /* The ssa_verify_integrity() function ensures that that certain invariants of the SSA form and * CFG are upheld and prints messages to stderr if this is not the case. */ -static inline zend_bool is_in_use_chain(zend_ssa *ssa, int var, int check) { +static inline bool is_in_use_chain(zend_ssa *ssa, int var, int check) { int use; FOREACH_USE(&ssa->vars[var], use) { if (use == check) { @@ -32,7 +32,7 @@ static inline zend_bool is_in_use_chain(zend_ssa *ssa, int var, int check) { return 0; } -static inline zend_bool is_in_phi_use_chain(zend_ssa *ssa, int var, zend_ssa_phi *check) { +static inline bool is_in_phi_use_chain(zend_ssa *ssa, int var, zend_ssa_phi *check) { zend_ssa_phi *phi; FOREACH_PHI_USE(&ssa->vars[var], phi) { if (phi == check) { @@ -42,21 +42,21 @@ static inline zend_bool is_in_phi_use_chain(zend_ssa *ssa, int var, zend_ssa_phi return 0; } -static inline zend_bool is_used_by_op(zend_ssa *ssa, int op, int check) { +static inline bool is_used_by_op(zend_ssa *ssa, int op, int check) { zend_ssa_op *ssa_op = &ssa->ops[op]; return (ssa_op->op1_use == check) || (ssa_op->op2_use == check) || (ssa_op->result_use == check); } -static inline zend_bool is_defined_by_op(zend_ssa *ssa, int op, int check) { +static inline bool is_defined_by_op(zend_ssa *ssa, int op, int check) { zend_ssa_op *ssa_op = &ssa->ops[op]; return (ssa_op->op1_def == check) || (ssa_op->op2_def == check) || (ssa_op->result_def == check); } -static inline zend_bool is_in_phi_sources(zend_ssa *ssa, zend_ssa_phi *phi, int check) { +static inline bool is_in_phi_sources(zend_ssa *ssa, zend_ssa_phi *phi, int check) { int source; FOREACH_PHI_SOURCE(phi, source) { if (source == check) { @@ -66,7 +66,7 @@ static inline zend_bool is_in_phi_sources(zend_ssa *ssa, zend_ssa_phi *phi, int return 0; } -static inline zend_bool is_in_predecessors(zend_cfg *cfg, zend_basic_block *block, int check) { +static inline bool is_in_predecessors(zend_cfg *cfg, zend_basic_block *block, int check) { int i, *predecessors = &cfg->predecessors[block->predecessor_offset]; for (i = 0; i < block->predecessors_count; i++) { if (predecessors[i] == check) { @@ -76,7 +76,7 @@ static inline zend_bool is_in_predecessors(zend_cfg *cfg, zend_basic_block *bloc return 0; } -static inline zend_bool is_in_successors(zend_basic_block *block, int check) { +static inline bool is_in_successors(zend_basic_block *block, int check) { int s; for (s = 0; s < block->successors_count; s++) { if (block->successors[s] == check) { @@ -86,7 +86,7 @@ static inline zend_bool is_in_successors(zend_basic_block *block, int check) { return 0; } -static inline zend_bool is_var_type(zend_uchar type) { +static inline bool is_var_type(zend_uchar type) { return (type & (IS_CV|IS_VAR|IS_TMP_VAR)) != 0; } diff --git a/ext/opcache/Optimizer/zend_call_graph.c b/ext/opcache/Optimizer/zend_call_graph.c index 0fa8945f09..124596ea39 100644 --- a/ext/opcache/Optimizer/zend_call_graph.c +++ b/ext/opcache/Optimizer/zend_call_graph.c @@ -53,7 +53,7 @@ int zend_analyze_calls(zend_arena **arena, zend_script *script, uint32_t build_f int call = 0; zend_call_info **call_stack; ALLOCA_FLAG(use_heap); - zend_bool is_prototype; + bool is_prototype; call_stack = do_alloca((op_array->last / 2) * sizeof(zend_call_info*), use_heap); call_info = NULL; diff --git a/ext/opcache/Optimizer/zend_call_graph.h b/ext/opcache/Optimizer/zend_call_graph.h index 28522a1277..2a3fb4380f 100644 --- a/ext/opcache/Optimizer/zend_call_graph.h +++ b/ext/opcache/Optimizer/zend_call_graph.h @@ -34,9 +34,9 @@ struct _zend_call_info { zend_function *callee_func; zend_call_info *next_caller; zend_call_info *next_callee; - zend_bool recursive; - zend_bool send_unpack; /* Parameters passed by SEND_UNPACK or SEND_ARRAY */ - zend_bool named_args; /* Function has named arguments */ + bool recursive; + bool send_unpack; /* Parameters passed by SEND_UNPACK or SEND_ARRAY */ + bool named_args; /* Function has named arguments */ int num_args; zend_send_arg_info arg_info[1]; }; diff --git a/ext/opcache/Optimizer/zend_cfg.c b/ext/opcache/Optimizer/zend_cfg.c index 0560bcf2d5..bbf8efb41a 100644 --- a/ext/opcache/Optimizer/zend_cfg.c +++ b/ext/opcache/Optimizer/zend_cfg.c @@ -279,7 +279,7 @@ int zend_build_cfg(zend_arena **arena, const zend_op_array *op_array, uint32_t b int blocks_count = 0; zend_basic_block *blocks; zval *zv; - zend_bool extra_entry_block = 0; + bool extra_entry_block = 0; cfg->flags = build_flags & (ZEND_CFG_STACKLESS|ZEND_CFG_RECV_ENTRY); diff --git a/ext/opcache/Optimizer/zend_func_info.c b/ext/opcache/Optimizer/zend_func_info.c index d43637f1e6..228051ee86 100644 --- a/ext/opcache/Optimizer/zend_func_info.c +++ b/ext/opcache/Optimizer/zend_func_info.c @@ -861,7 +861,7 @@ static uint32_t get_internal_func_info( uint32_t zend_get_func_info( const zend_call_info *call_info, const zend_ssa *ssa, - zend_class_entry **ce, zend_bool *ce_is_instanceof) + zend_class_entry **ce, bool *ce_is_instanceof) { uint32_t ret = 0; const zend_function *callee_func = call_info->callee_func; diff --git a/ext/opcache/Optimizer/zend_func_info.h b/ext/opcache/Optimizer/zend_func_info.h index 13dd2e3127..423d557f7a 100644 --- a/ext/opcache/Optimizer/zend_func_info.h +++ b/ext/opcache/Optimizer/zend_func_info.h @@ -58,7 +58,7 @@ extern int zend_func_info_rid; uint32_t zend_get_func_info( const zend_call_info *call_info, const zend_ssa *ssa, - zend_class_entry **ce, zend_bool *ce_is_instanceof); + zend_class_entry **ce, bool *ce_is_instanceof); int zend_func_info_startup(void); int zend_func_info_shutdown(void); diff --git a/ext/opcache/Optimizer/zend_inference.c b/ext/opcache/Optimizer/zend_inference.c index 7bd40120db..92be7ee802 100644 --- a/ext/opcache/Optimizer/zend_inference.c +++ b/ext/opcache/Optimizer/zend_inference.c @@ -61,7 +61,7 @@ /* Pop elements in unspecified order from worklist until it is empty */ #define WHILE_WORKLIST(worklist, len, i) do { \ - zend_bool _done = 0; \ + bool _done = 0; \ while (!_done) { \ _done = 1; \ ZEND_BITSET_FOREACH(worklist, len, i) { \ @@ -158,12 +158,12 @@ } \ } while (0) -static inline zend_bool add_will_overflow(zend_long a, zend_long b) { +static inline bool add_will_overflow(zend_long a, zend_long b) { return (b > 0 && a > ZEND_LONG_MAX - b) || (b < 0 && a < ZEND_LONG_MIN - b); } #if 0 -static inline zend_bool sub_will_overflow(zend_long a, zend_long b) { +static inline bool sub_will_overflow(zend_long a, zend_long b) { return (b > 0 && a < ZEND_LONG_MIN + b) || (b < 0 && a > ZEND_LONG_MAX + b); } @@ -513,7 +513,7 @@ static void zend_ssa_range_and(zend_long a, zend_long b, zend_long c, zend_long } } -static inline zend_bool zend_abs_range( +static inline bool zend_abs_range( zend_long min, zend_long max, zend_long *abs_min, zend_long *abs_max) { if (min == ZEND_LONG_MIN) { /* Cannot take absolute value of LONG_MIN */ @@ -539,7 +539,7 @@ static inline zend_long safe_shift_left(zend_long n, zend_long s) { return (zend_long) ((zend_ulong) n << (zend_ulong) s); } -static inline zend_bool shift_left_overflows(zend_long n, zend_long s) { +static inline bool shift_left_overflows(zend_long n, zend_long s) { /* This considers shifts that shift in the sign bit to be overflowing as well */ if (n >= 0) { return s >= SIZEOF_ZEND_LONG * 8 - 1 || safe_shift_left(n, s) < n; @@ -1504,7 +1504,7 @@ int zend_inference_propagate_range(const zend_op_array *op_array, zend_ssa *ssa, return 0; } -void zend_inference_init_range(const zend_op_array *op_array, zend_ssa *ssa, int var, zend_bool underflow, zend_long min, zend_long max, zend_bool overflow) +void zend_inference_init_range(const zend_op_array *op_array, zend_ssa *ssa, int var, bool underflow, zend_long min, zend_long max, bool overflow) { if (underflow) { min = ZEND_LONG_MIN; @@ -2346,7 +2346,7 @@ static zend_always_inline int _zend_update_type_info( zend_ssa_op *ssa_op, const zend_op **ssa_opcodes, zend_long optimization_level, - zend_bool update_worklist) + bool update_worklist) { uint32_t t1, t2; uint32_t tmp, orig; @@ -3479,7 +3479,7 @@ static zend_always_inline int _zend_update_type_info( } zend_class_entry *ce; - zend_bool ce_is_instanceof; + bool ce_is_instanceof; tmp = zend_get_func_info(call_info, ssa, &ce, &ce_is_instanceof); UPDATE_SSA_TYPE(tmp, ssa_op->result_def); if (ce) { @@ -3662,7 +3662,7 @@ int zend_infer_types_ex(const zend_op_array *op_array, const zend_script *script int ssa_vars_count = ssa->vars_count; int i, j; uint32_t tmp, worklist_len = zend_bitset_len(ssa_vars_count); - zend_bool update_worklist = 1; + bool update_worklist = 1; while (!zend_bitset_empty(worklist, worklist_len)) { j = zend_bitset_first(worklist, worklist_len); @@ -3733,18 +3733,18 @@ int zend_infer_types_ex(const zend_op_array *op_array, const zend_script *script return SUCCESS; } -static zend_bool is_narrowable_instr(zend_op *opline) { +static bool is_narrowable_instr(zend_op *opline) { return opline->opcode == ZEND_ADD || opline->opcode == ZEND_SUB || opline->opcode == ZEND_MUL || opline->opcode == ZEND_DIV; } -static zend_bool is_effective_op1_double_cast(zend_op *opline, zval *op2) { +static bool is_effective_op1_double_cast(zend_op *opline, zval *op2) { return (opline->opcode == ZEND_ADD && Z_LVAL_P(op2) == 0) || (opline->opcode == ZEND_SUB && Z_LVAL_P(op2) == 0) || (opline->opcode == ZEND_MUL && Z_LVAL_P(op2) == 1) || (opline->opcode == ZEND_DIV && Z_LVAL_P(op2) == 1); } -static zend_bool is_effective_op2_double_cast(zend_op *opline, zval *op1) { +static bool is_effective_op2_double_cast(zend_op *opline, zval *op1) { /* In PHP it holds that (double)(0-$int) is bitwise identical to 0.0-(double)$int, * so allowing SUB here is fine. */ return (opline->opcode == ZEND_ADD && Z_LVAL_P(op1) == 0) @@ -3771,7 +3771,7 @@ static zend_bool is_effective_op2_double_cast(zend_op *opline, zval *op1) { * avoid infinite loops. An iterative, worklist driven approach would be possible, but the state * management more cumbersome to implement, so we don't bother for now. */ -static zend_bool can_convert_to_double( +static bool can_convert_to_double( const zend_op_array *op_array, zend_ssa *ssa, int var_num, zval *value, zend_bitset visited) { zend_ssa_var *var = &ssa->vars[var_num]; @@ -3909,7 +3909,7 @@ static int zend_type_narrowing(const zend_op_array *op_array, const zend_script zend_bitset visited, worklist; int i, v; zend_op *opline; - zend_bool narrowed = 0; + bool narrowed = 0; ALLOCA_FLAG(use_heap) visited = ZEND_BITSET_ALLOCA(2 * bitset_len, use_heap); diff --git a/ext/opcache/Optimizer/zend_inference.h b/ext/opcache/Optimizer/zend_inference.h index 212679df5e..11a9d74d75 100644 --- a/ext/opcache/Optimizer/zend_inference.h +++ b/ext/opcache/Optimizer/zend_inference.h @@ -40,7 +40,7 @@ |MAY_BE_ARRAY_OF_ARRAY|MAY_BE_ARRAY_OF_OBJECT|MAY_BE_ARRAY_OF_RESOURCE) #define DEFINE_SSA_OP_HAS_RANGE(opN) \ - static zend_always_inline zend_bool _ssa_##opN##_has_range(const zend_op_array *op_array, const zend_ssa *ssa, const zend_op *opline, const zend_ssa_op *ssa_op) \ + static zend_always_inline bool _ssa_##opN##_has_range(const zend_op_array *op_array, const zend_ssa *ssa, const zend_op *opline, const zend_ssa_op *ssa_op) \ { \ if (opline->opN##_type == IS_CONST) { \ zval *zv = CRT_CONSTANT(opline->opN); \ @@ -239,11 +239,11 @@ DEFINE_SSA_OP_DEF_INFO(result) #define OP2_DATA_DEF_INFO() (_ssa_op2_def_info(op_array, ssa, (opline+1), (ssa_op+1))) #define RES_INFO() (_ssa_result_def_info(op_array, ssa, opline, ssa_op)) -static zend_always_inline zend_bool zend_add_will_overflow(zend_long a, zend_long b) { +static zend_always_inline bool zend_add_will_overflow(zend_long a, zend_long b) { return (b > 0 && a > ZEND_LONG_MAX - b) || (b < 0 && a < ZEND_LONG_MIN - b); } -static zend_always_inline zend_bool zend_sub_will_overflow(zend_long a, zend_long b) { +static zend_always_inline bool zend_sub_will_overflow(zend_long a, zend_long b) { return (b > 0 && a < ZEND_LONG_MIN + b) || (b < 0 && a > ZEND_LONG_MAX + b); } @@ -258,7 +258,7 @@ uint32_t zend_array_element_type(uint32_t t1, zend_uchar op_type, int write, int int zend_inference_calc_range(const zend_op_array *op_array, zend_ssa *ssa, int var, int widening, int narrowing, zend_ssa_range *tmp); int zend_inference_propagate_range(const zend_op_array *op_array, zend_ssa *ssa, zend_op *opline, zend_ssa_op* ssa_op, int var, zend_ssa_range *tmp); -void zend_inference_init_range(const zend_op_array *op_array, zend_ssa *ssa, int var, zend_bool underflow, zend_long min, zend_long max, zend_bool overflow); +void zend_inference_init_range(const zend_op_array *op_array, zend_ssa *ssa, int var, bool underflow, zend_long min, zend_long max, bool overflow); int zend_inference_narrowing_meet(zend_ssa_var_info *var_info, zend_ssa_range *r); int zend_inference_widening_meet(zend_ssa_var_info *var_info, zend_ssa_range *r); void zend_inference_check_recursive_dependencies(zend_op_array *op_array); diff --git a/ext/opcache/Optimizer/zend_optimizer.c b/ext/opcache/Optimizer/zend_optimizer.c index c80992ed8d..00c579491a 100644 --- a/ext/opcache/Optimizer/zend_optimizer.c +++ b/ext/opcache/Optimizer/zend_optimizer.c @@ -785,7 +785,7 @@ static zend_class_entry *get_class_entry_from_op1( } zend_function *zend_optimizer_get_called_func( - zend_script *script, zend_op_array *op_array, zend_op *opline, zend_bool *is_prototype) + zend_script *script, zend_op_array *op_array, zend_op *opline, bool *is_prototype) { *is_prototype = 0; switch (opline->opcode) { @@ -832,8 +832,8 @@ zend_function *zend_optimizer_get_called_func( zend_string *func_name = Z_STR_P(CRT_CONSTANT(opline->op2) + 1); zend_function *fbc = zend_hash_find_ptr(&ce->function_table, func_name); if (fbc) { - zend_bool is_public = (fbc->common.fn_flags & ZEND_ACC_PUBLIC) != 0; - zend_bool same_scope = fbc->common.scope == op_array->scope; + bool is_public = (fbc->common.fn_flags & ZEND_ACC_PUBLIC) != 0; + bool same_scope = fbc->common.scope == op_array->scope; if (is_public || same_scope) { return fbc; } @@ -851,9 +851,9 @@ zend_function *zend_optimizer_get_called_func( zend_function *fbc = zend_hash_find_ptr( &op_array->scope->function_table, method_name); if (fbc) { - zend_bool is_private = (fbc->common.fn_flags & ZEND_ACC_PRIVATE) != 0; - zend_bool is_final = (fbc->common.fn_flags & ZEND_ACC_FINAL) != 0; - zend_bool same_scope = fbc->common.scope == op_array->scope; + bool is_private = (fbc->common.fn_flags & ZEND_ACC_PRIVATE) != 0; + bool is_final = (fbc->common.fn_flags & ZEND_ACC_FINAL) != 0; + bool same_scope = fbc->common.scope == op_array->scope; if (is_private) { /* Only use private method if in the same scope. We can't even use it * as a prototype, as it may be overridden with changed signature. */ @@ -1347,7 +1347,7 @@ static void zend_adjust_fcall_stack_size_graph(zend_op_array *op_array) } } -static zend_bool needs_live_range(zend_op_array *op_array, zend_op *def_opline) { +static bool needs_live_range(zend_op_array *op_array, zend_op *def_opline) { zend_func_info *func_info = ZEND_FUNC_INFO(op_array); zend_ssa_op *ssa_op = &func_info->ssa.ops[def_opline - op_array->opcodes]; int ssa_var = ssa_op->result_def; diff --git a/ext/opcache/Optimizer/zend_optimizer_internal.h b/ext/opcache/Optimizer/zend_optimizer_internal.h index 0c8c2fe4c7..911eb79e64 100644 --- a/ext/opcache/Optimizer/zend_optimizer_internal.h +++ b/ext/opcache/Optimizer/zend_optimizer_internal.h @@ -71,7 +71,7 @@ typedef struct _zend_optimizer_ctx { target = src; \ } while (0) -static inline zend_bool zend_optimizer_is_loop_var_free(const zend_op *opline) { +static inline bool zend_optimizer_is_loop_var_free(const zend_op *opline) { return (opline->opcode == ZEND_FE_FREE && opline->extended_value != ZEND_FREE_ON_RETURN) || (opline->opcode == ZEND_FREE && opline->extended_value == ZEND_FREE_SWITCH); } @@ -109,12 +109,12 @@ void zend_optimizer_nop_removal(zend_op_array *op_array, zend_optimizer_ctx *ctx void zend_optimizer_compact_literals(zend_op_array *op_array, zend_optimizer_ctx *ctx); void zend_optimizer_compact_vars(zend_op_array *op_array); zend_function *zend_optimizer_get_called_func( - zend_script *script, zend_op_array *op_array, zend_op *opline, zend_bool *is_prototype); + zend_script *script, zend_op_array *op_array, zend_op *opline, bool *is_prototype); uint32_t zend_optimizer_classify_function(zend_string *name, uint32_t num_args); void zend_optimizer_migrate_jump(zend_op_array *op_array, zend_op *new_opline, zend_op *opline); void zend_optimizer_shift_jump(zend_op_array *op_array, zend_op *opline, uint32_t *shiftlist); int sccp_optimize_op_array(zend_optimizer_ctx *ctx, zend_op_array *op_arrya, zend_ssa *ssa, zend_call_info **call_map); -int dce_optimize_op_array(zend_op_array *op_array, zend_ssa *ssa, zend_bool reorder_dtor_effects); +int dce_optimize_op_array(zend_op_array *op_array, zend_ssa *ssa, bool reorder_dtor_effects); int zend_ssa_escape_analysis(const zend_script *script, zend_op_array *op_array, zend_ssa *ssa); typedef void (*zend_op_array_func_t)(zend_op_array *, void *context); diff --git a/ext/opcache/Optimizer/zend_ssa.c b/ext/opcache/Optimizer/zend_ssa.c index 3a6a098196..ad3ff7022b 100644 --- a/ext/opcache/Optimizer/zend_ssa.c +++ b/ext/opcache/Optimizer/zend_ssa.c @@ -25,14 +25,14 @@ #include "zend_inference.h" #include "Optimizer/zend_optimizer_internal.h" -static zend_bool dominates(const zend_basic_block *blocks, int a, int b) { +static bool dominates(const zend_basic_block *blocks, int a, int b) { while (blocks[b].level > blocks[a].level) { b = blocks[b].idom; } return a == b; } -static zend_bool will_rejoin( +static bool will_rejoin( const zend_cfg *cfg, const zend_dfg *dfg, const zend_basic_block *block, int other_successor, int exclude, int var) { int i; @@ -58,7 +58,7 @@ static zend_bool will_rejoin( return 0; } -static zend_bool needs_pi(const zend_op_array *op_array, zend_dfg *dfg, zend_ssa *ssa, int from, int to, int var) /* {{{ */ +static bool needs_pi(const zend_op_array *op_array, zend_dfg *dfg, zend_ssa *ssa, int from, int to, int var) /* {{{ */ { zend_basic_block *from_block, *to_block; int other_successor; @@ -1508,7 +1508,7 @@ static void propagate_phi_type_widening(zend_ssa *ssa, int var) /* {{{ */ } /* }}} */ -void zend_ssa_rename_var_uses(zend_ssa *ssa, int old, int new, zend_bool update_types) /* {{{ */ +void zend_ssa_rename_var_uses(zend_ssa *ssa, int old, int new, bool update_types) /* {{{ */ { zend_ssa_var *old_var = &ssa->vars[old]; zend_ssa_var *new_var = &ssa->vars[new]; @@ -1527,7 +1527,7 @@ void zend_ssa_rename_var_uses(zend_ssa *ssa, int old, int new, zend_bool update_ /* If the op already uses the new var, don't add the op to the use * list again. Instead move the use_chain to the correct operand. */ - zend_bool add_to_use_chain = 1; + bool add_to_use_chain = 1; if (ssa_op->result_use == new) { add_to_use_chain = 0; } else if (ssa_op->op1_use == new) { @@ -1579,7 +1579,7 @@ void zend_ssa_rename_var_uses(zend_ssa *ssa, int old, int new, zend_bool update_ /* Update phi use chains */ FOREACH_PHI_USE(old_var, phi) { int j; - zend_bool after_first_new_source = 0; + bool after_first_new_source = 0; /* If the phi already uses the new var, find its use chain, as we may * need to move it to a different source operand. */ diff --git a/ext/opcache/Optimizer/zend_ssa.h b/ext/opcache/Optimizer/zend_ssa.h index a5d6362f47..68f39ad0ec 100644 --- a/ext/opcache/Optimizer/zend_ssa.h +++ b/ext/opcache/Optimizer/zend_ssa.h @@ -25,8 +25,8 @@ typedef struct _zend_ssa_range { zend_long min; zend_long max; - zend_bool underflow; - zend_bool overflow; + bool underflow; + bool overflow; } zend_ssa_range; typedef enum _zend_ssa_negative_lat { @@ -155,7 +155,7 @@ void zend_ssa_remove_instr(zend_ssa *ssa, zend_op *opline, zend_ssa_op *ssa_op); void zend_ssa_remove_phi(zend_ssa *ssa, zend_ssa_phi *phi); void zend_ssa_remove_uses_of_var(zend_ssa *ssa, int var_num); void zend_ssa_remove_block(zend_op_array *op_array, zend_ssa *ssa, int b); -void zend_ssa_rename_var_uses(zend_ssa *ssa, int old_var, int new_var, zend_bool update_types); +void zend_ssa_rename_var_uses(zend_ssa *ssa, int old_var, int new_var, bool update_types); static zend_always_inline void _zend_ssa_remove_def(zend_ssa_var *var) { @@ -215,7 +215,7 @@ static zend_always_inline zend_ssa_phi* zend_ssa_next_use_phi(const zend_ssa *ss return NULL; } -static zend_always_inline zend_bool zend_ssa_is_no_val_use(const zend_op *opline, const zend_ssa_op *ssa_op, int var) +static zend_always_inline bool zend_ssa_is_no_val_use(const zend_op *opline, const zend_ssa_op *ssa_op, int var) { if (opline->opcode == ZEND_ASSIGN || opline->opcode == ZEND_UNSET_CV diff --git a/ext/opcache/ZendAccelerator.c b/ext/opcache/ZendAccelerator.c index 891863df61..0ebe5a41ae 100644 --- a/ext/opcache/ZendAccelerator.c +++ b/ext/opcache/ZendAccelerator.c @@ -109,12 +109,12 @@ zend_accel_shared_globals *accel_shared_globals = NULL; #ifdef ZEND_WIN32 char accel_uname_id[32]; #endif -zend_bool accel_startup_ok = 0; +bool accel_startup_ok = 0; static char *zps_failure_reason = NULL; char *zps_api_failure_reason = NULL; -zend_bool file_cache_only = 0; /* process uses file cache only */ +bool file_cache_only = 0; /* process uses file cache only */ #if ENABLE_FILE_CACHE_FALLBACK -zend_bool fallback_process = 0; /* process uses file cache fallback */ +bool fallback_process = 0; /* process uses file cache fallback */ #endif static zend_op_array *(*accelerator_orig_compile_file)(zend_file_handle *file_handle, int type); @@ -1278,7 +1278,7 @@ char *accel_make_persistent_key(const char *path, size_t path_length, int *key_l return (char*)path; } -int zend_accel_invalidate(const char *filename, size_t filename_len, zend_bool force) +int zend_accel_invalidate(const char *filename, size_t filename_len, bool force) { zend_string *realpath; zend_persistent_script *persistent_script; @@ -1353,7 +1353,7 @@ static void zend_accel_add_key(const char *key, unsigned int key_length, zend_ac } } -static zend_always_inline zend_bool is_phar_file(zend_string *filename) +static zend_always_inline bool is_phar_file(zend_string *filename) { return filename && ZSTR_LEN(filename) >= sizeof(".phar") && !memcmp(ZSTR_VAL(filename) + ZSTR_LEN(filename) - (sizeof(".phar")-1), ".phar", sizeof(".phar")-1) && @@ -2968,7 +2968,7 @@ static zend_result accel_post_startup(void) size_t shm_size = ZCG(accel_directives).memory_consumption; #ifdef HAVE_JIT size_t jit_size = 0; - zend_bool reattached = 0; + bool reattached = 0; if (JIT_G(enabled) && JIT_G(buffer_size) && zend_jit_check_support() == SUCCESS) { @@ -3138,7 +3138,7 @@ static void accel_post_shutdown(void) void accel_shutdown(void) { zend_ini_entry *ini_entry; - zend_bool _file_cache_only = 0; + bool _file_cache_only = 0; #ifdef HAVE_JIT zend_jit_shutdown(); @@ -3504,7 +3504,7 @@ static void get_unresolved_initializer(zend_class_entry *ce, const char **kind, } ZEND_HASH_FOREACH_END(); } -static zend_bool preload_needed_types_known(zend_class_entry *ce); +static bool preload_needed_types_known(zend_class_entry *ce); static void get_unlinked_dependency(zend_class_entry *ce, const char **kind, const char **name) { zend_class_entry *p; *kind = "Unknown reason"; @@ -3561,9 +3561,9 @@ static void get_unlinked_dependency(zend_class_entry *ce, const char **kind, con } } -static zend_bool preload_try_resolve_constants(zend_class_entry *ce) +static bool preload_try_resolve_constants(zend_class_entry *ce) { - zend_bool ok, changed; + bool ok, changed; zend_class_constant *c; zval *val; @@ -3635,9 +3635,9 @@ static zend_class_entry *preload_fetch_resolved_ce(zend_string *name, zend_class return ce; } -static zend_bool preload_try_resolve_property_types(zend_class_entry *ce) +static bool preload_try_resolve_property_types(zend_class_entry *ce) { - zend_bool ok = 1; + bool ok = 1; if (ce->ce_flags & ZEND_ACC_HAS_TYPE_HINTS) { zend_property_info *prop; ZEND_HASH_FOREACH_PTR(&ce->properties_info, prop) { @@ -3659,7 +3659,7 @@ static zend_bool preload_try_resolve_property_types(zend_class_entry *ce) return ok; } -static zend_bool preload_is_class_type_known(zend_class_entry *ce, zend_string *name) { +static bool preload_is_class_type_known(zend_class_entry *ce, zend_string *name) { if (zend_string_equals_literal_ci(name, "self") || zend_string_equals_literal_ci(name, "parent") || zend_string_equals_ci(name, ce->name)) { @@ -3667,12 +3667,12 @@ static zend_bool preload_is_class_type_known(zend_class_entry *ce, zend_string * } zend_string *lcname = zend_string_tolower(name); - zend_bool known = zend_hash_exists(EG(class_table), lcname); + bool known = zend_hash_exists(EG(class_table), lcname); zend_string_release(lcname); return known; } -static zend_bool preload_is_type_known(zend_class_entry *ce, zend_type *type) { +static bool preload_is_type_known(zend_class_entry *ce, zend_type *type) { zend_type *single_type; ZEND_TYPE_FOREACH(*type, single_type) { if (ZEND_TYPE_HAS_NAME(*single_type)) { @@ -3684,7 +3684,7 @@ static zend_bool preload_is_type_known(zend_class_entry *ce, zend_type *type) { return 1; } -static zend_bool preload_is_method_maybe_override(zend_class_entry *ce, zend_string *lcname) { +static bool preload_is_method_maybe_override(zend_class_entry *ce, zend_string *lcname) { zend_class_entry *p; if (ce->trait_aliases || ce->trait_precedences) { return 1; @@ -3722,7 +3722,7 @@ static zend_bool preload_is_method_maybe_override(zend_class_entry *ce, zend_str return 0; } -static zend_bool preload_needed_types_known(zend_class_entry *ce) { +static bool preload_needed_types_known(zend_class_entry *ce) { zend_function *fptr; zend_string *lcname; ZEND_HASH_FOREACH_STR_KEY_PTR(&ce->function_table, lcname, fptr) { @@ -3749,7 +3749,7 @@ static void preload_link(void) zend_persistent_script *script; zend_class_entry *ce, *parent, *p; zend_string *key; - zend_bool found, changed; + bool found, changed; uint32_t i; dtor_func_t orig_dtor; zend_function *function; @@ -4052,7 +4052,7 @@ static zend_string *preload_resolve_path(zend_string *filename) static void preload_remove_empty_includes(void) { zend_persistent_script *script; - zend_bool changed; + bool changed; /* mark all as empty */ ZEND_HASH_FOREACH_PTR(preload_scripts, script) { @@ -4359,7 +4359,7 @@ static zend_result preload_autoload(zend_string *filename) zend_op_array *op_array; zend_execute_data *old_execute_data; zend_class_entry *old_fake_scope; - zend_bool do_bailout = 0; + bool do_bailout = 0; int ret = SUCCESS; if (zend_hash_exists(&EG(included_files), filename)) { @@ -4422,7 +4422,7 @@ static zend_result preload_autoload(zend_string *filename) return ret; } -static int accel_preload(const char *config, zend_bool in_child) +static int accel_preload(const char *config, bool in_child) { zend_file_handle file_handle; int ret; @@ -4795,7 +4795,7 @@ static int accel_finish_startup(void) size_t (*orig_ub_write)(const char *str, size_t str_length) = sapi_module.ub_write; void (*orig_flush)(void *server_context) = sapi_module.flush; #ifdef ZEND_SIGNALS - zend_bool old_reset_signals = SIGG(reset); + bool old_reset_signals = SIGG(reset); #endif if (UNEXPECTED(file_cache_only)) { @@ -4901,7 +4901,7 @@ static int accel_finish_startup(void) EG(error_reporting) = orig_error_reporting; if (rc == SUCCESS) { - zend_bool orig_report_memleaks; + bool orig_report_memleaks; /* don't send headers */ SG(headers_sent) = 1; diff --git a/ext/opcache/ZendAccelerator.h b/ext/opcache/ZendAccelerator.h index 08e4a7f407..1d151b982e 100644 --- a/ext/opcache/ZendAccelerator.h +++ b/ext/opcache/ZendAccelerator.h @@ -121,9 +121,9 @@ typedef struct _zend_persistent_script { zend_long compiler_halt_offset; /* position of __HALT_COMPILER or -1 */ int ping_auto_globals_mask; /* which autoglobals are used by the script */ accel_time_t timestamp; /* the script modification time */ - zend_bool corrupted; - zend_bool is_phar; - zend_bool empty; + bool corrupted; + bool is_phar; + bool empty; uint32_t num_warnings; zend_recorded_warning **warnings; @@ -155,18 +155,18 @@ typedef struct _zend_accel_directives { char *user_blacklist_filename; zend_long consistency_checks; zend_long force_restart_timeout; - zend_bool use_cwd; - zend_bool ignore_dups; - zend_bool validate_timestamps; - zend_bool revalidate_path; - zend_bool save_comments; - zend_bool record_warnings; - zend_bool protect_memory; - zend_bool file_override_enabled; - zend_bool enable_cli; - zend_bool validate_permission; + bool use_cwd; + bool ignore_dups; + bool validate_timestamps; + bool revalidate_path; + bool save_comments; + bool record_warnings; + bool protect_memory; + bool file_override_enabled; + bool enable_cli; + bool validate_permission; #ifndef ZEND_WIN32 - zend_bool validate_root; + bool validate_root; #endif zend_ulong revalidate_freq; zend_ulong file_update_protection; @@ -186,13 +186,13 @@ typedef struct _zend_accel_directives { char *lockfile_path; #endif char *file_cache; - zend_bool file_cache_only; - zend_bool file_cache_consistency_checks; + bool file_cache_only; + bool file_cache_consistency_checks; #if ENABLE_FILE_CACHE_FALLBACK - zend_bool file_cache_fallback; + bool file_cache_fallback; #endif #ifdef HAVE_HUGE_CODE_PAGES - zend_bool huge_code_pages; + bool huge_code_pages; #endif char *preload; #ifndef ZEND_WIN32 @@ -205,10 +205,10 @@ typedef struct _zend_accel_directives { typedef struct _zend_accel_globals { int counted; /* the process uses shared memory */ - zend_bool enabled; - zend_bool locked; /* thread obtained exclusive lock */ - zend_bool accelerator_enabled; /* accelerator enabled for current request */ - zend_bool pcre_reseted; + bool enabled; + bool locked; /* thread obtained exclusive lock */ + bool accelerator_enabled; /* accelerator enabled for current request */ + bool pcre_reseted; zend_accel_directives accel_directives; zend_string *cwd; /* current working directory or NULL */ zend_string *include_path; /* current value of "include_path" directive */ @@ -229,9 +229,9 @@ typedef struct _zend_accel_globals { void *mem; void *arena_mem; zend_persistent_script *current_persistent_script; - zend_bool is_immutable_class; + bool is_immutable_class; /* Temporary storage for warnings before they are moved into persistent_script. */ - zend_bool record_warnings; + bool record_warnings; uint32_t num_warnings; zend_recorded_warning **warnings; /* cache to save hash lookup on the same INCLUDE opcode */ @@ -267,15 +267,15 @@ typedef struct _zend_accel_shared_globals { time_t start_time; time_t last_restart_time; time_t force_restart_time; - zend_bool accelerator_enabled; - zend_bool restart_pending; + bool accelerator_enabled; + bool restart_pending; zend_accel_restart_reason restart_reason; - zend_bool cache_status_before_restart; + bool cache_status_before_restart; #ifdef ZEND_WIN32 LONGLONG mem_usage; LONGLONG restart_in; #endif - zend_bool restart_in_progress; + bool restart_in_progress; /* Preloading */ zend_persistent_script *preload_script; @@ -291,10 +291,10 @@ typedef struct _zend_accel_shared_globals { #ifdef ZEND_WIN32 extern char accel_uname_id[32]; #endif -extern zend_bool accel_startup_ok; -extern zend_bool file_cache_only; +extern bool accel_startup_ok; +extern bool file_cache_only; #if ENABLE_FILE_CACHE_FALLBACK -extern zend_bool fallback_process; +extern bool fallback_process; #endif extern zend_accel_shared_globals *accel_shared_globals; @@ -321,7 +321,7 @@ void zend_accel_schedule_restart_if_necessary(zend_accel_restart_reason reason); accel_time_t zend_get_file_handle_timestamp(zend_file_handle *file_handle, size_t *size); int validate_timestamp_and_record(zend_persistent_script *persistent_script, zend_file_handle *file_handle); int validate_timestamp_and_record_ex(zend_persistent_script *persistent_script, zend_file_handle *file_handle); -int zend_accel_invalidate(const char *filename, size_t filename_len, zend_bool force); +int zend_accel_invalidate(const char *filename, size_t filename_len, bool force); int accelerator_shm_read_lock(void); void accelerator_shm_read_unlock(void); diff --git a/ext/opcache/jit/zend_jit.c b/ext/opcache/jit/zend_jit.c index a983a818a9..518ffc0bc1 100644 --- a/ext/opcache/jit/zend_jit.c +++ b/ext/opcache/jit/zend_jit.c @@ -124,14 +124,14 @@ static uint32_t zend_jit_trace_get_exit_point(const zend_op *to_opline, uint32_t static const void *zend_jit_trace_get_exit_addr(uint32_t n); static void zend_jit_trace_add_code(const void *start, uint32_t size); -static zend_bool dominates(const zend_basic_block *blocks, int a, int b) { +static bool dominates(const zend_basic_block *blocks, int a, int b) { while (blocks[b].level > blocks[a].level) { b = blocks[b].idom; } return a == b; } -static zend_bool zend_ssa_is_last_use(const zend_op_array *op_array, const zend_ssa *ssa, int var, int use) +static bool zend_ssa_is_last_use(const zend_op_array *op_array, const zend_ssa *ssa, int var, int use) { int next_use; @@ -165,7 +165,7 @@ static zend_bool zend_ssa_is_last_use(const zend_op_array *op_array, const zend_ return 0; } -static zend_bool zend_ival_is_last_use(const zend_lifetime_interval *ival, int use) +static bool zend_ival_is_last_use(const zend_lifetime_interval *ival, int use) { if (ival->flags & ZREG_LAST_USE) { const zend_life_range *range = &ival->range; @@ -178,7 +178,7 @@ static zend_bool zend_ival_is_last_use(const zend_lifetime_interval *ival, int u return 0; } -static zend_bool zend_is_commutative(zend_uchar opcode) +static bool zend_is_commutative(zend_uchar opcode) { return opcode == ZEND_ADD || @@ -188,7 +188,7 @@ static zend_bool zend_is_commutative(zend_uchar opcode) opcode == ZEND_BW_XOR; } -static zend_bool zend_long_is_power_of_two(zend_long x) +static bool zend_long_is_power_of_two(zend_long x) { return (x > 0) && !(x & (x - 1)); } @@ -1044,7 +1044,7 @@ static int zend_jit_compute_block_order(zend_ssa *ssa, int *block_order) return end - block_order; } -static zend_bool zend_jit_in_loop(zend_ssa *ssa, int header, zend_basic_block *b) +static bool zend_jit_in_loop(zend_ssa *ssa, int header, zend_basic_block *b) { while (b->loop_header >= 0) { if (b->loop_header == header) { @@ -1435,7 +1435,7 @@ static uint32_t zend_interval_end(zend_lifetime_interval *ival) return range->end; } -static zend_bool zend_interval_covers(zend_lifetime_interval *ival, uint32_t position) +static bool zend_interval_covers(zend_lifetime_interval *ival, uint32_t position) { zend_life_range *range = &ival->range; @@ -1997,7 +1997,7 @@ static zend_lifetime_interval** zend_jit_allocate_registers(const zend_op_array ((intervals[i]->flags & ZREG_LOAD) || ((intervals[i]->flags & ZREG_STORE) && ssa->vars[i].definition >= 0)) && ssa->vars[i].use_chain < 0) { - zend_bool may_remove = 1; + bool may_remove = 1; zend_ssa_phi *phi = ssa->vars[i].phi_use_chain; while (phi) { @@ -2020,7 +2020,7 @@ static zend_lifetime_interval** zend_jit_allocate_registers(const zend_op_array (intervals[i]->flags & ZREG_STORE) && (ssa->vars[i].use_chain < 0 || zend_ssa_next_use(ssa->ops, i, ssa->vars[i].use_chain) < 0)) { - zend_bool may_remove = 1; + bool may_remove = 1; zend_ssa_phi *phi = ssa->vars[i].phi_use_chain; while (phi) { @@ -2070,14 +2070,14 @@ static int zend_jit(const zend_op_array *op_array, zend_ssa *ssa, const zend_op int call_level = 0; void *checkpoint = NULL; zend_lifetime_interval **ra = NULL; - zend_bool is_terminated = 1; /* previous basic block is terminated by jump */ - zend_bool recv_emitted = 0; /* emitted at least one RECV opcode */ + bool is_terminated = 1; /* previous basic block is terminated by jump */ + bool recv_emitted = 0; /* emitted at least one RECV opcode */ zend_uchar smart_branch_opcode; uint32_t target_label, target_label2; uint32_t op1_info, op1_def_info, op2_info, res_info, res_use_info; zend_jit_addr op1_addr, op1_def_addr, op2_addr, op2_def_addr, res_addr; zend_class_entry *ce; - zend_bool ce_is_instanceof; + bool ce_is_instanceof; if (JIT_G(bisect_limit)) { jit_bisect_pos++; @@ -2932,7 +2932,7 @@ static int zend_jit(const zend_op_array *op_array, zend_ssa *ssa, const zend_op } } else { int j; - zend_bool left_frame = 0; + bool left_frame = 0; if (!zend_jit_return(&dasm_state, opline, op_array, op1_info, OP1_REG_ADDR())) { @@ -3629,7 +3629,7 @@ static void ZEND_FASTCALL zend_runtime_jit(void) /* JIT-ed code is going to be called by VM */ } -void zend_jit_check_funcs(HashTable *function_table, zend_bool is_method) { +void zend_jit_check_funcs(HashTable *function_table, bool is_method) { zend_op *opline; zend_function *func; zend_op_array *op_array; @@ -4200,7 +4200,7 @@ ZEND_EXT_API int zend_jit_check_support(void) return SUCCESS; } -ZEND_EXT_API int zend_jit_startup(void *buf, size_t size, zend_bool reattached) +ZEND_EXT_API int zend_jit_startup(void *buf, size_t size, bool reattached) { int ret; diff --git a/ext/opcache/jit/zend_jit.h b/ext/opcache/jit/zend_jit.h index fffac1edc2..0d71efa470 100644 --- a/ext/opcache/jit/zend_jit.h +++ b/ext/opcache/jit/zend_jit.h @@ -81,8 +81,8 @@ typedef struct _zend_jit_trace_stack_frame zend_jit_trace_stack_frame; typedef struct _sym_node zend_sym_node; typedef struct _zend_jit_globals { - zend_bool enabled; - zend_bool on; + bool enabled; + bool on; uint8_t trigger; uint8_t opt_level; uint32_t opt_flags; @@ -108,7 +108,7 @@ typedef struct _zend_jit_globals { zend_sym_node *symbols; /* symbols for disassembler */ - zend_bool tracing; + bool tracing; zend_jit_trace_rec *current_trace; zend_jit_trace_stack_frame *current_frame; @@ -137,7 +137,7 @@ ZEND_EXT_API void zend_jit_init(void); ZEND_EXT_API int zend_jit_config(zend_string *jit_options, int stage); ZEND_EXT_API int zend_jit_debug_config(zend_long old_val, zend_long new_val, int stage); ZEND_EXT_API int zend_jit_check_support(void); -ZEND_EXT_API int zend_jit_startup(void *jit_buffer, size_t size, zend_bool reattached); +ZEND_EXT_API int zend_jit_startup(void *jit_buffer, size_t size, bool reattached); ZEND_EXT_API void zend_jit_shutdown(void); ZEND_EXT_API void zend_jit_activate(void); ZEND_EXT_API void zend_jit_deactivate(void); diff --git a/ext/opcache/jit/zend_jit_helpers.c b/ext/opcache/jit/zend_jit_helpers.c index 02fedbdcad..696013f60f 100644 --- a/ext/opcache/jit/zend_jit_helpers.c +++ b/ext/opcache/jit/zend_jit_helpers.c @@ -1373,7 +1373,7 @@ check_indirect: return ref; } -static zend_always_inline zend_bool zend_jit_verify_type_common(zval *arg, zend_arg_info *arg_info, void **cache_slot) +static zend_always_inline bool zend_jit_verify_type_common(zval *arg, zend_arg_info *arg_info, void **cache_slot) { uint32_t type_mask; @@ -1431,12 +1431,12 @@ builtin_types: return 0; } -static zend_bool ZEND_FASTCALL zend_jit_verify_arg_slow(zval *arg, zend_arg_info *arg_info) +static bool ZEND_FASTCALL zend_jit_verify_arg_slow(zval *arg, zend_arg_info *arg_info) { zend_execute_data *execute_data = EG(current_execute_data); const zend_op *opline = EX(opline); void **cache_slot = CACHE_ADDR(opline->extended_value); - zend_bool ret; + bool ret; ret = zend_jit_verify_type_common(arg, arg_info, cache_slot); if (UNEXPECTED(!ret)) { @@ -1569,12 +1569,12 @@ static void ZEND_FASTCALL zend_jit_fetch_obj_is_dynamic(zend_object *zobj, intpt zend_jit_fetch_obj_is_slow(zobj); } -static zend_always_inline zend_bool promotes_to_array(zval *val) { +static zend_always_inline bool promotes_to_array(zval *val) { return Z_TYPE_P(val) <= IS_FALSE || (Z_ISREF_P(val) && Z_TYPE_P(Z_REFVAL_P(val)) <= IS_FALSE); } -static zend_always_inline zend_bool check_type_array_assignable(zend_type type) { +static zend_always_inline bool check_type_array_assignable(zend_type type) { if (!ZEND_TYPE_IS_SET(type)) { return 1; } @@ -1616,7 +1616,7 @@ static zend_never_inline ZEND_COLD void zend_throw_access_uninit_prop_by_ref_err zend_get_unmangled_property_name(prop->name)); } -static zend_never_inline zend_bool zend_handle_fetch_obj_flags( +static zend_never_inline bool zend_handle_fetch_obj_flags( zval *result, zval *ptr, zend_object *obj, zend_property_info *prop_info, uint32_t flags) { switch (flags) { @@ -1799,7 +1799,7 @@ static zend_property_info *zend_jit_get_prop_not_accepting_double(zend_reference return NULL; } -static ZEND_COLD void zend_jit_throw_incdec_ref_error(zend_reference *ref, zend_bool inc) +static ZEND_COLD void zend_jit_throw_incdec_ref_error(zend_reference *ref, bool inc) { zend_property_info *error_prop = zend_jit_get_prop_not_accepting_double(ref); /* Currently there should be no way for a typed reference to accept both int and double. diff --git a/ext/opcache/jit/zend_jit_internal.h b/ext/opcache/jit/zend_jit_internal.h index 917fa10f2e..906262773f 100644 --- a/ext/opcache/jit/zend_jit_internal.h +++ b/ext/opcache/jit/zend_jit_internal.h @@ -128,7 +128,7 @@ ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL zend_jit_func_counter_helper(ZEND_OPCODE_H ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL zend_jit_loop_counter_helper(ZEND_OPCODE_HANDLER_ARGS); void ZEND_FASTCALL zend_jit_copy_extra_args_helper(EXECUTE_DATA_D); -zend_bool ZEND_FASTCALL zend_jit_deprecated_helper(OPLINE_D); +bool ZEND_FASTCALL zend_jit_deprecated_helper(OPLINE_D); zend_constant* ZEND_FASTCALL zend_jit_get_constant(const zval *key, uint32_t flags); zend_constant* ZEND_FASTCALL zend_jit_check_constant(const zval *key); @@ -484,7 +484,7 @@ int ZEND_FASTCALL zend_jit_trace_hot_root(zend_execute_data *execute_data, const int ZEND_FASTCALL zend_jit_trace_exit(uint32_t exit_num, zend_jit_registers_buf *regs); zend_jit_trace_stop ZEND_FASTCALL zend_jit_trace_execute(zend_execute_data *execute_data, const zend_op *opline, zend_jit_trace_rec *trace_buffer, uint8_t start, uint32_t is_megamorphc); -static zend_always_inline const zend_op* zend_jit_trace_get_exit_opline(zend_jit_trace_rec *trace, const zend_op *opline, zend_bool *exit_if_true) +static zend_always_inline const zend_op* zend_jit_trace_get_exit_opline(zend_jit_trace_rec *trace, const zend_op *opline, bool *exit_if_true) { if (trace->op == ZEND_JIT_TRACE_VM || trace->op == ZEND_JIT_TRACE_END) { if (trace->opline == opline + 1) { @@ -505,7 +505,7 @@ static zend_always_inline const zend_op* zend_jit_trace_get_exit_opline(zend_jit return NULL; } -static zend_always_inline zend_bool zend_jit_may_be_polymorphic_call(const zend_op *opline) +static zend_always_inline bool zend_jit_may_be_polymorphic_call(const zend_op *opline) { if (opline->opcode == ZEND_INIT_FCALL || opline->opcode == ZEND_INIT_FCALL_BY_NAME diff --git a/ext/opcache/jit/zend_jit_trace.c b/ext/opcache/jit/zend_jit_trace.c index 69c4f79fa8..d0ca0e911d 100644 --- a/ext/opcache/jit/zend_jit_trace.c +++ b/ext/opcache/jit/zend_jit_trace.c @@ -2423,7 +2423,7 @@ static zend_lifetime_interval** zend_jit_trace_allocate_registers(zend_jit_trace if (p->op == ZEND_JIT_TRACE_VM) { const zend_op *opline = p->opline; int len; - zend_bool support_opline; + bool support_opline; support_opline = zend_jit_opline_supports_reg(op_array, ssa, opline, ssa_op, p); @@ -3085,7 +3085,7 @@ static void zend_jit_trace_setup_ret_counter(const zend_op *opline, size_t offse } } -static zend_bool zend_jit_may_delay_fetch_this(zend_ssa *ssa, const zend_op **ssa_opcodes, int var) +static bool zend_jit_may_delay_fetch_this(zend_ssa *ssa, const zend_op **ssa_opcodes, int var) { int i; int use = ssa->vars[var].use_chain; @@ -3176,11 +3176,11 @@ static int zend_jit_trace_deoptimization(dasm_State **Dst, zend_ssa *ssa, zend_jit_trace_stack *stack, zend_lifetime_interval **ra, - zend_bool polymorphic_side_trace) + bool polymorphic_side_trace) { int i; - zend_bool has_constants = 0; - zend_bool has_unsaved_vars = 0; + bool has_constants = 0; + bool has_unsaved_vars = 0; // TODO: Merge this loop with the following register LOAD loop to implement parallel move ??? for (i = 0; i < parent_vars_count; i++) { @@ -3317,7 +3317,7 @@ static void zend_jit_trace_set_var_range(zend_ssa_var_info *info, zend_long min, info->range.overflow = 0; } -static void zend_jit_trace_update_condition_ranges(const zend_op *opline, const zend_ssa_op *ssa_op, const zend_op_array *op_array, zend_ssa *ssa, zend_bool exit_if_true) +static void zend_jit_trace_update_condition_ranges(const zend_op *opline, const zend_ssa_op *ssa_op, const zend_op_array *op_array, zend_ssa *ssa, bool exit_if_true) { zend_long op1_min, op1_max, op2_min, op2_max; @@ -3435,7 +3435,7 @@ static void zend_jit_trace_update_condition_ranges(const zend_op *opline, const } } -static zend_bool zend_jit_may_skip_comparison(const zend_op *opline, const zend_ssa_op *ssa_op, const zend_ssa *ssa, const zend_op **ssa_opcodes) +static bool zend_jit_may_skip_comparison(const zend_op *opline, const zend_ssa_op *ssa_op, const zend_ssa *ssa, const zend_op **ssa_opcodes) { zend_uchar prev_opcode; @@ -3537,14 +3537,14 @@ static const void *zend_jit_trace(zend_jit_trace_rec *trace_buffer, uint32_t par zend_uchar smart_branch_opcode; const void *exit_addr; uint32_t op1_info, op1_def_info, op2_info, res_info, res_use_info, op1_data_info; - zend_bool send_result = 0; - zend_bool skip_comparison; + bool send_result = 0; + bool skip_comparison; zend_jit_addr op1_addr, op1_def_addr, op2_addr, op2_def_addr, res_addr; zend_class_entry *ce; - zend_bool ce_is_instanceof; - zend_bool delayed_fetch_this = 0; - zend_bool avoid_refcounting = 0; - zend_bool polymorphic_side_trace = + bool ce_is_instanceof; + bool delayed_fetch_this = 0; + bool avoid_refcounting = 0; + bool polymorphic_side_trace = parent_trace && (zend_jit_traces[parent_trace].exit_info[exit_num].flags & ZEND_JIT_EXIT_METHOD_CALL); uint32_t i; @@ -3817,7 +3817,7 @@ static const void *zend_jit_trace(zend_jit_trace_rec *trace_buffer, uint32_t par uint8_t op3_type = p->op3_type; uint8_t orig_op1_type = op1_type; uint8_t orig_op2_type = op2_type; - zend_bool op1_indirect; + bool op1_indirect; zend_class_entry *op1_ce = NULL; zend_class_entry *op2_ce = NULL; @@ -4773,7 +4773,7 @@ static const void *zend_jit_trace(zend_jit_trace_rec *trace_buffer, uint32_t par CHECK_OP1_TRACE_TYPE(); CHECK_OP2_TRACE_TYPE(); if ((opline->result_type & (IS_SMART_BRANCH_JMPZ|IS_SMART_BRANCH_JMPNZ)) != 0) { - zend_bool exit_if_true = 0; + bool exit_if_true = 0; const zend_op *exit_opline = zend_jit_trace_get_exit_opline(p + 1, opline + 1, &exit_if_true); uint32_t exit_point; @@ -4821,7 +4821,7 @@ static const void *zend_jit_trace(zend_jit_trace_rec *trace_buffer, uint32_t par CHECK_OP1_TRACE_TYPE(); CHECK_OP2_TRACE_TYPE(); if ((opline->result_type & (IS_SMART_BRANCH_JMPZ|IS_SMART_BRANCH_JMPNZ)) != 0) { - zend_bool exit_if_true = 0; + bool exit_if_true = 0; const zend_op *exit_opline = zend_jit_trace_get_exit_opline(p + 1, opline + 1, &exit_if_true); uint32_t exit_point; @@ -4861,7 +4861,7 @@ static const void *zend_jit_trace(zend_jit_trace_rec *trace_buffer, uint32_t par goto done; case ZEND_DEFINED: if ((opline->result_type & (IS_SMART_BRANCH_JMPZ|IS_SMART_BRANCH_JMPNZ)) != 0) { - zend_bool exit_if_true = 0; + bool exit_if_true = 0; const zend_op *exit_opline = zend_jit_trace_get_exit_opline(p + 1, opline + 1, &exit_if_true); uint32_t exit_point = zend_jit_trace_get_exit_point(exit_opline, 0); @@ -4885,7 +4885,7 @@ static const void *zend_jit_trace(zend_jit_trace_rec *trace_buffer, uint32_t par } op1_info = OP1_INFO(); if ((opline->result_type & (IS_SMART_BRANCH_JMPZ|IS_SMART_BRANCH_JMPNZ)) != 0) { - zend_bool exit_if_true = 0; + bool exit_if_true = 0; const zend_op *exit_opline = zend_jit_trace_get_exit_opline(p + 1, opline + 1, &exit_if_true); uint32_t exit_point; @@ -4925,7 +4925,7 @@ static const void *zend_jit_trace(zend_jit_trace_rec *trace_buffer, uint32_t par } else { int j; int may_throw = 0; - zend_bool left_frame = 0; + bool left_frame = 0; if (!zend_jit_return(&dasm_state, opline, op_array, op1_info, OP1_REG_ADDR())) { @@ -5081,7 +5081,7 @@ static const void *zend_jit_trace(zend_jit_trace_rec *trace_buffer, uint32_t par CHECK_OP1_TRACE_TYPE(); } if ((opline->result_type & (IS_SMART_BRANCH_JMPZ|IS_SMART_BRANCH_JMPNZ)) != 0) { - zend_bool exit_if_true = 0; + bool exit_if_true = 0; const zend_op *exit_opline = zend_jit_trace_get_exit_opline(p + 1, opline + 1, &exit_if_true); uint32_t exit_point = zend_jit_trace_get_exit_point(exit_opline, 0); @@ -5111,7 +5111,7 @@ static const void *zend_jit_trace(zend_jit_trace_rec *trace_buffer, uint32_t par break; } if ((opline->result_type & (IS_SMART_BRANCH_JMPZ|IS_SMART_BRANCH_JMPNZ)) != 0) { - zend_bool exit_if_true = 0; + bool exit_if_true = 0; const zend_op *exit_opline = zend_jit_trace_get_exit_opline(p + 1, opline + 1, &exit_if_true); uint32_t exit_point = zend_jit_trace_get_exit_point(exit_opline, 0); @@ -5274,7 +5274,7 @@ static const void *zend_jit_trace(zend_jit_trace_rec *trace_buffer, uint32_t par op2_info = OP2_INFO(); CHECK_OP2_TRACE_TYPE(); if ((opline->result_type & (IS_SMART_BRANCH_JMPZ|IS_SMART_BRANCH_JMPNZ)) != 0) { - zend_bool exit_if_true = 0; + bool exit_if_true = 0; const zend_op *exit_opline = zend_jit_trace_get_exit_opline(p + 1, opline + 1, &exit_if_true); uint32_t exit_point; @@ -6408,7 +6408,7 @@ static const void *zend_jit_trace_exit_to_vm(uint32_t trace_num, uint32_t exit_n const zend_op *opline; uint32_t stack_size; zend_jit_trace_stack *stack; - zend_bool original_handler = 0; + bool original_handler = 0; if (!zend_jit_trace_exit_needs_deoptimization(trace_num, exit_num)) { return dasm_labels[zend_lbtrace_escape]; @@ -6589,7 +6589,7 @@ static void zend_jit_blacklist_root_trace(const zend_op *opline, size_t offset) zend_shared_alloc_unlock(); } -static zend_bool zend_jit_trace_is_bad_root(const zend_op *opline, zend_jit_trace_stop stop, size_t offset) +static bool zend_jit_trace_is_bad_root(const zend_op *opline, zend_jit_trace_stop stop, size_t offset) { const zend_op **cache_opline = JIT_G(bad_root_cache_opline); uint8_t *cache_count = JIT_G(bad_root_cache_count); @@ -7054,7 +7054,7 @@ static void zend_jit_blacklist_trace_exit(uint32_t trace_num, uint32_t exit_num) zend_shared_alloc_unlock(); } -static zend_bool zend_jit_trace_exit_is_bad(uint32_t trace_num, uint32_t exit_num) +static bool zend_jit_trace_exit_is_bad(uint32_t trace_num, uint32_t exit_num) { uint8_t *counter = JIT_G(exit_counters) + zend_jit_traces[trace_num].exit_counters + exit_num; @@ -7066,7 +7066,7 @@ static zend_bool zend_jit_trace_exit_is_bad(uint32_t trace_num, uint32_t exit_nu return 0; } -static zend_bool zend_jit_trace_exit_is_hot(uint32_t trace_num, uint32_t exit_num) +static bool zend_jit_trace_exit_is_hot(uint32_t trace_num, uint32_t exit_num) { uint8_t *counter = JIT_G(exit_counters) + zend_jit_traces[trace_num].exit_counters + exit_num; diff --git a/ext/opcache/jit/zend_jit_vm_helpers.c b/ext/opcache/jit/zend_jit_vm_helpers.c index d919b59c9e..9a7b205340 100644 --- a/ext/opcache/jit/zend_jit_vm_helpers.c +++ b/ext/opcache/jit/zend_jit_vm_helpers.c @@ -161,7 +161,7 @@ void ZEND_FASTCALL zend_jit_copy_extra_args_helper(EXECUTE_DATA_D) } } -zend_bool ZEND_FASTCALL zend_jit_deprecated_helper(OPLINE_D) +bool ZEND_FASTCALL zend_jit_deprecated_helper(OPLINE_D) { zend_execute_data *call = (zend_execute_data *) opline; zend_function *fbc = call->func; diff --git a/ext/opcache/jit/zend_jit_x86.dasc b/ext/opcache/jit/zend_jit_x86.dasc index 0d1b1e40e6..6b41366ac5 100644 --- a/ext/opcache/jit/zend_jit_x86.dasc +++ b/ext/opcache/jit/zend_jit_x86.dasc @@ -1628,12 +1628,12 @@ static void* dasm_labels[zend_lb_MAX]; || } |.endmacro -static zend_bool reuse_ip = 0; -static zend_bool delayed_call_chain = 0; +static bool reuse_ip = 0; +static bool delayed_call_chain = 0; static uint32_t delayed_call_level = 0; static const zend_op *last_valid_opline = NULL; -static zend_bool use_last_vald_opline = 0; -static zend_bool track_last_valid_opline = 0; +static bool use_last_vald_opline = 0; +static bool track_last_valid_opline = 0; static int jit_return_label = -1; static uint32_t current_trace_num = 0; static uint32_t allowed_opt_flags = 0; @@ -1652,7 +1652,7 @@ static void zend_jit_use_last_valid_opline(void) } } -static zend_bool zend_jit_trace_uses_initial_ip(void) +static bool zend_jit_trace_uses_initial_ip(void) { return use_last_vald_opline; } @@ -1716,12 +1716,12 @@ static uint32_t floor_log2(uint32_t x) return ones32(x) - 1; } -static zend_bool is_power_of_two(uint32_t x) +static bool is_power_of_two(uint32_t x) { return !(x & (x - 1)) && x != 0; } -static zend_bool has_concrete_type(uint32_t value_type) +static bool has_concrete_type(uint32_t value_type) { return is_power_of_two (value_type & (MAY_BE_ANY|MAY_BE_UNDEF)); } @@ -1731,7 +1731,7 @@ static uint32_t concrete_type(uint32_t value_type) return floor_log2(value_type & (MAY_BE_ANY|MAY_BE_UNDEF)); } -static inline zend_bool is_signed(double d) +static inline bool is_signed(double d) { return (((unsigned char*)&d)[sizeof(double)-1] & 0x80) != 0; } @@ -2651,7 +2651,7 @@ static int zend_jit_assign_to_variable(dasm_State **Dst, zend_jit_addr val_addr, uint32_t val_info, zend_jit_addr res_addr, - zend_bool check_exception); + bool check_exception); static int zend_jit_assign_const_stub(dasm_State **Dst) { @@ -3397,7 +3397,7 @@ static int zend_jit_trace_link_to_root(dasm_State **Dst, zend_jit_trace_info *t, return 1; } -static int zend_jit_trace_return(dasm_State **Dst, zend_bool original_handler) +static int zend_jit_trace_return(dasm_State **Dst, bool original_handler) { #if 0 | jmp ->trace_escape @@ -3549,7 +3549,7 @@ static int zend_jit_trace_handler(dasm_State **Dst, const zend_op_array *op_arra zend_jit_trace_stack *stack = JIT_G(current_frame)->stack; if (zend_is_smart_branch(opline)) { - zend_bool exit_if_true = 0; + bool exit_if_true = 0; exit_opline = zend_jit_trace_get_exit_opline(trace, opline + 1, &exit_if_true); } else { switch (opline->opcode) { @@ -3756,7 +3756,7 @@ static int zend_jit_call(dasm_State **Dst, const zend_op *opline, unsigned int n #endif } -static int zend_jit_spill_store(dasm_State **Dst, zend_jit_addr src, zend_jit_addr dst, uint32_t info, zend_bool set_type) +static int zend_jit_spill_store(dasm_State **Dst, zend_jit_addr src, zend_jit_addr dst, uint32_t info, bool set_type) { ZEND_ASSERT(Z_MODE(src) == IS_REG); ZEND_ASSERT(Z_MODE(dst) == IS_MEM_ZVAL); @@ -3792,7 +3792,7 @@ static int zend_jit_load_reg(dasm_State **Dst, zend_jit_addr src, zend_jit_addr return 1; } -static int zend_jit_store_var(dasm_State **Dst, uint32_t info, int var, zend_reg reg, zend_bool set_type) +static int zend_jit_store_var(dasm_State **Dst, uint32_t info, int var, zend_reg reg, bool set_type) { zend_jit_addr src = ZEND_ADDR_REG(reg); zend_jit_addr dst = ZEND_ADDR_MEM_ZVAL(ZREG_FP, EX_NUM_TO_VAR(var)); @@ -3813,7 +3813,7 @@ static int zend_jit_store_var_if_necessary_ex(dasm_State **Dst, int var, zend_ji { if (Z_MODE(src) == IS_REG && Z_STORE(src)) { zend_jit_addr dst = ZEND_ADDR_MEM_ZVAL(ZREG_FP, var); - zend_bool set_type = 1; + bool set_type = 1; if ((info & (MAY_BE_ANY|MAY_BE_REF|MAY_BE_UNDEF)) == (old_info & (MAY_BE_ANY|MAY_BE_REF|MAY_BE_UNDEF))) { @@ -4210,7 +4210,7 @@ static int zend_jit_math_long_long(dasm_State **Dst, uint32_t res_use_info, int may_overflow) { - zend_bool same_ops = zend_jit_same_addr(op1_addr, op2_addr); + bool same_ops = zend_jit_same_addr(op1_addr, op2_addr); zend_reg result_reg; zend_reg tmp_reg = ZREG_R0; @@ -4520,7 +4520,7 @@ static int zend_jit_math_double_double(dasm_State **Dst, zend_jit_addr res_addr, uint32_t res_use_info) { - zend_bool same_ops = zend_jit_same_addr(op1_addr, op2_addr); + bool same_ops = zend_jit_same_addr(op1_addr, op2_addr); zend_reg result_reg; if (Z_MODE(res_addr) == IS_REG) { @@ -4611,7 +4611,7 @@ static int zend_jit_math_helper(dasm_State **Dst, int may_throw) /* Labels: 1,2,3,4,5,6 */ { - zend_bool same_ops = zend_jit_same_addr(op1_addr, op2_addr); + bool same_ops = zend_jit_same_addr(op1_addr, op2_addr); if ((op1_info & MAY_BE_LONG) && (op2_info & MAY_BE_LONG)) { if (op1_info & (MAY_BE_ANY-MAY_BE_LONG)) { @@ -4864,7 +4864,7 @@ static int zend_jit_long_math_helper(dasm_State **Dst, int may_throw) /* Labels: 6 */ { - zend_bool same_ops = zend_jit_same_addr(op1_addr, op2_addr); + bool same_ops = zend_jit_same_addr(op1_addr, op2_addr); zend_reg result_reg; zval tmp; @@ -5283,8 +5283,8 @@ static int zend_jit_fetch_dimension_address_inner(dasm_State **Dst, const zend_o } if (op2_info & MAY_BE_LONG) { - zend_bool op2_loaded = 0; - zend_bool packed_loaded = 0; + bool op2_loaded = 0; + bool packed_loaded = 0; if (op2_info & ((MAY_BE_ANY|MAY_BE_UNDEF) - MAY_BE_LONG)) { | // if (EXPECTED(Z_TYPE_P(dim) == IS_LONG)) @@ -5885,7 +5885,7 @@ static int zend_jit_assign_to_typed_ref(dasm_State **Dst, const zend_op *opline, zend_uchar val_type, zend_jit_addr val_addr, - zend_bool check_exception) + bool check_exception) { | // if (UNEXPECTED(ZEND_REF_HAS_TYPE_SOURCES(Z_REF_P(variable_ptr)))) { | cmp aword [FCARG1a + offsetof(zend_reference, sources.ptr)], 0 @@ -5932,7 +5932,7 @@ static int zend_jit_assign_to_variable_call(dasm_State **Dst, zend_jit_addr val_addr, uint32_t val_info, zend_jit_addr __res_addr, - zend_bool __check_exception) + bool __check_exception) { if (Z_MODE(var_addr) != IS_MEM_ZVAL || Z_REG(var_addr) != ZREG_FCARG1a || Z_OFFSET(var_addr) != 0) { | LOAD_ZVAL_ADDR FCARG1a, var_addr @@ -5978,7 +5978,7 @@ static int zend_jit_assign_to_variable(dasm_State **Dst, zend_jit_addr val_addr, uint32_t val_info, zend_jit_addr res_addr, - zend_bool check_exception) + bool check_exception) /* Labels: 1,2,3,4,5,8 */ { int done = 0; @@ -6019,7 +6019,7 @@ static int zend_jit_assign_to_variable(dasm_State **Dst, in_cold = 1; } if (Z_REG(var_use_addr) == ZREG_FCARG1a || Z_REG(var_use_addr) == ZREG_R0) { - zend_bool keep_gc = 0; + bool keep_gc = 0; | GET_ZVAL_PTR Ra(tmp_reg), var_use_addr if (tmp_reg == ZREG_FCARG1a) { @@ -6642,7 +6642,7 @@ static int zend_jit_is_constant_cmp_long_long(const zend_op *opline, zend_jit_addr op1_addr, zend_ssa_range *op2_range, zend_jit_addr op2_addr, - zend_bool *result) + bool *result) { zend_long op1_min; zend_long op1_max; @@ -6727,10 +6727,10 @@ static int zend_jit_cmp_long_long(dasm_State **Dst, uint32_t target_label, uint32_t target_label2, const void *exit_addr, - zend_bool skip_comparison) + bool skip_comparison) { - zend_bool swap = 0; - zend_bool result; + bool swap = 0; + bool result; if (zend_jit_is_constant_cmp_long_long(opline, op1_range, op1_addr, op2_range, op2_addr, &result)) { if (!smart_branch_opcode || @@ -7021,7 +7021,7 @@ static int zend_jit_cmp_long_long(dasm_State **Dst, return 1; } -static int zend_jit_cmp_double_common(dasm_State **Dst, const zend_op *opline, zend_jit_addr res_addr, zend_bool swap, zend_uchar smart_branch_opcode, uint32_t target_label, uint32_t target_label2, const void *exit_addr) +static int zend_jit_cmp_double_common(dasm_State **Dst, const zend_op *opline, zend_jit_addr res_addr, bool swap, zend_uchar smart_branch_opcode, uint32_t target_label, uint32_t target_label2, const void *exit_addr) { if (smart_branch_opcode) { if (smart_branch_opcode == ZEND_JMPZ) { @@ -7380,7 +7380,7 @@ static int zend_jit_cmp_double_long(dasm_State **Dst, const zend_op *opline, zen static int zend_jit_cmp_double_double(dasm_State **Dst, const zend_op *opline, zend_jit_addr op1_addr, zend_jit_addr op2_addr, zend_jit_addr res_addr, zend_uchar smart_branch_opcode, uint32_t target_label, uint32_t target_label2, const void *exit_addr) { - zend_bool swap = 0; + bool swap = 0; if (Z_MODE(op1_addr) == IS_REG) { | SSE_AVX_OP ucomisd, vucomisd, Z_REG(op1_addr), op2_addr @@ -7556,10 +7556,10 @@ static int zend_jit_cmp(dasm_State **Dst, uint32_t target_label, uint32_t target_label2, const void *exit_addr, - zend_bool skip_comparison) + bool skip_comparison) { - zend_bool same_ops = (opline->op1_type == opline->op2_type) && (opline->op1.var == opline->op2.var); - zend_bool has_slow; + bool same_ops = (opline->op1_type == opline->op2_type) && (opline->op1.var == opline->op2.var); + bool has_slow; has_slow = (op1_info & (MAY_BE_LONG|MAY_BE_DOUBLE)) && @@ -7795,7 +7795,7 @@ static int zend_jit_identical(dasm_State **Dst, uint32_t target_label, uint32_t target_label2, const void *exit_addr, - zend_bool skip_comparison) + bool skip_comparison) { uint32_t identical_label = (uint32_t)-1; uint32_t not_identical_label = (uint32_t)-1; @@ -8171,10 +8171,10 @@ static int zend_jit_bool_jmpznz(dasm_State **Dst, const zend_op *opline, uint32_ { uint32_t true_label = -1; uint32_t false_label = -1; - zend_bool set_bool = 0; - zend_bool set_bool_not = 0; - zend_bool set_delayed = 0; - zend_bool jmp_done = 0; + bool set_bool = 0; + bool set_bool_not = 0; + bool set_delayed = 0; + bool jmp_done = 0; if (branch_opcode == ZEND_BOOL) { set_bool = 1; @@ -8715,7 +8715,7 @@ static int zend_jit_stack_check(dasm_State **Dst, const zend_op *opline, uint32_ return 1; } -static int zend_jit_push_call_frame(dasm_State **Dst, const zend_op *opline, const zend_op_array *op_array, zend_function *func, zend_bool is_closure, zend_bool use_this, zend_bool stack_check) +static int zend_jit_push_call_frame(dasm_State **Dst, const zend_op *opline, const zend_op_array *op_array, zend_function *func, bool is_closure, bool use_this, bool stack_check) { uint32_t used_stack; @@ -9153,7 +9153,7 @@ static int zend_jit_init_fcall_guard(dasm_State **Dst, uint32_t level, const zen return 1; } -static int zend_jit_init_fcall(dasm_State **Dst, const zend_op *opline, uint32_t b, const zend_op_array *op_array, zend_ssa *ssa, const zend_ssa_op *ssa_op, int call_level, zend_jit_trace_rec *trace, zend_bool stack_check) +static int zend_jit_init_fcall(dasm_State **Dst, const zend_op *opline, uint32_t b, const zend_op_array *op_array, zend_ssa *ssa, const zend_ssa_op *ssa_op, int call_level, zend_jit_trace_rec *trace, bool stack_check) { zend_func_info *info = ZEND_FUNC_INFO(op_array); zend_call_info *call_info = NULL; @@ -9315,12 +9315,12 @@ static int zend_jit_init_method_call(dasm_State **Dst, uint32_t op1_info, zend_jit_addr op1_addr, zend_class_entry *ce, - zend_bool ce_is_instanceof, - zend_bool use_this, + bool ce_is_instanceof, + bool use_this, zend_class_entry *trace_ce, zend_jit_trace_rec *trace, - zend_bool stack_check, - zend_bool polymorphic_side_trace) + bool stack_check, + bool polymorphic_side_trace) { zend_func_info *info = ZEND_FUNC_INFO(op_array); zend_call_info *call_info = NULL; @@ -9564,7 +9564,7 @@ static int zend_jit_init_closure_call(dasm_State **Dst, const zend_ssa_op *ssa_op, int call_level, zend_jit_trace_rec *trace, - zend_bool stack_check) + bool stack_check) { zend_function *func = NULL; zend_jit_addr op2_addr = ZEND_ADDR_MEM_ZVAL(ZREG_FP, opline->op2.var); @@ -9690,7 +9690,7 @@ static int zend_jit_do_fcall(dasm_State **Dst, const zend_op *opline, const zend uint32_t i; zend_jit_addr res_addr; uint32_t call_num_args = 0; - zend_bool unknown_num_args = 0; + bool unknown_num_args = 0; const void *exit_addr = NULL; const zend_op *prev_opline; @@ -10220,7 +10220,7 @@ static int zend_jit_do_fcall(dasm_State **Dst, const zend_op *opline, const zend if (!RETURN_VALUE_USED(opline)) { zend_class_entry *ce; - zend_bool ce_is_instanceof; + bool ce_is_instanceof; uint32_t func_info = call_info ? zend_get_func_info(call_info, ssa, &ce, &ce_is_instanceof) : (MAY_BE_ANY|MAY_BE_REF|MAY_BE_RC1|MAY_BE_RCN); @@ -11166,17 +11166,17 @@ static int zend_jit_leave_func(dasm_State **Dst, const zend_op_array *op_array, const zend_op *opline, uint32_t op1_info, - zend_bool left_frame, + bool left_frame, zend_jit_trace_rec *trace, zend_jit_trace_info *trace_info, int indirect_var_access, int may_throw) { - zend_bool may_be_top_frame = + bool may_be_top_frame = JIT_G(trigger) != ZEND_JIT_ON_HOT_TRACE || !JIT_G(current_frame) || !TRACE_FRAME_IS_NESTED(JIT_G(current_frame)); - zend_bool may_need_call_helper = + bool may_need_call_helper = indirect_var_access || /* may have symbol table */ !op_array->function_name || /* may have symbol table */ may_be_top_frame || @@ -11185,7 +11185,7 @@ static int zend_jit_leave_func(dasm_State **Dst, !JIT_G(current_frame) || TRACE_FRAME_NUM_ARGS(JIT_G(current_frame)) == -1 || /* unknown number of args */ (uint32_t)TRACE_FRAME_NUM_ARGS(JIT_G(current_frame)) > op_array->num_args; /* extra args */ - zend_bool may_need_release_this = + bool may_need_release_this = !(op_array->fn_flags & ZEND_ACC_CLOSURE) && op_array->scope && !(op_array->fn_flags & ZEND_ACC_STATIC) && @@ -11596,7 +11596,7 @@ static int zend_jit_zval_copy_deref(dasm_State **Dst, zend_jit_addr res_addr, ze return 1; } -static zend_bool zend_jit_may_avoid_refcounting(const zend_op *opline) +static bool zend_jit_may_avoid_refcounting(const zend_op *opline) { switch (opline->opcode) { case ZEND_FETCH_OBJ_FUNC_ARG: @@ -11639,7 +11639,7 @@ static int zend_jit_fetch_dim_read(dasm_State **Dst, const zend_ssa_op *ssa_op, uint32_t op1_info, zend_jit_addr op1_addr, - zend_bool op1_avoid_refcounting, + bool op1_avoid_refcounting, uint32_t op2_info, uint32_t res_info, zend_jit_addr res_addr, @@ -11649,7 +11649,7 @@ static int zend_jit_fetch_dim_read(dasm_State **Dst, const void *exit_addr = NULL; const void *not_found_exit_addr = NULL; const void *res_exit_addr = NULL; - zend_bool result_avoid_refcounting = 0; + bool result_avoid_refcounting = 0; uint32_t may_be_string = (opline->opcode != ZEND_FETCH_LIST_R) ? MAY_BE_STRING : 0; orig_op1_addr = OP1_ADDR(); @@ -12150,7 +12150,7 @@ static int zend_jit_isset_isempty_dim(dasm_State **Dst, const zend_op *opline, uint32_t op1_info, zend_jit_addr op1_addr, - zend_bool op1_avoid_refcounting, + bool op1_avoid_refcounting, uint32_t op2_info, int may_throw, zend_uchar smart_branch_opcode, @@ -12408,10 +12408,10 @@ static int zend_jit_bind_global(dasm_State **Dst, const zend_op *opline, uint32_ return 1; } -static int zend_jit_verify_arg_type(dasm_State **Dst, const zend_op *opline, zend_arg_info *arg_info, zend_bool check_exception) +static int zend_jit_verify_arg_type(dasm_State **Dst, const zend_op *opline, zend_arg_info *arg_info, bool check_exception) { zend_jit_addr res_addr = ZEND_ADDR_MEM_ZVAL(ZREG_FP, opline->result.var); - zend_bool in_cold = 0; + bool in_cold = 0; uint32_t type_mask = ZEND_TYPE_PURE_MASK(arg_info->type) & MAY_BE_ANY; zend_reg tmp_reg = (type_mask == 0 || is_power_of_two(type_mask)) ? ZREG_FCARG1a : ZREG_R0; @@ -12532,7 +12532,7 @@ static int zend_jit_recv(dasm_State **Dst, const zend_op *opline, const zend_op_ return 1; } -static int zend_jit_recv_init(dasm_State **Dst, const zend_op *opline, const zend_op_array *op_array, zend_bool is_last, int may_throw) +static int zend_jit_recv_init(dasm_State **Dst, const zend_op *opline, const zend_op_array *op_array, bool is_last, int may_throw) { uint32_t arg_num = opline->op1.num; zval *zv = RT_CONSTANT(opline, opline->op2); @@ -12608,7 +12608,7 @@ static int zend_jit_recv_init(dasm_State **Dst, const zend_op *opline, const zen return 1; } -static zend_property_info* zend_get_known_property_info(zend_class_entry *ce, zend_string *member, zend_bool on_this, zend_string *filename) +static zend_property_info* zend_get_known_property_info(zend_class_entry *ce, zend_string *member, bool on_this, zend_string *filename) { zend_property_info *info = NULL; @@ -12657,7 +12657,7 @@ static zend_property_info* zend_get_known_property_info(zend_class_entry *ce, ze return info; } -static zend_bool zend_may_be_dynamic_property(zend_class_entry *ce, zend_string *member, zend_bool on_this, zend_string *filename) +static bool zend_may_be_dynamic_property(zend_class_entry *ce, zend_string *member, bool on_this, zend_string *filename) { zend_property_info *info; @@ -12718,17 +12718,17 @@ static int zend_jit_fetch_obj(dasm_State **Dst, const zend_ssa_op *ssa_op, uint32_t op1_info, zend_jit_addr op1_addr, - zend_bool op1_indirect, + bool op1_indirect, zend_class_entry *ce, - zend_bool ce_is_instanceof, - zend_bool use_this, - zend_bool op1_avoid_refcounting, + bool ce_is_instanceof, + bool use_this, + bool op1_avoid_refcounting, zend_class_entry *trace_ce, int may_throw) { zval *member; zend_property_info *prop_info; - zend_bool may_be_dynamic = 1; + bool may_be_dynamic = 1; zend_jit_addr res_addr = ZEND_ADDR_MEM_ZVAL(ZREG_FP, opline->result.var); zend_jit_addr this_addr = ZEND_ADDR_MEM_ZVAL(ZREG_FP, offsetof(zend_execute_data, This)); zend_jit_addr prop_addr; @@ -12929,7 +12929,7 @@ static int zend_jit_fetch_obj(dasm_State **Dst, ssa->var_info[ssa_op->result_def].indirect_reference = 1; } } else { - zend_bool result_avoid_refcounting = 0; + bool result_avoid_refcounting = 0; if ((res_info & MAY_BE_GUARD) && JIT_G(current_frame) && prop_info) { uint32_t flags = 0; @@ -13109,10 +13109,10 @@ static int zend_jit_incdec_obj(dasm_State **Dst, const zend_ssa_op *ssa_op, uint32_t op1_info, zend_jit_addr op1_addr, - zend_bool op1_indirect, + bool op1_indirect, zend_class_entry *ce, - zend_bool ce_is_instanceof, - zend_bool use_this, + bool ce_is_instanceof, + bool use_this, zend_class_entry *trace_ce, int may_throw) { @@ -13122,7 +13122,7 @@ static int zend_jit_incdec_obj(dasm_State **Dst, zend_jit_addr this_addr = ZEND_ADDR_MEM_ZVAL(ZREG_FP, offsetof(zend_execute_data, This)); zend_jit_addr res_addr = 0; zend_jit_addr prop_addr; - zend_bool needs_slow_path = 0; + bool needs_slow_path = 0; ZEND_ASSERT(opline->op2_type == IS_CONST); ZEND_ASSERT(op1_info & MAY_BE_OBJECT); @@ -13485,10 +13485,10 @@ static int zend_jit_assign_obj_op(dasm_State **Dst, zend_jit_addr op1_addr, uint32_t val_info, zend_ssa_range *val_range, - zend_bool op1_indirect, + bool op1_indirect, zend_class_entry *ce, - zend_bool ce_is_instanceof, - zend_bool use_this, + bool ce_is_instanceof, + bool use_this, zend_class_entry *trace_ce, int may_throw) { @@ -13498,7 +13498,7 @@ static int zend_jit_assign_obj_op(dasm_State **Dst, zend_jit_addr val_addr = OP1_DATA_ADDR(); zend_jit_addr this_addr = ZEND_ADDR_MEM_ZVAL(ZREG_FP, offsetof(zend_execute_data, This)); zend_jit_addr prop_addr; - zend_bool needs_slow_path = 0; + bool needs_slow_path = 0; binary_op_type binary_op = get_binary_op(opline->extended_value); ZEND_ASSERT(opline->op2_type == IS_CONST); @@ -13815,10 +13815,10 @@ static int zend_jit_assign_obj(dasm_State **Dst, uint32_t op1_info, zend_jit_addr op1_addr, uint32_t val_info, - zend_bool op1_indirect, + bool op1_indirect, zend_class_entry *ce, - zend_bool ce_is_instanceof, - zend_bool use_this, + bool ce_is_instanceof, + bool use_this, zend_class_entry *trace_ce, int may_throw) { @@ -13829,7 +13829,7 @@ static int zend_jit_assign_obj(dasm_State **Dst, zend_jit_addr res_addr = 0; zend_jit_addr this_addr = ZEND_ADDR_MEM_ZVAL(ZREG_FP, offsetof(zend_execute_data, This)); zend_jit_addr prop_addr; - zend_bool needs_slow_path = 0; + bool needs_slow_path = 0; if (RETURN_VALUE_USED(opline)) { res_addr = ZEND_ADDR_MEM_ZVAL(ZREG_FP, opline->result.var); @@ -14246,7 +14246,7 @@ static int zend_jit_load_this(dasm_State **Dst, uint32_t var) return 1; } -static int zend_jit_fetch_this(dasm_State **Dst, const zend_op *opline, const zend_op_array *op_array, zend_bool check_only) +static int zend_jit_fetch_this(dasm_State **Dst, const zend_op *opline, const zend_op_array *op_array, bool check_only) { if (!op_array->scope || (op_array->fn_flags & ZEND_ACC_STATIC)) { if (JIT_G(trigger) == ZEND_JIT_ON_HOT_TRACE) { @@ -14654,13 +14654,13 @@ static int zend_jit_switch(dasm_State **Dst, const zend_op *opline, const zend_o return 1; } -static zend_bool zend_jit_verify_return_type(dasm_State **Dst, const zend_op *opline, const zend_op_array *op_array, uint32_t op1_info) +static bool zend_jit_verify_return_type(dasm_State **Dst, const zend_op *opline, const zend_op_array *op_array, uint32_t op1_info) { zend_arg_info *arg_info = &op_array->arg_info[-1]; ZEND_ASSERT(ZEND_TYPE_IS_SET(arg_info->type)); zend_jit_addr op1_addr = OP1_ADDR(); - zend_bool needs_slow_check = 1; - zend_bool slow_check_in_cold = 1; + bool needs_slow_check = 1; + bool slow_check_in_cold = 1; uint32_t type_mask = ZEND_TYPE_PURE_MASK(arg_info->type) & MAY_BE_ANY; if (type_mask == 0) { @@ -15055,7 +15055,7 @@ static int zend_jit_in_array(dasm_State **Dst, const zend_op *opline, uint32_t o return 1; } -static zend_bool zend_jit_noref_guard(dasm_State **Dst, const zend_op *opline, zend_jit_addr var_addr) +static bool zend_jit_noref_guard(dasm_State **Dst, const zend_op *opline, zend_jit_addr var_addr) { int32_t exit_point = zend_jit_trace_get_exit_point(opline, 0); const void *exit_addr = zend_jit_trace_get_exit_addr(exit_point); @@ -15068,7 +15068,7 @@ static zend_bool zend_jit_noref_guard(dasm_State **Dst, const zend_op *opline, z return 1; } -static zend_bool zend_jit_fetch_reference(dasm_State **Dst, const zend_op *opline, uint8_t var_type, uint32_t *var_info_ptr, zend_jit_addr *var_addr_ptr, zend_bool add_ref_guard, zend_bool add_type_guard) +static bool zend_jit_fetch_reference(dasm_State **Dst, const zend_op *opline, uint8_t var_type, uint32_t *var_info_ptr, zend_jit_addr *var_addr_ptr, bool add_ref_guard, bool add_type_guard) { zend_jit_addr var_addr = *var_addr_ptr; uint32_t var_info = *var_info_ptr; @@ -15124,7 +15124,7 @@ static zend_bool zend_jit_fetch_reference(dasm_State **Dst, const zend_op *oplin return 1; } -static zend_bool zend_jit_fetch_indirect_var(dasm_State **Dst, const zend_op *opline, uint8_t var_type, uint32_t *var_info_ptr, zend_jit_addr *var_addr_ptr, zend_bool add_indirect_guard) +static bool zend_jit_fetch_indirect_var(dasm_State **Dst, const zend_op *opline, uint8_t var_type, uint32_t *var_info_ptr, zend_jit_addr *var_addr_ptr, bool add_indirect_guard) { zend_jit_addr var_addr = *var_addr_ptr; uint32_t var_info = *var_info_ptr; @@ -15187,7 +15187,7 @@ static zend_bool zend_jit_fetch_indirect_var(dasm_State **Dst, const zend_op *op return 1; } -static zend_bool zend_jit_may_reuse_reg(const zend_op *opline, const zend_ssa_op *ssa_op, zend_ssa *ssa, int def_var, int use_var) +static bool zend_jit_may_reuse_reg(const zend_op *opline, const zend_ssa_op *ssa_op, zend_ssa *ssa, int def_var, int use_var) { if ((ssa->var_info[def_var].type & ~MAY_BE_GUARD) != (ssa->var_info[use_var].type & ~MAY_BE_GUARD)) { return 0; @@ -15219,7 +15219,7 @@ static zend_bool zend_jit_may_reuse_reg(const zend_op *opline, const zend_ssa_op return 0; } -static zend_bool zend_jit_opline_supports_reg(const zend_op_array *op_array, zend_ssa *ssa, const zend_op *opline, const zend_ssa_op *ssa_op, zend_jit_trace_rec *trace) +static bool zend_jit_opline_supports_reg(const zend_op_array *op_array, zend_ssa *ssa, const zend_op *opline, const zend_ssa_op *ssa_op, zend_jit_trace_rec *trace) { uint32_t op1_info, op2_info; @@ -15290,7 +15290,7 @@ static zend_bool zend_jit_opline_supports_reg(const zend_op_array *op_array, zen return 0; } -static zend_bool zend_jit_var_supports_reg(zend_ssa *ssa, int var) +static bool zend_jit_var_supports_reg(zend_ssa *ssa, int var) { if (ssa->vars[var].no_val) { /* we don't need the value */ @@ -15324,7 +15324,7 @@ static zend_bool zend_jit_var_supports_reg(zend_ssa *ssa, int var) return 1; } -static zend_bool zend_jit_may_be_in_reg(const zend_op_array *op_array, zend_ssa *ssa, int var) +static bool zend_jit_may_be_in_reg(const zend_op_array *op_array, zend_ssa *ssa, int var) { if (!zend_jit_var_supports_reg(ssa, var)) { return 0; @@ -15352,7 +15352,7 @@ static zend_bool zend_jit_may_be_in_reg(const zend_op_array *op_array, zend_ssa return 1; } -static zend_bool zend_needs_extra_reg_for_const(const zend_op *opline, zend_uchar op_type, znode_op op) +static bool zend_needs_extra_reg_for_const(const zend_op *opline, zend_uchar op_type, znode_op op) { |.if X64 || if (op_type == IS_CONST) { @@ -15367,7 +15367,7 @@ static zend_bool zend_needs_extra_reg_for_const(const zend_op *opline, zend_ucha return 0; } -static zend_regset zend_jit_get_def_scratch_regset(const zend_op *opline, const zend_ssa_op *ssa_op, const zend_op_array *op_array, zend_ssa *ssa, int current_var, zend_bool last_use) +static zend_regset zend_jit_get_def_scratch_regset(const zend_op *opline, const zend_ssa_op *ssa_op, const zend_op_array *op_array, zend_ssa *ssa, int current_var, bool last_use) { uint32_t op1_info, op2_info; @@ -15389,7 +15389,7 @@ static zend_regset zend_jit_get_def_scratch_regset(const zend_op *opline, const return ZEND_REGSET_EMPTY; } -static zend_regset zend_jit_get_scratch_regset(const zend_op *opline, const zend_ssa_op *ssa_op, const zend_op_array *op_array, zend_ssa *ssa, int current_var, zend_bool last_use) +static zend_regset zend_jit_get_scratch_regset(const zend_op *opline, const zend_ssa_op *ssa_op, const zend_op_array *op_array, zend_ssa *ssa, int current_var, bool last_use) { uint32_t op1_info, op2_info, res_info; zend_regset regset = ZEND_REGSET_SCRATCH; diff --git a/ext/opcache/jit/zend_jit_x86.h b/ext/opcache/jit/zend_jit_x86.h index 10a82db14f..e9476ebb31 100644 --- a/ext/opcache/jit/zend_jit_x86.h +++ b/ext/opcache/jit/zend_jit_x86.h @@ -318,7 +318,7 @@ static zend_always_inline zend_jit_addr _zend_jit_decode_op(zend_uchar op_type, #define OP1_DATA_DEF_REG_ADDR() \ OP_REG_ADDR(opline + 1, op1_type, op1, op1_def) -static zend_always_inline zend_bool zend_jit_same_addr(zend_jit_addr addr1, zend_jit_addr addr2) +static zend_always_inline bool zend_jit_same_addr(zend_jit_addr addr1, zend_jit_addr addr2) { if (addr1 == addr2) { return 1; diff --git a/ext/opcache/zend_accelerator_blacklist.c b/ext/opcache/zend_accelerator_blacklist.c index 45ad0b2685..0c89839439 100644 --- a/ext/opcache/zend_accelerator_blacklist.c +++ b/ext/opcache/zend_accelerator_blacklist.c @@ -344,7 +344,7 @@ void zend_accel_blacklist_load(zend_blacklist *blacklist, char *filename) zend_accel_blacklist_update_regexp(blacklist); } -zend_bool zend_accel_blacklist_is_blacklisted(zend_blacklist *blacklist, char *verify_path, size_t verify_path_len) +bool zend_accel_blacklist_is_blacklisted(zend_blacklist *blacklist, char *verify_path, size_t verify_path_len) { int ret = 0; zend_regexp_list *regexp_list_it = blacklist->regexp_list; diff --git a/ext/opcache/zend_accelerator_blacklist.h b/ext/opcache/zend_accelerator_blacklist.h index 16c75bb396..a75a0e1ed8 100644 --- a/ext/opcache/zend_accelerator_blacklist.h +++ b/ext/opcache/zend_accelerator_blacklist.h @@ -45,7 +45,7 @@ void zend_accel_blacklist_init(zend_blacklist *blacklist); void zend_accel_blacklist_shutdown(zend_blacklist *blacklist); void zend_accel_blacklist_load(zend_blacklist *blacklist, char *filename); -zend_bool zend_accel_blacklist_is_blacklisted(zend_blacklist *blacklist, char *verify_path, size_t verify_path_len); +bool zend_accel_blacklist_is_blacklisted(zend_blacklist *blacklist, char *verify_path, size_t verify_path_len); void zend_accel_blacklist_apply(zend_blacklist *blacklist, blacklist_apply_func_arg_t func, void *argument); #endif /* ZEND_ACCELERATOR_BLACKLIST_H */ diff --git a/ext/opcache/zend_accelerator_hash.c b/ext/opcache/zend_accelerator_hash.c index b0293ae8f2..b3f2dfce20 100644 --- a/ext/opcache/zend_accelerator_hash.c +++ b/ext/opcache/zend_accelerator_hash.c @@ -71,7 +71,7 @@ void zend_accel_hash_init(zend_accel_hash *accel_hash, uint32_t hash_size) * Returns pointer the actual hash entry on success * key needs to be already allocated as it is not copied */ -zend_accel_hash_entry* zend_accel_hash_update(zend_accel_hash *accel_hash, const char *key, uint32_t key_length, zend_bool indirect, void *data) +zend_accel_hash_entry* zend_accel_hash_update(zend_accel_hash *accel_hash, const char *key, uint32_t key_length, bool indirect, void *data) { zend_ulong hash_value; zend_ulong index; diff --git a/ext/opcache/zend_accelerator_hash.h b/ext/opcache/zend_accelerator_hash.h index dc18ca54e1..88edbd23d8 100644 --- a/ext/opcache/zend_accelerator_hash.h +++ b/ext/opcache/zend_accelerator_hash.h @@ -50,7 +50,7 @@ struct _zend_accel_hash_entry { zend_accel_hash_entry *next; void *data; uint32_t key_length; - zend_bool indirect; + bool indirect; }; typedef struct _zend_accel_hash { @@ -68,7 +68,7 @@ zend_accel_hash_entry* zend_accel_hash_update( zend_accel_hash *accel_hash, const char *key, uint32_t key_length, - zend_bool indirect, + bool indirect, void *data); void* zend_accel_hash_find( @@ -94,7 +94,7 @@ int zend_accel_hash_unlink( const char *key, uint32_t key_length); -static inline zend_bool zend_accel_hash_is_full(zend_accel_hash *accel_hash) +static inline bool zend_accel_hash_is_full(zend_accel_hash *accel_hash) { if (accel_hash->num_entries == accel_hash->max_num_entries) { return 1; diff --git a/ext/opcache/zend_accelerator_module.c b/ext/opcache/zend_accelerator_module.c index d68ab9531a..1abbb5bb64 100644 --- a/ext/opcache/zend_accelerator_module.c +++ b/ext/opcache/zend_accelerator_module.c @@ -116,7 +116,7 @@ static ZEND_INI_MH(OnEnable) return OnUpdateBool(entry, new_value, mh_arg1, mh_arg2, mh_arg3, stage); } else { /* It may be only temporary disabled */ - zend_bool *p = (zend_bool *) ZEND_INI_GET_ADDR(); + bool *p = (bool *) ZEND_INI_GET_ADDR(); if ((ZSTR_LEN(new_value) == 2 && strcasecmp("on", ZSTR_VAL(new_value)) == 0) || (ZSTR_LEN(new_value) == 3 && strcasecmp("yes", ZSTR_VAL(new_value)) == 0) || (ZSTR_LEN(new_value) == 4 && strcasecmp("true", ZSTR_VAL(new_value)) == 0) || @@ -572,7 +572,7 @@ ZEND_FUNCTION(opcache_get_status) { zend_long reqs; zval memory_usage, statistics, scripts; - zend_bool fetch_scripts = 1; + bool fetch_scripts = 1; if (zend_parse_parameters(ZEND_NUM_ARGS(), "|b", &fetch_scripts) == FAILURE) { RETURN_THROWS(); @@ -839,7 +839,7 @@ ZEND_FUNCTION(opcache_invalidate) { char *script_name; size_t script_name_len; - zend_bool force = 0; + bool force = 0; if (zend_parse_parameters(ZEND_NUM_ARGS(), "s|b", &script_name, &script_name_len, &force) == FAILURE) { RETURN_THROWS(); diff --git a/ext/opcache/zend_persist.c b/ext/opcache/zend_persist.c index c37bb2ec45..2f7194a7ca 100644 --- a/ext/opcache/zend_persist.c +++ b/ext/opcache/zend_persist.c @@ -285,7 +285,7 @@ static HashTable *zend_persist_attributes(HashTable *attributes) return ptr; } -static void zend_persist_type(zend_type *type, zend_bool use_arena) { +static void zend_persist_type(zend_type *type, bool use_arena) { if (ZEND_TYPE_HAS_LIST(*type)) { zend_type_list *list = ZEND_TYPE_LIST(*type); if (ZEND_TYPE_USES_ARENA(*type)) { diff --git a/ext/opcache/zend_persist_calc.c b/ext/opcache/zend_persist_calc.c index 191674b641..7731b9a970 100644 --- a/ext/opcache/zend_persist_calc.c +++ b/ext/opcache/zend_persist_calc.c @@ -166,7 +166,7 @@ static void zend_persist_attributes_calc(HashTable *attributes) } } -static void zend_persist_type_calc(zend_type *type, zend_bool use_arena) +static void zend_persist_type_calc(zend_type *type, bool use_arena) { if (ZEND_TYPE_HAS_LIST(*type)) { if (ZEND_TYPE_USES_ARENA(*type) && !ZCG(is_immutable_class) && use_arena) { diff --git a/ext/opcache/zend_shared_alloc.c b/ext/opcache/zend_shared_alloc.c index f4cb4f55af..698c2884ca 100644 --- a/ext/opcache/zend_shared_alloc.c +++ b/ext/opcache/zend_shared_alloc.c @@ -375,7 +375,7 @@ int zend_shared_memdup_size(void *source, size_t size) return ZEND_ALIGNED_SIZE(size); } -static zend_always_inline void *_zend_shared_memdup(void *source, size_t size, zend_bool arena, zend_bool get_xlat, zend_bool set_xlat, zend_bool free_source) +static zend_always_inline void *_zend_shared_memdup(void *source, size_t size, bool arena, bool get_xlat, bool set_xlat, bool free_source) { void *old_p, *retval; zend_ulong key; diff --git a/ext/opcache/zend_shared_alloc.h b/ext/opcache/zend_shared_alloc.h index 1dbc88d42e..8d37376570 100644 --- a/ext/opcache/zend_shared_alloc.h +++ b/ext/opcache/zend_shared_alloc.h @@ -109,7 +109,7 @@ typedef struct _zend_smm_shared_globals { /* Amount of shared memory allocated by garbage */ size_t wasted_shared_memory; /* No more shared memory flag */ - zend_bool memory_exhausted; + bool memory_exhausted; /* Saved Shared Allocator State */ zend_shared_memory_state shared_memory_state; /* Pointer to the application's shared data structures */ diff --git a/ext/openssl/openssl.c b/ext/openssl/openssl.c index effc659b68..06195004f1 100644 --- a/ext/openssl/openssl.c +++ b/ext/openssl/openssl.c @@ -1471,7 +1471,7 @@ PHP_FUNCTION(openssl_x509_export_to_file) zend_object *cert_obj; zend_string *cert_str; - zend_bool notext = 1; + bool notext = 1; BIO * bio_out; char * filename; size_t filename_len; @@ -1781,7 +1781,7 @@ PHP_FUNCTION(openssl_x509_export) zend_object *cert_obj; zend_string *cert_str; zval *zout; - zend_bool notext = 1; + bool notext = 1; BIO * bio_out; ZEND_PARSE_PARAMETERS_START(2, 3) @@ -1827,7 +1827,7 @@ cleanup: } /* }}} */ -zend_string* php_openssl_x509_fingerprint(X509 *peer, const char *method, zend_bool raw) +zend_string* php_openssl_x509_fingerprint(X509 *peer, const char *method, bool raw) { unsigned char md[EVP_MAX_MD_SIZE]; const EVP_MD *mdtype; @@ -1859,7 +1859,7 @@ PHP_FUNCTION(openssl_x509_fingerprint) X509 *cert; zend_object *cert_obj; zend_string *cert_str; - zend_bool raw_output = 0; + bool raw_output = 0; char *method = "sha1"; size_t method_len; zend_string *fingerprint; @@ -2038,7 +2038,7 @@ PHP_FUNCTION(openssl_x509_parse) zend_object *cert_obj; zend_string *cert_str; int i, sig_nid; - zend_bool useshortnames = 1; + bool useshortnames = 1; char * tmpstr; zval subitem; X509_EXTENSION *extension; @@ -3034,7 +3034,7 @@ PHP_FUNCTION(openssl_csr_export_to_file) X509_REQ *csr; zend_object *csr_obj; zend_string *csr_str; - zend_bool notext = 1; + bool notext = 1; char * filename = NULL; size_t filename_len; BIO * bio_out; @@ -3088,7 +3088,7 @@ PHP_FUNCTION(openssl_csr_export) zend_object *csr_obj; zend_string *csr_str; zval *zout; - zend_bool notext = 1; + bool notext = 1; BIO * bio_out; ZEND_PARSE_PARAMETERS_START(2, 3) @@ -3375,7 +3375,7 @@ PHP_FUNCTION(openssl_csr_get_subject) X509_REQ *csr; zend_object *csr_obj; zend_string *csr_str; - zend_bool use_shortnames = 1; + bool use_shortnames = 1; X509_NAME *subject; ZEND_PARSE_PARAMETERS_START(1, 2) @@ -3406,7 +3406,7 @@ PHP_FUNCTION(openssl_csr_get_public_key) X509_REQ *orig_csr, *csr; zend_object *csr_obj; zend_string *csr_str; - zend_bool use_shortnames = 1; + bool use_shortnames = 1; php_openssl_pkey_object *key_object; EVP_PKEY *tpubkey; @@ -3874,7 +3874,7 @@ static int php_openssl_is_private_key(EVP_PKEY* pkey) } while (0); /* {{{ php_openssl_pkey_init_rsa */ -static zend_bool php_openssl_pkey_init_and_assign_rsa(EVP_PKEY *pkey, RSA *rsa, zval *data) +static bool php_openssl_pkey_init_and_assign_rsa(EVP_PKEY *pkey, RSA *rsa, zval *data) { BIGNUM *n, *e, *d, *p, *q, *dmp1, *dmq1, *iqmp; @@ -3907,7 +3907,7 @@ static zend_bool php_openssl_pkey_init_and_assign_rsa(EVP_PKEY *pkey, RSA *rsa, } /* {{{ php_openssl_pkey_init_dsa */ -static zend_bool php_openssl_pkey_init_dsa(DSA *dsa, zval *data) +static bool php_openssl_pkey_init_dsa(DSA *dsa, zval *data) { BIGNUM *p, *q, *g, *priv_key, *pub_key; const BIGNUM *priv_key_const, *pub_key_const; @@ -3985,7 +3985,7 @@ static BIGNUM *php_openssl_dh_pub_from_priv(BIGNUM *priv_key, BIGNUM *g, BIGNUM /* }}} */ /* {{{ php_openssl_pkey_init_dh */ -static zend_bool php_openssl_pkey_init_dh(DH *dh, zval *data) +static bool php_openssl_pkey_init_dh(DH *dh, zval *data) { BIGNUM *p, *q, *g, *priv_key, *pub_key; @@ -6763,7 +6763,7 @@ static void php_openssl_add_method(const OBJ_NAME *name, void *arg) /* {{{ */ /* {{{ Return array of available digest algorithms */ PHP_FUNCTION(openssl_get_md_methods) { - zend_bool aliases = 0; + bool aliases = 0; if (zend_parse_parameters(ZEND_NUM_ARGS(), "|b", &aliases) == FAILURE) { RETURN_THROWS(); @@ -6778,7 +6778,7 @@ PHP_FUNCTION(openssl_get_md_methods) /* {{{ Return array of available cipher algorithms */ PHP_FUNCTION(openssl_get_cipher_methods) { - zend_bool aliases = 0; + bool aliases = 0; if (zend_parse_parameters(ZEND_NUM_ARGS(), "|b", &aliases) == FAILURE) { RETURN_THROWS(); @@ -6823,7 +6823,7 @@ PHP_FUNCTION(openssl_get_curve_names) /* {{{ Computes digest hash value for given data using given method, returns raw or binhex encoded string */ PHP_FUNCTION(openssl_digest) { - zend_bool raw_output = 0; + bool raw_output = 0; char *data, *method; size_t data_len, method_len; const EVP_MD *mdtype; @@ -6872,10 +6872,10 @@ PHP_FUNCTION(openssl_digest) /* Cipher mode info */ struct php_openssl_cipher_mode { - zend_bool is_aead; - zend_bool is_single_run_aead; - zend_bool set_tag_length_always; - zend_bool set_tag_length_when_encrypting; + bool is_aead; + bool is_single_run_aead; + bool set_tag_length_always; + bool set_tag_length_when_encrypting; int aead_get_tag_flag; int aead_set_tag_flag; int aead_ivlen_flag; @@ -6927,7 +6927,7 @@ static void php_openssl_load_cipher_mode(struct php_openssl_cipher_mode *mode, c /* }}} */ static int php_openssl_validate_iv(const char **piv, size_t *piv_len, size_t iv_required_len, - zend_bool *free_iv, EVP_CIPHER_CTX *cipher_ctx, struct php_openssl_cipher_mode *mode) /* {{{ */ + bool *free_iv, EVP_CIPHER_CTX *cipher_ctx, struct php_openssl_cipher_mode *mode) /* {{{ */ { char *iv_new; @@ -6980,8 +6980,8 @@ static int php_openssl_validate_iv(const char **piv, size_t *piv_len, size_t iv_ static int php_openssl_cipher_init(const EVP_CIPHER *cipher_type, EVP_CIPHER_CTX *cipher_ctx, struct php_openssl_cipher_mode *mode, - const char **ppassword, size_t *ppassword_len, zend_bool *free_password, - const char **piv, size_t *piv_len, zend_bool *free_iv, + const char **ppassword, size_t *ppassword_len, bool *free_password, + const char **piv, size_t *piv_len, bool *free_iv, const char *tag, int tag_len, zend_long options, int enc) /* {{{ */ { unsigned char *key; @@ -7106,7 +7106,7 @@ PHP_OPENSSL_API zend_string* php_openssl_encrypt( EVP_CIPHER_CTX *cipher_ctx; struct php_openssl_cipher_mode mode; int i = 0, outlen; - zend_bool free_iv = 0, free_password = 0; + bool free_iv = 0, free_password = 0; zend_string *outbuf = NULL; PHP_OPENSSL_CHECK_SIZE_T_TO_INT_NULL_RETURN(data_len, data); @@ -7220,7 +7220,7 @@ PHP_OPENSSL_API zend_string* php_openssl_decrypt( struct php_openssl_cipher_mode mode; int i = 0, outlen; zend_string *base64_str = NULL; - zend_bool free_iv = 0, free_password = 0; + bool free_iv = 0, free_password = 0; zend_string *outbuf = NULL; PHP_OPENSSL_CHECK_SIZE_T_TO_INT_NULL_RETURN(data_len, data); diff --git a/ext/openssl/xp_ssl.c b/ext/openssl/xp_ssl.c index 6fdbf1df16..d06db22be5 100644 --- a/ext/openssl/xp_ssl.c +++ b/ext/openssl/xp_ssl.c @@ -115,7 +115,7 @@ static RSA *php_openssl_tmp_rsa_cb(SSL *s, int is_export, int keylength); #endif extern php_stream* php_openssl_get_stream_from_ssl_handle(const SSL *ssl); -extern zend_string* php_openssl_x509_fingerprint(X509 *peer, const char *method, zend_bool raw); +extern zend_string* php_openssl_x509_fingerprint(X509 *peer, const char *method, bool raw); extern int php_openssl_get_ssl_stream_data_index(); static struct timeval php_openssl_subtract_timeval(struct timeval a, struct timeval b); static int php_openssl_compare_timeval(struct timeval a, struct timeval b); @@ -196,7 +196,7 @@ static int php_openssl_is_http_stream_talking_to_iis(php_stream *stream) /* {{{ } /* }}} */ -static int php_openssl_handle_ssl_error(php_stream *stream, int nr_bytes, zend_bool is_init) /* {{{ */ +static int php_openssl_handle_ssl_error(php_stream *stream, int nr_bytes, bool is_init) /* {{{ */ { php_openssl_netstream_data_t *sslsock = (php_openssl_netstream_data_t*)stream->abstract; int err = SSL_get_error(sslsock->ssl_handle, nr_bytes); @@ -334,7 +334,7 @@ static int php_openssl_x509_fingerprint_cmp(X509 *peer, const char *method, cons return result; } -static zend_bool php_openssl_x509_fingerprint_match(X509 *peer, zval *val) +static bool php_openssl_x509_fingerprint_match(X509 *peer, zval *val) { if (Z_TYPE_P(val) == IS_STRING) { const char *method = NULL; @@ -378,7 +378,7 @@ static zend_bool php_openssl_x509_fingerprint_match(X509 *peer, zval *val) return 0; } -static zend_bool php_openssl_matches_wildcard_name(const char *subjectname, const char *certname) /* {{{ */ +static bool php_openssl_matches_wildcard_name(const char *subjectname, const char *certname) /* {{{ */ { char *wildcard = NULL; ptrdiff_t prefix_len; @@ -413,7 +413,7 @@ static zend_bool php_openssl_matches_wildcard_name(const char *subjectname, cons } /* }}} */ -static zend_bool php_openssl_matches_san_list(X509 *peer, const char *subject_name) /* {{{ */ +static bool php_openssl_matches_san_list(X509 *peer, const char *subject_name) /* {{{ */ { int i, len; unsigned char *cert_name = NULL; @@ -473,11 +473,11 @@ static zend_bool php_openssl_matches_san_list(X509 *peer, const char *subject_na } /* }}} */ -static zend_bool php_openssl_matches_common_name(X509 *peer, const char *subject_name) /* {{{ */ +static bool php_openssl_matches_common_name(X509 *peer, const char *subject_name) /* {{{ */ { char buf[1024]; X509_NAME *cert_name; - zend_bool is_match = 0; + bool is_match = 0; int cert_name_len; cert_name = X509_get_subject_name(peer); @@ -627,7 +627,7 @@ static int php_openssl_win_cert_verify_callback(X509_STORE_CTX *x509_store_ctx, php_stream *stream; php_openssl_netstream_data_t *sslsock; zval *val; - zend_bool is_self_signed = 0; + bool is_self_signed = 0; stream = (php_stream*)arg; @@ -2292,7 +2292,7 @@ static inline int php_openssl_tcp_sockop_accept(php_stream *stream, php_openssl_ php_stream_xport_param *xparam STREAMS_DC) /* {{{ */ { int clisock; - zend_bool nodelay = 0; + bool nodelay = 0; zval *tmpzval = NULL; xparam->outputs.client = NULL; diff --git a/ext/pcntl/pcntl.c b/ext/pcntl/pcntl.c index f9a48b0406..def0ac637d 100644 --- a/ext/pcntl/pcntl.c +++ b/ext/pcntl/pcntl.c @@ -885,8 +885,8 @@ PHP_FUNCTION(pcntl_signal) { zval *handle; zend_long signo; - zend_bool restart_syscalls = 1; - zend_bool restart_syscalls_is_null = 1; + bool restart_syscalls = 1; + bool restart_syscalls_is_null = 1; char *error = NULL; if (zend_parse_parameters(ZEND_NUM_ARGS(), "lz|b!", &signo, &handle, &restart_syscalls, &restart_syscalls_is_null) == FAILURE) { @@ -1185,7 +1185,7 @@ PHP_FUNCTION(pcntl_getpriority) { zend_long who = PRIO_PROCESS; zend_long pid; - zend_bool pid_is_null = 1; + bool pid_is_null = 1; int pri; if (zend_parse_parameters(ZEND_NUM_ARGS(), "|l!l", &pid, &pid_is_null, &who) == FAILURE) { @@ -1224,7 +1224,7 @@ PHP_FUNCTION(pcntl_setpriority) { zend_long who = PRIO_PROCESS; zend_long pid; - zend_bool pid_is_null = 1; + bool pid_is_null = 1; zend_long pri; if (zend_parse_parameters(ZEND_NUM_ARGS(), "l|l!l", &pri, &pid, &pid_is_null, &who) == FAILURE) { @@ -1387,7 +1387,7 @@ void pcntl_signal_dispatch() /* {{{ Enable/disable asynchronous signal handling and return the old setting. */ PHP_FUNCTION(pcntl_async_signals) { - zend_bool on, on_is_null = 1; + bool on, on_is_null = 1; if (zend_parse_parameters(ZEND_NUM_ARGS(), "|b!", &on, &on_is_null) == FAILURE) { RETURN_THROWS(); diff --git a/ext/pcntl/php_pcntl.h b/ext/pcntl/php_pcntl.h index 4fec1627ad..05bd8d4c13 100644 --- a/ext/pcntl/php_pcntl.h +++ b/ext/pcntl/php_pcntl.h @@ -86,7 +86,7 @@ ZEND_BEGIN_MODULE_GLOBALS(pcntl) struct php_pcntl_pending_signal *head, *tail, *spares; int last_error; volatile char pending_signals; - zend_bool async_signals; + bool async_signals; ZEND_END_MODULE_GLOBALS(pcntl) #if defined(ZTS) && defined(COMPILE_DL_PCNTL) diff --git a/ext/pcre/php_pcre.c b/ext/pcre/php_pcre.c index fae3eb0e76..e9d8f6869d 100644 --- a/ext/pcre/php_pcre.c +++ b/ext/pcre/php_pcre.c @@ -67,7 +67,7 @@ ZEND_TLS pcre2_general_context *gctx = NULL; ZEND_TLS pcre2_compile_context *cctx = NULL; ZEND_TLS pcre2_match_context *mctx = NULL; ZEND_TLS pcre2_match_data *mdata = NULL; -ZEND_TLS zend_bool mdata_used = 0; +ZEND_TLS bool mdata_used = 0; ZEND_TLS uint8_t pcre2_init_ok = 0; #if defined(ZTS) && defined(HAVE_PCRE_JIT_SUPPORT) static MUTEX_T pcre_mt = NULL; @@ -999,7 +999,7 @@ static inline void populate_match_value( } static inline void add_named( - zval *subpats, zend_string *name, zval *val, zend_bool unmatched) { + zval *subpats, zend_string *name, zval *val, bool unmatched) { /* If the DUPNAMES option is used, multiple subpatterns might have the same name. * In this case we want to preserve the one that actually has a value. */ if (!unmatched) { @@ -1049,8 +1049,8 @@ static inline void add_offset_pair( static void populate_subpat_array( zval *subpats, const char *subject, PCRE2_SIZE *offsets, zend_string **subpat_names, uint32_t num_subpats, int count, const PCRE2_SPTR mark, zend_long flags) { - zend_bool offset_capture = (flags & PREG_OFFSET_CAPTURE) != 0; - zend_bool unmatched_as_null = (flags & PREG_UNMATCHED_AS_NULL) != 0; + bool offset_capture = (flags & PREG_OFFSET_CAPTURE) != 0; + bool unmatched_as_null = (flags & PREG_UNMATCHED_AS_NULL) != 0; zval val; int i; if (subpat_names) { @@ -1145,7 +1145,7 @@ static void php_do_pcre_match(INTERNAL_FUNCTION_PARAMETERS, int global) /* {{{ * } /* }}} */ -static zend_always_inline zend_bool is_known_valid_utf8( +static zend_always_inline bool is_known_valid_utf8( zend_string *subject_str, PCRE2_SIZE start_offset) { if (!(GC_FLAGS(subject_str) & IS_STR_VALID_UTF8)) { /* We don't know whether the string is valid UTF-8 or not. */ @@ -1659,7 +1659,7 @@ PHPAPI zend_string *php_pcre_replace_impl(pcre_cache_entry *pce, zend_string *su piece = subject + last_end_offset; if (count >= 0 && limit > 0) { - zend_bool simple_string; + bool simple_string; /* Check for too many substrings condition. */ if (UNEXPECTED(count == 0)) { @@ -1858,7 +1858,7 @@ static zend_string *php_pcre_replace_func_impl(pcre_cache_entry *pce, zend_strin zend_string *result; /* Result of replacement */ zend_string *eval_result; /* Result of custom function */ pcre2_match_data *match_data; - zend_bool old_mdata_used; + bool old_mdata_used; /* Calculate the size of the offsets array, and allocate memory for it. */ num_subpats = pce->capture_count + 1; @@ -2881,7 +2881,7 @@ PHPAPI void php_pcre_grep_impl(pcre_cache_entry *pce, zval *input, zval *return uint32_t options; /* Execution options */ zend_string *string_key; zend_ulong num_key; - zend_bool invert; /* Whether to return non-matching + bool invert; /* Whether to return non-matching entries */ pcre2_match_data *match_data; invert = flags & PREG_GREP_INVERT ? 1 : 0; diff --git a/ext/pcre/php_pcre.h b/ext/pcre/php_pcre.h index e9f5e34ab9..6e49715257 100644 --- a/ext/pcre/php_pcre.h +++ b/ext/pcre/php_pcre.h @@ -77,9 +77,9 @@ ZEND_BEGIN_MODULE_GLOBALS(pcre) zend_long backtrack_limit; zend_long recursion_limit; #ifdef HAVE_PCRE_JIT_SUPPORT - zend_bool jit; + bool jit; #endif - zend_bool per_request_cache; + bool per_request_cache; php_pcre_error_code error_code; /* Used for unmatched subpatterns in OFFSET_CAPTURE mode */ zval unmatched_null_pair; diff --git a/ext/pdo/pdo_dbh.c b/ext/pdo/pdo_dbh.c index 5a2c25e232..e5159bd64d 100644 --- a/ext/pdo/pdo_dbh.c +++ b/ext/pdo/pdo_dbh.c @@ -224,7 +224,7 @@ PHP_METHOD(PDO, __construct) { zval *object = ZEND_THIS; pdo_dbh_t *dbh = NULL; - zend_bool is_persistent = 0; + bool is_persistent = 0; char *data_source; size_t data_source_len; char *colon; @@ -1050,7 +1050,7 @@ PHP_METHOD(PDO, query) pdo_stmt_t *stmt; zend_string *statement; zend_long fetch_mode; - zend_bool fetch_mode_is_null = 1; + bool fetch_mode_is_null = 1; zval *args = NULL; uint32_t num_args = 0; pdo_dbh_object_t *dbh_obj = Z_PDO_OBJECT_P(ZEND_THIS); @@ -1399,7 +1399,7 @@ void pdo_dbh_init(void) REGISTER_PDO_CLASS_CONST_LONG("CURSOR_SCROLL", (zend_long)PDO_CURSOR_SCROLL); } -static void dbh_free(pdo_dbh_t *dbh, zend_bool free_persistent) +static void dbh_free(pdo_dbh_t *dbh, bool free_persistent) { int i; diff --git a/ext/pdo_dblib/dblib_driver.c b/ext/pdo_dblib/dblib_driver.c index 5017d0cd41..824e055565 100644 --- a/ext/pdo_dblib/dblib_driver.c +++ b/ext/pdo_dblib/dblib_driver.c @@ -145,7 +145,7 @@ static zend_long dblib_handle_doer(pdo_dbh_t *dbh, const char *sql, size_t sql_l static zend_string* dblib_handle_quoter(pdo_dbh_t *dbh, const zend_string *unquoted, enum pdo_param_type paramtype) { pdo_dblib_db_handle *H = (pdo_dblib_db_handle *)dbh->driver_data; - zend_bool use_national_character_set = 0; + bool use_national_character_set = 0; size_t i; char *q; size_t quotedlen = 0; diff --git a/ext/pdo_firebird/firebird_driver.c b/ext/pdo_firebird/firebird_driver.c index 858cf53035..02c6dfc4ee 100644 --- a/ext/pdo_firebird/firebird_driver.c +++ b/ext/pdo_firebird/firebird_driver.c @@ -293,7 +293,7 @@ static FbTokenType getToken(const char** begin, const char* end) int preprocess(const char* sql, int sql_len, char* sql_out, HashTable* named_params) { - zend_bool passAsIs = 1, execBlock = 0; + bool passAsIs = 1, execBlock = 0; zend_long pindex = -1; char pname[254], ident[253], ident2[253]; unsigned int l; @@ -825,7 +825,7 @@ static bool firebird_handle_set_attribute(pdo_dbh_t *dbh, zend_long attr, zval * switch (attr) { case PDO_ATTR_AUTOCOMMIT: { - zend_bool bval = zval_get_long(val)? 1 : 0; + bool bval = zval_get_long(val)? 1 : 0; /* ignore if the new value equals the old one */ if (dbh->auto_commit ^ bval) { diff --git a/ext/pdo_mysql/mysql_driver.c b/ext/pdo_mysql/mysql_driver.c index 1c60dd5989..ad27937feb 100644 --- a/ext/pdo_mysql/mysql_driver.c +++ b/ext/pdo_mysql/mysql_driver.c @@ -304,7 +304,7 @@ static char *pdo_mysql_last_insert_id(pdo_dbh_t *dbh, const char *name, size_t * static zend_string* mysql_handle_quoter(pdo_dbh_t *dbh, const zend_string *unquoted, enum pdo_param_type paramtype ) { pdo_mysql_db_handle *H = (pdo_mysql_db_handle *)dbh->driver_data; - zend_bool use_national_character_set = 0; + bool use_national_character_set = 0; char *quoted; size_t quotedlen; zend_string *quoted_str; @@ -398,7 +398,7 @@ static inline int mysql_handle_autocommit(pdo_dbh_t *dbh) static bool pdo_mysql_set_attribute(pdo_dbh_t *dbh, zend_long attr, zval *val) { zend_long lval = zval_get_long(val); - zend_bool bval = lval ? 1 : 0; + bool bval = lval ? 1 : 0; PDO_DBG_ENTER("pdo_mysql_set_attribute"); PDO_DBG_INF_FMT("dbh=%p", dbh); PDO_DBG_INF_FMT("attr=%l", attr); diff --git a/ext/pdo_mysql/mysql_statement.c b/ext/pdo_mysql/mysql_statement.c index e1f6c6ff95..c35657191f 100644 --- a/ext/pdo_mysql/mysql_statement.c +++ b/ext/pdo_mysql/mysql_statement.c @@ -555,7 +555,7 @@ static int pdo_mysql_stmt_fetch(pdo_stmt_t *stmt, enum pdo_fetch_orientation ori } #ifdef PDO_USE_MYSQLND - zend_bool fetched_anything; + bool fetched_anything; PDO_DBG_ENTER("pdo_mysql_stmt_fetch"); PDO_DBG_INF_FMT("stmt=%p", S->stmt); diff --git a/ext/pdo_mysql/php_pdo_mysql_int.h b/ext/pdo_mysql/php_pdo_mysql_int.h index e83ac735dc..75287e7904 100644 --- a/ext/pdo_mysql/php_pdo_mysql_int.h +++ b/ext/pdo_mysql/php_pdo_mysql_int.h @@ -39,7 +39,7 @@ typedef _Bool my_bool; #define PDO_DBG_INF_FMT(...) do { if (dbg_skip_trace == FALSE) PDO_MYSQL_G(dbg)->m->log_va(PDO_MYSQL_G(dbg), __LINE__, __FILE__, -1, "info : ", __VA_ARGS__); } while (0) #define PDO_DBG_ERR_FMT(...) do { if (dbg_skip_trace == FALSE) PDO_MYSQL_G(dbg)->m->log_va(PDO_MYSQL_G(dbg), __LINE__, __FILE__, -1, "error: ", __VA_ARGS__); } while (0) #define PDO_DBG_ENTER(func_name) \ - zend_bool dbg_skip_trace = TRUE; \ + bool dbg_skip_trace = TRUE; \ ((void) dbg_skip_trace); \ if (PDO_MYSQL_G(dbg)) \ dbg_skip_trace = !PDO_MYSQL_G(dbg)->m->func_enter(PDO_MYSQL_G(dbg), __LINE__, __FILE__, func_name, strlen(func_name)); diff --git a/ext/pdo_oci/oci_statement.c b/ext/pdo_oci/oci_statement.c index 87fe34e287..de021e76fb 100644 --- a/ext/pdo_oci/oci_statement.c +++ b/ext/pdo_oci/oci_statement.c @@ -518,7 +518,7 @@ static int oci_stmt_describe(pdo_stmt_t *stmt, int colno) /* {{{ */ ub2 dtype, data_size, precis; ub4 namelen; struct pdo_column_data *col = &stmt->columns[colno]; - zend_bool dyn = FALSE; + bool dyn = FALSE; /* describe the column */ STMT_CALL(OCIParamGet, (S->stmt, OCI_HTYPE_STMT, S->err, (dvoid*)¶m, colno+1)); diff --git a/ext/pdo_pgsql/pgsql_driver.c b/ext/pdo_pgsql/pgsql_driver.c index 1377f70969..d2cda8572d 100644 --- a/ext/pdo_pgsql/pgsql_driver.c +++ b/ext/pdo_pgsql/pgsql_driver.c @@ -1155,7 +1155,7 @@ static const zend_function_entry *pdo_pgsql_get_driver_methods(pdo_dbh_t *dbh, i static bool pdo_pgsql_set_attr(pdo_dbh_t *dbh, zend_long attr, zval *val) { - zend_bool bval = zval_get_long(val)? 1 : 0; + bool bval = zval_get_long(val)? 1 : 0; pdo_pgsql_db_handle *H = (pdo_pgsql_db_handle *)dbh->driver_data; switch (attr) { diff --git a/ext/pdo_pgsql/pgsql_statement.c b/ext/pdo_pgsql/pgsql_statement.c index c17585f47e..6570a86e14 100644 --- a/ext/pdo_pgsql/pgsql_statement.c +++ b/ext/pdo_pgsql/pgsql_statement.c @@ -57,7 +57,7 @@ static int pgsql_stmt_dtor(pdo_stmt_t *stmt) { pdo_pgsql_stmt *S = (pdo_pgsql_stmt*)stmt->driver_data; - zend_bool server_obj_usable = !Z_ISUNDEF(stmt->database_object_handle) + bool server_obj_usable = !Z_ISUNDEF(stmt->database_object_handle) && IS_OBJ_VALID(EG(objects_store).object_buckets[Z_OBJ_HANDLE(stmt->database_object_handle)]) && !(OBJ_FLAGS(Z_OBJ(stmt->database_object_handle)) & IS_OBJ_FREE_CALLED); diff --git a/ext/pdo_pgsql/php_pdo_pgsql_int.h b/ext/pdo_pgsql/php_pdo_pgsql_int.h index b4bc6318e7..16aeb3ca48 100644 --- a/ext/pdo_pgsql/php_pdo_pgsql_int.h +++ b/ext/pdo_pgsql/php_pdo_pgsql_int.h @@ -42,9 +42,9 @@ typedef struct { unsigned int stmt_counter; /* The following two variables have the same purpose. Unfortunately we need to keep track of two different attributes having the same effect. */ - zend_bool emulate_prepares; - zend_bool disable_native_prepares; /* deprecated since 5.6 */ - zend_bool disable_prepares; + bool emulate_prepares; + bool disable_native_prepares; /* deprecated since 5.6 */ + bool disable_prepares; } pdo_pgsql_db_handle; typedef struct { @@ -63,7 +63,7 @@ typedef struct { int *param_formats; Oid *param_types; int current_row; - zend_bool is_prepared; + bool is_prepared; } pdo_pgsql_stmt; typedef struct { diff --git a/ext/pgsql/pgsql.c b/ext/pgsql/pgsql.c index 9b3471b192..821af14efa 100644 --- a/ext/pgsql/pgsql.c +++ b/ext/pgsql/pgsql.c @@ -1547,7 +1547,7 @@ PHP_FUNCTION(pg_field_table) zval *result; pgsql_result_handle *pg_result; zend_long fnum = -1; - zend_bool return_oid = 0; + bool return_oid = 0; Oid oid; smart_str hash_key = {0}; char *table_name; @@ -2614,7 +2614,7 @@ PHP_FUNCTION(pg_lo_write) zval *pgsql_id; char *str; zend_long z_len; - zend_bool z_len_is_null = 1; + bool z_len_is_null = 1; size_t str_len, nbytes; size_t len; pgLofp *pgsql; @@ -4240,7 +4240,7 @@ PHP_FUNCTION(pg_flush) * table_name must not be empty * TODO: Add meta_data cache for better performance */ -PHP_PGSQL_API int php_pgsql_meta_data(PGconn *pg_link, const char *table_name, zval *meta, zend_bool extended) +PHP_PGSQL_API int php_pgsql_meta_data(PGconn *pg_link, const char *table_name, zval *meta, bool extended) { PGresult *pg_result; char *src, *tmp_name, *tmp_name2 = NULL; @@ -4355,7 +4355,7 @@ PHP_FUNCTION(pg_meta_data) zval *pgsql_link; char *table_name; size_t table_name_len; - zend_bool extended=0; + bool extended=0; PGconn *pgsql; if (zend_parse_parameters(ZEND_NUM_ARGS(), "rs|b", @@ -4527,7 +4527,7 @@ static int php_pgsql_convert_match(const char *str, size_t str_len, const char * /* {{{ php_pgsql_add_quote * add quotes around string. */ -static int php_pgsql_add_quotes(zval *src, zend_bool should_free) +static int php_pgsql_add_quotes(zval *src, bool should_free) { smart_str str = {0}; diff --git a/ext/pgsql/php_pgsql.h b/ext/pgsql/php_pgsql.h index 3da04282d9..5398a92266 100644 --- a/ext/pgsql/php_pgsql.h +++ b/ext/pgsql/php_pgsql.h @@ -176,7 +176,7 @@ PHP_FUNCTION(pg_select); #define PGSQL_DML_ESCAPE (1<<12) /* No convert, but escape only */ /* exported functions */ -PHP_PGSQL_API int php_pgsql_meta_data(PGconn *pg_link, const char *table_name, zval *meta, zend_bool extended); +PHP_PGSQL_API int php_pgsql_meta_data(PGconn *pg_link, const char *table_name, zval *meta, bool extended); PHP_PGSQL_API int php_pgsql_convert(PGconn *pg_link, const char *table_name, const zval *values, zval *result, zend_ulong opt); PHP_PGSQL_API int php_pgsql_insert(PGconn *pg_link, const char *table, zval *values, zend_ulong opt, zend_string **sql); PHP_PGSQL_API int php_pgsql_update(PGconn *pg_link, const char *table, zval *values, zval *ids, zend_ulong opt , zend_string **sql); diff --git a/ext/phar/dirstream.c b/ext/phar/dirstream.c index 7ddd7b564b..4d2afe0e86 100644 --- a/ext/phar/dirstream.c +++ b/ext/phar/dirstream.c @@ -22,7 +22,7 @@ #include "dirstream.h" BEGIN_EXTERN_C() -void phar_dostat(phar_archive_data *phar, phar_entry_info *data, php_stream_statbuf *ssb, zend_bool is_dir); +void phar_dostat(phar_archive_data *phar, phar_entry_info *data, php_stream_statbuf *ssb, bool is_dir); END_EXTERN_C() const php_stream_ops phar_dir_ops = { diff --git a/ext/phar/func_interceptors.c b/ext/phar/func_interceptors.c index 9987f79572..4c7975c318 100644 --- a/ext/phar/func_interceptors.c +++ b/ext/phar/func_interceptors.c @@ -94,11 +94,11 @@ PHAR_FUNC(phar_file_get_contents) /* {{{ */ char *filename; size_t filename_len; zend_string *contents; - zend_bool use_include_path = 0; + bool use_include_path = 0; php_stream *stream; zend_long offset = -1; zend_long maxlen; - zend_bool maxlen_is_null = 1; + bool maxlen_is_null = 1; zval *zcontext = NULL; if (!PHAR_G(intercepted)) { @@ -234,7 +234,7 @@ PHAR_FUNC(phar_readfile) /* {{{ */ char *filename; size_t filename_len; int size = 0; - zend_bool use_include_path = 0; + bool use_include_path = 0; zval *zcontext = NULL; php_stream *stream; @@ -334,7 +334,7 @@ PHAR_FUNC(phar_fopen) /* {{{ */ { char *filename, *mode; size_t filename_len, mode_len; - zend_bool use_include_path = 0; + bool use_include_path = 0; zval *zcontext = NULL; php_stream *stream; diff --git a/ext/phar/phar.c b/ext/phar/phar.c index c01569d308..7aa454c222 100644 --- a/ext/phar/phar.c +++ b/ext/phar/phar.c @@ -33,7 +33,7 @@ zend_string *(*phar_save_resolve_path)(const char *filename, size_t filename_len */ static int phar_set_writeable_bit(zval *zv, void *argument) /* {{{ */ { - zend_bool keep = *(zend_bool *)argument; + bool keep = *(bool *)argument; phar_archive_data *phar = (phar_archive_data *)Z_PTR_P(zv); if (!phar->is_data) { @@ -47,7 +47,7 @@ static int phar_set_writeable_bit(zval *zv, void *argument) /* {{{ */ /* if the original value is 0 (disabled), then allow setting/unsetting at will. Otherwise only allow 1 (enabled), and error on disabling */ ZEND_INI_MH(phar_ini_modify_handler) /* {{{ */ { - zend_bool old, ini; + bool old, ini; if (ZSTR_LEN(entry->name) == sizeof("phar.readonly")-1) { old = PHAR_G(readonly_orig); @@ -56,16 +56,16 @@ ZEND_INI_MH(phar_ini_modify_handler) /* {{{ */ } if (ZSTR_LEN(new_value) == 2 && !strcasecmp("on", ZSTR_VAL(new_value))) { - ini = (zend_bool) 1; + ini = (bool) 1; } else if (ZSTR_LEN(new_value) == 3 && !strcasecmp("yes", ZSTR_VAL(new_value))) { - ini = (zend_bool) 1; + ini = (bool) 1; } else if (ZSTR_LEN(new_value) == 4 && !strcasecmp("true", ZSTR_VAL(new_value))) { - ini = (zend_bool) 1; + ini = (bool) 1; } else { - ini = (zend_bool) atoi(ZSTR_VAL(new_value)); + ini = (bool) atoi(ZSTR_VAL(new_value)); } /* do not allow unsetting in runtime */ @@ -495,7 +495,7 @@ void phar_entry_remove(phar_entry_data *idata, char **error) /* {{{ */ /** * Open an already loaded phar */ -int phar_open_parsed_phar(char *fname, size_t fname_len, char *alias, size_t alias_len, zend_bool is_data, uint32_t options, phar_archive_data** pphar, char **error) /* {{{ */ +int phar_open_parsed_phar(char *fname, size_t fname_len, char *alias, size_t alias_len, bool is_data, uint32_t options, phar_archive_data** pphar, char **error) /* {{{ */ { phar_archive_data *phar; #ifdef PHP_WIN32 @@ -601,7 +601,7 @@ void phar_metadata_tracker_try_ensure_has_serialized_data(phar_metadata_tracker */ int phar_metadata_tracker_unserialize_or_copy(phar_metadata_tracker *tracker, zval *metadata, int persistent, HashTable *unserialize_options, const char* method_name) /* {{{ */ { - const zend_bool has_unserialize_options = unserialize_options != NULL && zend_hash_num_elements(unserialize_options) > 0; + const bool has_unserialize_options = unserialize_options != NULL && zend_hash_num_elements(unserialize_options) > 0; /* It should be impossible to create a zval in a persistent phar/entry. */ ZEND_ASSERT(!persistent || Z_ISUNDEF(tracker->val)); @@ -640,7 +640,7 @@ int phar_metadata_tracker_unserialize_or_copy(phar_metadata_tracker *tracker, zv /** * Check if this has any data, serialized or as a raw value. */ -zend_bool phar_metadata_tracker_has_data(const phar_metadata_tracker *tracker, int persistent) /* {{{ */ +bool phar_metadata_tracker_has_data(const phar_metadata_tracker *tracker, int persistent) /* {{{ */ { ZEND_ASSERT(!persistent || Z_ISUNDEF(tracker->val)); return !Z_ISUNDEF(tracker->val) || tracker->str != NULL; @@ -1116,11 +1116,11 @@ static int phar_parse_pharfile(php_stream *fp, char *fname, size_t fname_len, ch /* set up our manifest */ zend_hash_init(&mydata->manifest, manifest_count, - zend_get_hash_value, destroy_phar_manifest_entry, (zend_bool)mydata->is_persistent); + zend_get_hash_value, destroy_phar_manifest_entry, (bool)mydata->is_persistent); zend_hash_init(&mydata->mounted_dirs, 5, - zend_get_hash_value, NULL, (zend_bool)mydata->is_persistent); + zend_get_hash_value, NULL, (bool)mydata->is_persistent); zend_hash_init(&mydata->virtual_dirs, manifest_count * 2, - zend_get_hash_value, NULL, (zend_bool)mydata->is_persistent); + zend_get_hash_value, NULL, (bool)mydata->is_persistent); mydata->fname = pestrndup(fname, fname_len, mydata->is_persistent); #ifdef PHP_WIN32 phar_unixify_path_separators(mydata->fname, fname_len); @@ -1311,7 +1311,7 @@ static int phar_parse_pharfile(php_stream *fp, char *fname, size_t fname_len, ch /** * Create or open a phar for writing */ -int phar_open_or_create_filename(char *fname, size_t fname_len, char *alias, size_t alias_len, zend_bool is_data, uint32_t options, phar_archive_data** pphar, char **error) /* {{{ */ +int phar_open_or_create_filename(char *fname, size_t fname_len, char *alias, size_t alias_len, bool is_data, uint32_t options, phar_archive_data** pphar, char **error) /* {{{ */ { const char *ext_str, *z; char *my_error; @@ -1388,7 +1388,7 @@ check_file: } /* }}} */ -int phar_create_or_parse_filename(char *fname, size_t fname_len, char *alias, size_t alias_len, zend_bool is_data, uint32_t options, phar_archive_data** pphar, char **error) /* {{{ */ +int phar_create_or_parse_filename(char *fname, size_t fname_len, char *alias, size_t alias_len, bool is_data, uint32_t options, phar_archive_data** pphar, char **error) /* {{{ */ { phar_archive_data *mydata; php_stream *fp; @@ -1473,7 +1473,7 @@ int phar_create_or_parse_filename(char *fname, size_t fname_len, char *alias, si zend_hash_init(&mydata->mounted_dirs, sizeof(char *), zend_get_hash_value, NULL, 0); zend_hash_init(&mydata->virtual_dirs, sizeof(char *), - zend_get_hash_value, NULL, (zend_bool)mydata->is_persistent); + zend_get_hash_value, NULL, (bool)mydata->is_persistent); mydata->fname_len = fname_len; snprintf(mydata->version, sizeof(mydata->version), "%s", PHP_PHAR_API_VERSION); mydata->is_temporary_alias = alias ? 0 : 1; diff --git a/ext/phar/phar_internal.h b/ext/phar/phar_internal.h index f959cb29bc..dab3688ba4 100644 --- a/ext/phar/phar_internal.h +++ b/ext/phar/phar_internal.h @@ -141,9 +141,9 @@ ZEND_BEGIN_MODULE_GLOBALS(phar) int persist; int has_zlib; int has_bz2; - zend_bool readonly_orig; - zend_bool require_hash_orig; - zend_bool intercepted; + bool readonly_orig; + bool require_hash_orig; + bool intercepted; int request_init; int require_hash; int request_done; @@ -532,12 +532,12 @@ void phar_destroy_phar_data(phar_archive_data *phar); int phar_open_entry_file(phar_archive_data *phar, phar_entry_info *entry, char **error); int phar_postprocess_file(phar_entry_data *idata, uint32_t crc32, char **error, int process_zip); int phar_open_from_filename(char *fname, size_t fname_len, char *alias, size_t alias_len, uint32_t options, phar_archive_data** pphar, char **error); -int phar_open_or_create_filename(char *fname, size_t fname_len, char *alias, size_t alias_len, zend_bool is_data, uint32_t options, phar_archive_data** pphar, char **error); -int phar_create_or_parse_filename(char *fname, size_t fname_len, char *alias, size_t alias_len, zend_bool is_data, uint32_t options, phar_archive_data** pphar, char **error); +int phar_open_or_create_filename(char *fname, size_t fname_len, char *alias, size_t alias_len, bool is_data, uint32_t options, phar_archive_data** pphar, char **error); +int phar_create_or_parse_filename(char *fname, size_t fname_len, char *alias, size_t alias_len, bool is_data, uint32_t options, phar_archive_data** pphar, char **error); int phar_open_executed_filename(char *alias, size_t alias_len, char **error); int phar_free_alias(phar_archive_data *phar, char *alias, size_t alias_len); int phar_get_archive(phar_archive_data **archive, char *fname, size_t fname_len, char *alias, size_t alias_len, char **error); -int phar_open_parsed_phar(char *fname, size_t fname_len, char *alias, size_t alias_len, zend_bool is_data, uint32_t options, phar_archive_data** pphar, char **error); +int phar_open_parsed_phar(char *fname, size_t fname_len, char *alias, size_t alias_len, bool is_data, uint32_t options, phar_archive_data** pphar, char **error); int phar_verify_signature(php_stream *fp, size_t end_of_phar, uint32_t sig_type, char *sig, size_t sig_len, char *fname, char **signature, size_t *signature_len, char **error); int phar_create_signature(phar_archive_data *phar, php_stream *fp, char **signature, size_t *signature_length, char **error); @@ -553,7 +553,7 @@ zend_string *phar_find_in_include_path(char *file, size_t file_len, phar_archive char *phar_fix_filepath(char *path, size_t *new_len, int use_cwd); phar_entry_info * phar_open_jit(phar_archive_data *phar, phar_entry_info *entry, char **error); void phar_parse_metadata_lazy(const char *buffer, phar_metadata_tracker *tracker, uint32_t zip_metadata_len, int persistent); -zend_bool phar_metadata_tracker_has_data(const phar_metadata_tracker* tracker, int persistent); +bool phar_metadata_tracker_has_data(const phar_metadata_tracker* tracker, int persistent); /* If this has data, free it and set all values to undefined. */ void phar_metadata_tracker_free(phar_metadata_tracker* val, int persistent); void phar_metadata_tracker_copy(phar_metadata_tracker* dest, const phar_metadata_tracker *source, int persistent); diff --git a/ext/phar/phar_object.c b/ext/phar/phar_object.c index a4965d9335..7fa1b963ef 100644 --- a/ext/phar/phar_object.c +++ b/ext/phar/phar_object.c @@ -395,7 +395,7 @@ PHP_METHOD(Phar, running) { char *fname, *arch, *entry; size_t fname_len, arch_len, entry_len; - zend_bool retphar = 1; + bool retphar = 1; if (zend_parse_parameters(ZEND_NUM_ARGS(), "|b", &retphar) == FAILURE) { RETURN_THROWS(); @@ -1049,7 +1049,7 @@ PHP_METHOD(Phar, isValidPharFilename) size_t fname_len; size_t ext_len; int is_executable; - zend_bool executable = 1; + bool executable = 1; if (zend_parse_parameters(ZEND_NUM_ARGS(), "p|b", &fname, &fname_len, &executable) == FAILURE) { RETURN_THROWS(); @@ -1106,7 +1106,7 @@ PHP_METHOD(Phar, __construct) char *fname, *alias = NULL, *error, *arch = NULL, *entry = NULL, *save_fname; size_t fname_len, alias_len = 0; size_t arch_len, entry_len; - zend_bool is_data; + bool is_data; zend_long flags = SPL_FILE_DIR_SKIPDOTS|SPL_FILE_DIR_UNIXPATHS; zend_long format = 0; phar_archive_object *phar_obj; @@ -1376,7 +1376,7 @@ struct _phar_t { static int phar_build(zend_object_iterator *iter, void *puser) /* {{{ */ { zval *value; - zend_bool close_fp = 1; + bool close_fp = 1; struct _phar_t *p_obj = (struct _phar_t*) puser; size_t str_key_len, base_len = p_obj->l; phar_entry_data *data; @@ -1698,7 +1698,7 @@ PHP_METHOD(Phar, buildFromDirectory) { char *dir, *error, *regex = NULL; size_t dir_len, regex_len = 0; - zend_bool apply_reg = 0; + bool apply_reg = 0; zval arg, arg2, iter, iteriter, regexiter; struct _phar_t pass; @@ -2341,7 +2341,7 @@ PHP_METHOD(Phar, convertToExecutable) uint32_t flags; zend_object *ret; zend_long format, method; - zend_bool format_is_null = 1, method_is_null = 1; + bool format_is_null = 1, method_is_null = 1; if (zend_parse_parameters(ZEND_NUM_ARGS(), "|l!l!s!", &format, &format_is_null, &method, &method_is_null, &ext, &ext_len) == FAILURE) { RETURN_THROWS(); @@ -2452,7 +2452,7 @@ PHP_METHOD(Phar, convertToData) uint32_t flags; zend_object *ret; zend_long format, method; - zend_bool format_is_null = 1, method_is_null = 1; + bool format_is_null = 1, method_is_null = 1; if (zend_parse_parameters(ZEND_NUM_ARGS(), "|l!l!s!", &format, &format_is_null, &method, &method_is_null, &ext, &ext_len) == FAILURE) { RETURN_THROWS(); @@ -4097,7 +4097,7 @@ PHP_METHOD(Phar, delMetadata) } /* }}} */ -static int phar_extract_file(zend_bool overwrite, phar_entry_info *entry, char *dest, size_t dest_len, char **error) /* {{{ */ +static int phar_extract_file(bool overwrite, phar_entry_info *entry, char *dest, size_t dest_len, char **error) /* {{{ */ { php_stream_statbuf ssb; size_t len; @@ -4279,7 +4279,7 @@ static int phar_extract_file(zend_bool overwrite, phar_entry_info *entry, char * } /* }}} */ -static int extract_helper(phar_archive_data *archive, zend_string *search, char *pathto, size_t pathto_len, zend_bool overwrite, char **error) { /* {{{ */ +static int extract_helper(phar_archive_data *archive, zend_string *search, char *pathto, size_t pathto_len, bool overwrite, char **error) { /* {{{ */ int extracted = 0; phar_entry_info *entry; @@ -4319,7 +4319,7 @@ PHP_METHOD(Phar, extractTo) int ret; zval *zval_file; HashTable *files_ht = NULL; - zend_bool overwrite = 0; + bool overwrite = 0; char *error = NULL; ZEND_PARSE_PARAMETERS_START(1, 3) @@ -4524,7 +4524,7 @@ PHP_METHOD(PharFileInfo, getCompressedSize) PHP_METHOD(PharFileInfo, isCompressed) { zend_long method; - zend_bool method_is_null = 1; + bool method_is_null = 1; if (zend_parse_parameters(ZEND_NUM_ARGS(), "|l!", &method, &method_is_null) == FAILURE) { RETURN_THROWS(); diff --git a/ext/phar/stream.c b/ext/phar/stream.c index 91ed30cf03..5fac84da32 100644 --- a/ext/phar/stream.c +++ b/ext/phar/stream.c @@ -480,7 +480,7 @@ static int phar_stream_flush(php_stream *stream) /* {{{ */ /** * stat an opened phar file handle stream, used by phar_stat() */ -void phar_dostat(phar_archive_data *phar, phar_entry_info *data, php_stream_statbuf *ssb, zend_bool is_temp_dir) +void phar_dostat(phar_archive_data *phar, phar_entry_info *data, php_stream_statbuf *ssb, bool is_temp_dir) { memset(ssb, 0, sizeof(php_stream_statbuf)); diff --git a/ext/phar/tar.c b/ext/phar/tar.c index bae1a4bf7b..890a90b515 100644 --- a/ext/phar/tar.c +++ b/ext/phar/tar.c @@ -242,11 +242,11 @@ int phar_parse_tarfile(php_stream* fp, char *fname, size_t fname_len, char *alia myphar->is_persistent = PHAR_G(persist); /* estimate number of entries, can't be certain with tar files */ zend_hash_init(&myphar->manifest, 2 + (totalsize >> 12), - zend_get_hash_value, destroy_phar_manifest_entry, (zend_bool)myphar->is_persistent); + zend_get_hash_value, destroy_phar_manifest_entry, (bool)myphar->is_persistent); zend_hash_init(&myphar->mounted_dirs, 5, - zend_get_hash_value, NULL, (zend_bool)myphar->is_persistent); + zend_get_hash_value, NULL, (bool)myphar->is_persistent); zend_hash_init(&myphar->virtual_dirs, 4 + (totalsize >> 11), - zend_get_hash_value, NULL, (zend_bool)myphar->is_persistent); + zend_get_hash_value, NULL, (bool)myphar->is_persistent); myphar->is_tar = 1; /* remember whether this entire phar was compressed with gz/bzip2 */ myphar->flags = compression; diff --git a/ext/phar/zip.c b/ext/phar/zip.c index eb683a886c..de37faaab7 100644 --- a/ext/phar/zip.c +++ b/ext/phar/zip.c @@ -303,11 +303,11 @@ foundit: php_stream_seek(fp, PHAR_GET_32(locator.cdir_offset), SEEK_SET); /* read in central directory */ zend_hash_init(&mydata->manifest, PHAR_GET_16(locator.count), - zend_get_hash_value, destroy_phar_manifest_entry, (zend_bool)mydata->is_persistent); + zend_get_hash_value, destroy_phar_manifest_entry, (bool)mydata->is_persistent); zend_hash_init(&mydata->mounted_dirs, 5, - zend_get_hash_value, NULL, (zend_bool)mydata->is_persistent); + zend_get_hash_value, NULL, (bool)mydata->is_persistent); zend_hash_init(&mydata->virtual_dirs, PHAR_GET_16(locator.count) * 2, - zend_get_hash_value, NULL, (zend_bool)mydata->is_persistent); + zend_get_hash_value, NULL, (bool)mydata->is_persistent); entry.phar = mydata; entry.is_zip = 1; entry.fp_type = PHAR_FP; diff --git a/ext/pspell/pspell.c b/ext/pspell/pspell.c index 4253f5f159..8975519955 100644 --- a/ext/pspell/pspell.c +++ b/ext/pspell/pspell.c @@ -645,7 +645,7 @@ PHP_FUNCTION(pspell_config_create) PHP_FUNCTION(pspell_config_runtogether) { zval *zcfg; - zend_bool runtogether; + bool runtogether; PspellConfig *config; if (zend_parse_parameters(ZEND_NUM_ARGS(), "Ob", &zcfg, php_pspell_config_ce, &runtogether) == FAILURE) { @@ -773,7 +773,7 @@ PHP_FUNCTION(pspell_config_repl) PHP_FUNCTION(pspell_config_save_repl) { zval *zcfg; - zend_bool save; + bool save; PspellConfig *config; if (zend_parse_parameters(ZEND_NUM_ARGS(), "Ob", &zcfg, php_pspell_config_ce, &save) == FAILURE) { diff --git a/ext/reflection/php_reflection.c b/ext/reflection/php_reflection.c index 4debb4c7e6..90470acdc2 100644 --- a/ext/reflection/php_reflection.c +++ b/ext/reflection/php_reflection.c @@ -48,7 +48,7 @@ /* Key used to avoid leaking addresses in ReflectionProperty::getId() */ #define REFLECTION_KEY_LEN 16 ZEND_BEGIN_MODULE_GLOBALS(reflection) - zend_bool key_initialized; + bool key_initialized; unsigned char key[REFLECTION_KEY_LEN]; ZEND_END_MODULE_GLOBALS(reflection) ZEND_DECLARE_MODULE_GLOBALS(reflection) @@ -125,7 +125,7 @@ typedef struct _property_reference { /* Struct for parameters */ typedef struct _parameter_reference { uint32_t offset; - zend_bool required; + bool required; struct _zend_arg_info *arg_info; zend_function *fptr; } parameter_reference; @@ -134,7 +134,7 @@ typedef struct _parameter_reference { typedef struct _type_reference { zend_type type; /* Whether to use backwards compatible null representation */ - zend_bool legacy_behavior; + bool legacy_behavior; } type_reference; /* Struct for attributes */ @@ -180,7 +180,7 @@ static zend_always_inline uint32_t prop_get_flags(property_reference *ref) { return ref->prop ? ref->prop->flags : ZEND_ACC_PUBLIC; } -static inline zend_bool is_closure_invoke(zend_class_entry *ce, zend_string *lcname) { +static inline bool is_closure_invoke(zend_class_entry *ce, zend_string *lcname) { return ce == zend_ce_closure && zend_string_equals_literal(lcname, ZEND_INVOKE_FUNC_NAME); } @@ -645,13 +645,13 @@ static int format_default_value(smart_str *str, zval *value, zend_class_entry *s return SUCCESS; } -static inline zend_bool has_internal_arg_info(const zend_function *fptr) { +static inline bool has_internal_arg_info(const zend_function *fptr) { return fptr->type == ZEND_INTERNAL_FUNCTION && !(fptr->common.fn_flags & ZEND_ACC_USER_ARG_INFO); } /* {{{ _parameter_string */ -static void _parameter_string(smart_str *str, zend_function *fptr, struct _zend_arg_info *arg_info, uint32_t offset, zend_bool required, char* indent) +static void _parameter_string(smart_str *str, zend_function *fptr, struct _zend_arg_info *arg_info, uint32_t offset, bool required, char* indent) { smart_str_append_printf(str, "Parameter #%d [ ", offset); if (!required) { @@ -1277,7 +1277,7 @@ static void reflection_extension_factory(zval *object, const char *name_str) /* }}} */ /* {{{ reflection_parameter_factory */ -static void reflection_parameter_factory(zend_function *fptr, zval *closure_object, struct _zend_arg_info *arg_info, uint32_t offset, zend_bool required, zval *object) +static void reflection_parameter_factory(zend_function *fptr, zval *closure_object, struct _zend_arg_info *arg_info, uint32_t offset, bool required, zval *object) { reflection_object *intern; parameter_reference *reference; @@ -1309,7 +1309,7 @@ static void reflection_parameter_factory(zend_function *fptr, zval *closure_obje /* For backwards compatibility reasons, we need to return T|null style unions * as a ReflectionNamedType. Here we determine what counts as a union type and * what doesn't. */ -static zend_bool is_union_type(zend_type type) { +static bool is_union_type(zend_type type) { if (ZEND_TYPE_HAS_LIST(type)) { return 1; } @@ -1325,12 +1325,12 @@ static zend_bool is_union_type(zend_type type) { } /* {{{ reflection_type_factory */ -static void reflection_type_factory(zend_type type, zval *object, zend_bool legacy_behavior) +static void reflection_type_factory(zend_type type, zval *object, bool legacy_behavior) { reflection_object *intern; type_reference *reference; - zend_bool is_union = is_union_type(type); - zend_bool is_mixed = ZEND_TYPE_PURE_MASK(type) == MAY_BE_ANY; + bool is_union = is_union_type(type); + bool is_mixed = ZEND_TYPE_PURE_MASK(type) == MAY_BE_ANY; reflection_instantiate(is_union && !is_mixed ? reflection_union_type_ptr : reflection_named_type_ptr, object); intern = Z_REFLECTION_P(object); @@ -2240,7 +2240,7 @@ ZEND_METHOD(ReflectionParameter, __construct) struct _zend_arg_info *arg_info; uint32_t num_args; zend_class_entry *ce = NULL; - zend_bool is_closure = 0; + bool is_closure = 0; ZEND_PARSE_PARAMETERS_START(2, 2) Z_PARAM_ZVAL(reference) @@ -3508,7 +3508,7 @@ ZEND_METHOD(ReflectionMethod, getPrototype) ZEND_METHOD(ReflectionMethod, setAccessible) { reflection_object *intern; - zend_bool visible; + bool visible; if (zend_parse_parameters(ZEND_NUM_ARGS(), "b", &visible) == FAILURE) { RETURN_THROWS(); @@ -3755,7 +3755,7 @@ ZEND_METHOD(ReflectionClass, __construct) /* }}} */ /* {{{ add_class_vars */ -static void add_class_vars(zend_class_entry *ce, zend_bool statics, zval *return_value) +static void add_class_vars(zend_class_entry *ce, bool statics, zval *return_value) { zend_property_info *prop_info; zval *prop, prop_copy; @@ -3767,7 +3767,7 @@ static void add_class_vars(zend_class_entry *ce, zend_bool statics, zval *return continue; } - zend_bool is_static = (prop_info->flags & ZEND_ACC_STATIC) != 0; + bool is_static = (prop_info->flags & ZEND_ACC_STATIC) != 0; if (statics != is_static) { continue; } @@ -4199,7 +4199,7 @@ ZEND_METHOD(ReflectionClass, getMethods) zend_class_entry *ce; zend_function *mptr; zend_long filter; - zend_bool filter_is_null = 1; + bool filter_is_null = 1; if (zend_parse_parameters(ZEND_NUM_ARGS(), "|l!", &filter, &filter_is_null) == FAILURE) { RETURN_THROWS(); @@ -4217,7 +4217,7 @@ ZEND_METHOD(ReflectionClass, getMethods) } ZEND_HASH_FOREACH_END(); if (instanceof_function(ce, zend_ce_closure)) { - zend_bool has_obj = Z_TYPE(intern->obj) != IS_UNDEF; + bool has_obj = Z_TYPE(intern->obj) != IS_UNDEF; zval obj_tmp; zend_object *obj; if (!has_obj) { @@ -4375,7 +4375,7 @@ ZEND_METHOD(ReflectionClass, getProperties) zend_string *key; zend_property_info *prop_info; zend_long filter; - zend_bool filter_is_null = 1; + bool filter_is_null = 1; if (zend_parse_parameters(ZEND_NUM_ARGS(), "|l!", &filter, &filter_is_null) == FAILURE) { RETURN_THROWS(); @@ -4431,7 +4431,7 @@ ZEND_METHOD(ReflectionClass, getConstants) zend_class_constant *constant; zval val; zend_long filter; - zend_bool filter_is_null = 1; + bool filter_is_null = 1; if (zend_parse_parameters(ZEND_NUM_ARGS(), "|l!", &filter, &filter_is_null) == FAILURE) { RETURN_THROWS(); @@ -4465,7 +4465,7 @@ ZEND_METHOD(ReflectionClass, getReflectionConstants) zend_string *name; zend_class_constant *constant; zend_long filter; - zend_bool filter_is_null = 1; + bool filter_is_null = 1; if (zend_parse_parameters(ZEND_NUM_ARGS(), "|l!", &filter, &filter_is_null) == FAILURE) { RETURN_THROWS(); @@ -5511,7 +5511,7 @@ ZEND_METHOD(ReflectionProperty, getAttributes) ZEND_METHOD(ReflectionProperty, setAccessible) { reflection_object *intern; - zend_bool visible; + bool visible; if (zend_parse_parameters(ZEND_NUM_ARGS(), "b", &visible) == FAILURE) { RETURN_THROWS(); @@ -5789,7 +5789,7 @@ ZEND_METHOD(ReflectionExtension, getINIEntries) /* }}} */ /* {{{ add_extension_class */ -static void add_extension_class(zend_class_entry *ce, zend_string *key, zval *class_array, zend_module_entry *module, zend_bool add_reflection_class) +static void add_extension_class(zend_class_entry *ce, zend_string *key, zval *class_array, zend_module_entry *module, bool add_reflection_class) { if (ce->type == ZEND_INTERNAL_CLASS && ce->info.internal.module && !strcasecmp(ce->info.internal.module->name, module->name)) { zend_string *name; @@ -6108,7 +6108,7 @@ ZEND_METHOD(ReflectionReference, __construct) } /* }}} */ -static zend_bool is_ignorable_reference(HashTable *ht, zval *ref) { +static bool is_ignorable_reference(HashTable *ht, zval *ref) { if (Z_REFCOUNT_P(ref) != 1) { return 0; } diff --git a/ext/session/mod_user.c b/ext/session/mod_user.c index b41b742cba..977d0c0157 100644 --- a/ext/session/mod_user.c +++ b/ext/session/mod_user.c @@ -108,7 +108,7 @@ PS_OPEN_FUNC(user) PS_CLOSE_FUNC(user) { - zend_bool bailout = 0; + bool bailout = 0; STDVARS; if (!PS(mod_user_implemented)) { diff --git a/ext/session/php_session.h b/ext/session/php_session.h index c365975fb5..a18b075dab 100644 --- a/ext/session/php_session.h +++ b/ext/session/php_session.h @@ -128,8 +128,8 @@ typedef struct _php_session_rfc1867_progress { zend_long update_step; zend_long next_update; double next_update_time; - zend_bool cancel_upload; - zend_bool apply_trans_sid; + bool cancel_upload; + bool apply_trans_sid; size_t content_length; zval data; /* the array exported to session data */ @@ -148,8 +148,8 @@ typedef struct _php_ps_globals { zend_long cookie_lifetime; char *cookie_path; char *cookie_domain; - zend_bool cookie_secure; - zend_bool cookie_httponly; + bool cookie_secure; + bool cookie_httponly; char *cookie_samesite; const ps_module *mod; const ps_module *default_mod; @@ -178,10 +178,10 @@ typedef struct _php_ps_globals { int mod_user_is_open; const struct ps_serializer_struct *serializer; zval http_session_vars; - zend_bool auto_start; - zend_bool use_cookies; - zend_bool use_only_cookies; - zend_bool use_trans_sid; /* contains the INI value of whether to use trans-sid */ + bool auto_start; + bool use_cookies; + bool use_only_cookies; + bool use_trans_sid; /* contains the INI value of whether to use trans-sid */ zend_long sid_length; zend_long sid_bits_per_character; @@ -189,17 +189,17 @@ typedef struct _php_ps_globals { int define_sid; php_session_rfc1867_progress *rfc1867_progress; - zend_bool rfc1867_enabled; /* session.upload_progress.enabled */ - zend_bool rfc1867_cleanup; /* session.upload_progress.cleanup */ + bool rfc1867_enabled; /* session.upload_progress.enabled */ + bool rfc1867_cleanup; /* session.upload_progress.cleanup */ char *rfc1867_prefix; /* session.upload_progress.prefix */ char *rfc1867_name; /* session.upload_progress.name */ zend_long rfc1867_freq; /* session.upload_progress.freq */ double rfc1867_min_freq; /* session.upload_progress.min_freq */ - zend_bool use_strict_mode; /* whether or not PHP accepts unknown session ids */ - zend_bool lazy_write; /* omit session write when it is possible */ - zend_bool in_save_handler; /* state if session is in save handler or not */ - zend_bool set_handler; /* state if session module i setting handler or not */ + bool use_strict_mode; /* whether or not PHP accepts unknown session ids */ + bool lazy_write; /* omit session write when it is possible */ + bool in_save_handler; /* state if session is in save handler or not */ + bool set_handler; /* state if session module i setting handler or not */ zend_string *session_vars; /* serialized original session data */ } php_ps_globals; diff --git a/ext/session/session.c b/ext/session/session.c index dd57b6ad05..5eda7eae8e 100644 --- a/ext/session/session.c +++ b/ext/session/session.c @@ -359,7 +359,7 @@ PHPAPI int php_session_valid_key(const char *key) /* {{{ */ /* }}} */ -static zend_long php_session_gc(zend_bool immediate) /* {{{ */ +static zend_long php_session_gc(bool immediate) /* {{{ */ { int nrand; zend_long num = -1; @@ -605,9 +605,9 @@ static PHP_INI_MH(OnUpdateTransSid) /* {{{ */ SESSION_CHECK_OUTPUT_STATE; if (!strncasecmp(ZSTR_VAL(new_value), "on", sizeof("on"))) { - PS(use_trans_sid) = (zend_bool) 1; + PS(use_trans_sid) = (bool) 1; } else { - PS(use_trans_sid) = (zend_bool) atoi(ZSTR_VAL(new_value)); + PS(use_trans_sid) = (bool) atoi(ZSTR_VAL(new_value)); } return SUCCESS; @@ -1428,7 +1428,7 @@ PHPAPI int php_session_reset_id(void) /* {{{ */ { int module_number = PS(module_number); zval *sid, *data, *ppid; - zend_bool apply_trans_sid; + bool apply_trans_sid; if (!PS(id)) { php_error_docref(NULL, E_WARNING, "Cannot set session ID - session ID is not initialized"); @@ -1674,8 +1674,8 @@ PHP_FUNCTION(session_set_cookie_params) HashTable *options_ht; zend_long lifetime_long; zend_string *lifetime = NULL, *path = NULL, *domain = NULL, *samesite = NULL; - zend_bool secure = 0, secure_null = 1; - zend_bool httponly = 0, httponly_null = 1; + bool secure = 0, secure_null = 1; + bool httponly = 0, httponly_null = 1; zend_string *ini_name; int result; int found = 0; @@ -1961,7 +1961,7 @@ PHP_FUNCTION(session_set_save_handler) zval *obj = NULL; zend_string *func_name; zend_function *current_mptr; - zend_bool register_shutdown = 1; + bool register_shutdown = 1; if (zend_parse_parameters(ZEND_NUM_ARGS(), "O|b", &obj, php_session_iface_entry, ®ister_shutdown) == FAILURE) { RETURN_THROWS(); @@ -2184,7 +2184,7 @@ PHP_FUNCTION(session_id) /* {{{ Update the current session id with a newly generated one. If delete_old_session is set to true, remove the old session. */ PHP_FUNCTION(session_regenerate_id) { - zend_bool del_ses = 0; + bool del_ses = 0; zend_string *data; if (zend_parse_parameters(ZEND_NUM_ARGS(), "|b", &del_ses) == FAILURE) { @@ -2378,7 +2378,7 @@ PHP_FUNCTION(session_cache_limiter) PHP_FUNCTION(session_cache_expire) { zend_long expires; - zend_bool expires_is_null = 1; + bool expires_is_null = 1; if (zend_parse_parameters(ZEND_NUM_ARGS(), "|l!", &expires, &expires_is_null) == FAILURE) { RETURN_THROWS(); @@ -2686,7 +2686,7 @@ PHP_FUNCTION(session_register_shutdown) * Module Setup and Destruction * ******************************** */ -static int php_rinit_session(zend_bool auto_start) /* {{{ */ +static int php_rinit_session(bool auto_start) /* {{{ */ { php_rinit_session_globals(); @@ -2903,7 +2903,7 @@ static const zend_module_dep session_deps[] = { /* {{{ */ * Upload hook handling * ************************ */ -static zend_bool early_find_sid_in(zval *dest, int where, php_session_rfc1867_progress *progress) /* {{{ */ +static bool early_find_sid_in(zval *dest, int where, php_session_rfc1867_progress *progress) /* {{{ */ { zval *ppid; @@ -2938,7 +2938,7 @@ static void php_session_rfc1867_early_find_sid(php_session_rfc1867_progress *pro early_find_sid_in(&progress->sid, TRACK_VARS_GET, progress); } /* }}} */ -static zend_bool php_check_cancel_upload(php_session_rfc1867_progress *progress) /* {{{ */ +static bool php_check_cancel_upload(php_session_rfc1867_progress *progress) /* {{{ */ { zval *progress_ary, *cancel_upload; diff --git a/ext/simplexml/simplexml.c b/ext/simplexml/simplexml.c index c941e43ad3..32899e576c 100644 --- a/ext/simplexml/simplexml.c +++ b/ext/simplexml/simplexml.c @@ -218,7 +218,7 @@ next_iter: /* }}} */ /* {{{ sxe_prop_dim_read() */ -static zval *sxe_prop_dim_read(zend_object *object, zval *member, zend_bool elements, zend_bool attribs, int type, zval *rv) +static zval *sxe_prop_dim_read(zend_object *object, zval *member, bool elements, bool attribs, int type, zval *rv) { php_sxe_object *sxe; char *name; @@ -386,7 +386,7 @@ static void change_node_zval(xmlNodePtr node, zend_string *value) /* }}} */ /* {{{ sxe_property_write() */ -static zval *sxe_prop_dim_write(zend_object *object, zval *member, zval *value, zend_bool elements, zend_bool attribs, xmlNodePtr *pnewnode) +static zval *sxe_prop_dim_write(zend_object *object, zval *member, zval *value, bool elements, bool attribs, xmlNodePtr *pnewnode) { php_sxe_object *sxe; xmlNodePtr node; @@ -674,7 +674,7 @@ static zval *sxe_property_get_adr(zend_object *object, zend_string *zname, int f /* }}} */ /* {{{ sxe_prop_dim_exists() */ -static int sxe_prop_dim_exists(zend_object *object, zval *member, int check_empty, zend_bool elements, zend_bool attribs) +static int sxe_prop_dim_exists(zend_object *object, zval *member, int check_empty, bool elements, bool attribs) { php_sxe_object *sxe; xmlNodePtr node; @@ -795,7 +795,7 @@ static int sxe_dimension_exists(zend_object *object, zval *member, int check_emp /* }}} */ /* {{{ sxe_prop_dim_delete() */ -static void sxe_prop_dim_delete(zend_object *object, zval *member, zend_bool elements, zend_bool attribs) +static void sxe_prop_dim_delete(zend_object *object, zval *member, bool elements, bool attribs) { php_sxe_object *sxe; xmlNodePtr node; @@ -1479,7 +1479,7 @@ static inline void sxe_add_namespace_name(zval *return_value, xmlNsPtr ns) /* {{ } /* }}} */ -static void sxe_add_namespaces(php_sxe_object *sxe, xmlNodePtr node, zend_bool recursive, zval *return_value) /* {{{ */ +static void sxe_add_namespaces(php_sxe_object *sxe, xmlNodePtr node, bool recursive, zval *return_value) /* {{{ */ { xmlAttrPtr attr; @@ -1509,7 +1509,7 @@ static void sxe_add_namespaces(php_sxe_object *sxe, xmlNodePtr node, zend_bool r /* {{{ Return all namespaces in use */ SXE_METHOD(getNamespaces) { - zend_bool recursive = 0; + bool recursive = 0; php_sxe_object *sxe; xmlNodePtr node; @@ -1533,7 +1533,7 @@ SXE_METHOD(getNamespaces) } /* }}} */ -static void sxe_add_registered_namespaces(php_sxe_object *sxe, xmlNodePtr node, zend_bool recursive, zval *return_value) /* {{{ */ +static void sxe_add_registered_namespaces(php_sxe_object *sxe, xmlNodePtr node, bool recursive, zval *return_value) /* {{{ */ { xmlNsPtr ns; @@ -1557,7 +1557,7 @@ static void sxe_add_registered_namespaces(php_sxe_object *sxe, xmlNodePtr node, /* {{{ Return all namespaces registered with document */ SXE_METHOD(getDocNamespaces) { - zend_bool recursive = 0, from_root = 1; + bool recursive = 0, from_root = 1; php_sxe_object *sxe; xmlNodePtr node; @@ -1593,7 +1593,7 @@ SXE_METHOD(children) char *nsprefix = NULL; size_t nsprefix_len = 0; xmlNodePtr node; - zend_bool isprefix = 0; + bool isprefix = 0; if (zend_parse_parameters(ZEND_NUM_ARGS(), "|s!b", &nsprefix, &nsprefix_len, &isprefix) == FAILURE) { RETURN_THROWS(); @@ -1647,7 +1647,7 @@ SXE_METHOD(attributes) char *nsprefix = NULL; size_t nsprefix_len = 0; xmlNodePtr node; - zend_bool isprefix = 0; + bool isprefix = 0; if (zend_parse_parameters(ZEND_NUM_ARGS(), "|s!b", &nsprefix, &nsprefix_len, &isprefix) == FAILURE) { RETURN_THROWS(); @@ -2109,7 +2109,7 @@ sxe_object_clone(zend_object *object) php_sxe_object *clone; xmlNodePtr nodep = NULL; xmlDocPtr docp = NULL; - zend_bool is_root_element = sxe->node && sxe->node->node && sxe->node->node->parent + bool is_root_element = sxe->node && sxe->node->node && sxe->node->node->parent && (sxe->node->node->parent->type == XML_DOCUMENT_NODE || sxe->node->node->parent->type == XML_HTML_DOCUMENT_NODE); clone = php_sxe_object_new(sxe->zo.ce, sxe->fptr_count); @@ -2267,7 +2267,7 @@ PHP_FUNCTION(simplexml_load_file) zend_long options = 0; zend_class_entry *ce= sxe_class_entry; zend_function *fptr_count; - zend_bool isprefix = 0; + bool isprefix = 0; if (zend_parse_parameters(ZEND_NUM_ARGS(), "p|C!lsb", &filename, &filename_len, &ce, &options, &ns, &ns_len, &isprefix) == FAILURE) { RETURN_THROWS(); @@ -2312,7 +2312,7 @@ PHP_FUNCTION(simplexml_load_string) zend_long options = 0; zend_class_entry *ce= sxe_class_entry; zend_function *fptr_count; - zend_bool isprefix = 0; + bool isprefix = 0; if (zend_parse_parameters(ZEND_NUM_ARGS(), "s|C!lsb", &data, &data_len, &ce, &options, &ns, &ns_len, &isprefix) == FAILURE) { RETURN_THROWS(); @@ -2361,7 +2361,7 @@ SXE_METHOD(__construct) size_t data_len, ns_len = 0; xmlDocPtr docp; zend_long options = 0; - zend_bool is_url = 0, isprefix = 0; + bool is_url = 0, isprefix = 0; if (zend_parse_parameters(ZEND_NUM_ARGS(), "s|lbsb", &data, &data_len, &options, &is_url, &ns, &ns_len, &isprefix) == FAILURE) { RETURN_THROWS(); diff --git a/ext/snmp/snmp.c b/ext/snmp/snmp.c index e217f95961..44452369c9 100644 --- a/ext/snmp/snmp.c +++ b/ext/snmp/snmp.c @@ -1101,7 +1101,7 @@ static void php_snmp(INTERNAL_FUNCTION_PARAMETERS, int st, int version) HashTable *oid_ht, *type_ht = NULL, *value_ht = NULL; char *a1 = NULL, *a2 = NULL, *a3 = NULL, *a4 = NULL, *a5 = NULL, *a6 = NULL, *a7 = NULL; size_t a1_len, a2_len, a3_len, a4_len, a5_len, a6_len, a7_len; - zend_bool use_orignames = 0, suffix_keys = 0; + bool use_orignames = 0, suffix_keys = 0; zend_long timeout = SNMP_DEFAULT_TIMEOUT; zend_long retries = SNMP_DEFAULT_RETRIES; struct objid_query objid_query; @@ -1324,7 +1324,7 @@ PHP_FUNCTION(snmp_get_quick_print) /* {{{ Return all objects including their respective object id within the specified one */ PHP_FUNCTION(snmp_set_quick_print) { - zend_bool a1; + bool a1; if (zend_parse_parameters(ZEND_NUM_ARGS(), "b", &a1) == FAILURE) { RETURN_THROWS(); @@ -1338,7 +1338,7 @@ PHP_FUNCTION(snmp_set_quick_print) /* {{{ Return all values that are enums with their enum value instead of the raw integer */ PHP_FUNCTION(snmp_set_enum_print) { - zend_bool a1; + bool a1; if (zend_parse_parameters(ZEND_NUM_ARGS(), "b", &a1) == FAILURE) { RETURN_THROWS(); diff --git a/ext/soap/php_encoding.c b/ext/soap/php_encoding.c index b3dd853298..9ed92672db 100644 --- a/ext/soap/php_encoding.c +++ b/ext/soap/php_encoding.c @@ -279,7 +279,7 @@ static encodePtr find_encoder_by_type_name(sdlPtr sdl, const char *type) return NULL; } -static zend_bool soap_check_zval_ref(zval *data, xmlNodePtr node) { +static bool soap_check_zval_ref(zval *data, xmlNodePtr node) { xmlNodePtr node_ptr; if (SOAP_GLOBAL(ref_map)) { @@ -344,7 +344,7 @@ static zend_bool soap_check_zval_ref(zval *data, xmlNodePtr node) { return 0; } -static zend_bool soap_check_xml_ref(zval *data, xmlNodePtr node) +static bool soap_check_xml_ref(zval *data, xmlNodePtr node) { zval *data_ptr; diff --git a/ext/soap/php_http.c b/ext/soap/php_http.c index 1da286ad87..b14c8cc1a1 100644 --- a/ext/soap/php_http.c +++ b/ext/soap/php_http.c @@ -88,9 +88,9 @@ int basic_authentication(zval* this_ptr, smart_str* soap_headers) /* Additional HTTP headers */ void http_context_headers(php_stream_context* context, - zend_bool has_authorization, - zend_bool has_proxy_authorization, - zend_bool has_cookies, + bool has_authorization, + bool has_proxy_authorization, + bool has_cookies, smart_str* soap_headers) { zval *tmp; @@ -359,11 +359,11 @@ int make_http_soap_request(zval *this_ptr, zend_long redirect_max = 20; char *content_encoding; char *http_msg = NULL; - zend_bool old_allow_url_fopen; + bool old_allow_url_fopen; php_stream_context *context = NULL; - zend_bool has_authorization = 0; - zend_bool has_proxy_authorization = 0; - zend_bool has_cookies = 0; + bool has_authorization = 0; + bool has_proxy_authorization = 0; + bool has_cookies = 0; if (this_ptr == NULL || Z_TYPE_P(this_ptr) != IS_OBJECT) { return FALSE; diff --git a/ext/soap/php_http.h b/ext/soap/php_http.h index 8065fef7c9..685d9da180 100644 --- a/ext/soap/php_http.h +++ b/ext/soap/php_http.h @@ -29,8 +29,8 @@ int make_http_soap_request(zval *this_ptr, int proxy_authentication(zval* this_ptr, smart_str* soap_headers); int basic_authentication(zval* this_ptr, smart_str* soap_headers); void http_context_headers(php_stream_context* context, - zend_bool has_authorization, - zend_bool has_proxy_authorization, - zend_bool has_cookies, + bool has_authorization, + bool has_proxy_authorization, + bool has_cookies, smart_str* soap_headers); #endif diff --git a/ext/soap/php_sdl.c b/ext/soap/php_sdl.c index a331e7be01..936a304ccc 100644 --- a/ext/soap/php_sdl.c +++ b/ext/soap/php_sdl.c @@ -3169,8 +3169,8 @@ sdlPtr get_sdl(zval *this_ptr, char *uri, zend_long cache_wsdl) smart_str headers = {0}; char* key = NULL; time_t t = time(0); - zend_bool has_proxy_authorization = 0; - zend_bool has_authorization = 0; + bool has_proxy_authorization = 0; + bool has_authorization = 0; ZVAL_UNDEF(&orig_context); ZVAL_UNDEF(&new_context); diff --git a/ext/soap/php_sdl.h b/ext/soap/php_sdl.h index bd55a9618c..e3b222ebdc 100644 --- a/ext/soap/php_sdl.h +++ b/ext/soap/php_sdl.h @@ -58,7 +58,7 @@ struct _sdl { HashTable *groups; /* array of sdlTypesPtr */ char *target_ns; char *source; - zend_bool is_persistent; + bool is_persistent; }; typedef struct sdlCtx { diff --git a/ext/soap/php_soap.h b/ext/soap/php_soap.h index 652174fb3d..0b30e7ea9c 100644 --- a/ext/soap/php_soap.h +++ b/ext/soap/php_soap.h @@ -159,7 +159,7 @@ ZEND_BEGIN_MODULE_GLOBALS(soap) int cur_uniq_ns; int soap_version; sdlPtr sdl; - zend_bool use_soap_error_handler; + bool use_soap_error_handler; char* error_code; zval error_object; char cache; diff --git a/ext/soap/php_xml.c b/ext/soap/php_xml.c index df55678159..d5faa53694 100644 --- a/ext/soap/php_xml.c +++ b/ext/soap/php_xml.c @@ -78,7 +78,7 @@ xmlDocPtr soap_xmlParseFile(const char *filename) { xmlParserCtxtPtr ctxt = NULL; xmlDocPtr ret; - zend_bool old_allow_url_fopen; + bool old_allow_url_fopen; /* xmlInitParser(); @@ -89,7 +89,7 @@ xmlDocPtr soap_xmlParseFile(const char *filename) ctxt = xmlCreateFileParserCtxt(filename); PG(allow_url_fopen) = old_allow_url_fopen; if (ctxt) { - zend_bool old; + bool old; ctxt->keepBlanks = 0; ctxt->sax->ignorableWhitespace = soap_ignorableWhitespace; @@ -137,7 +137,7 @@ xmlDocPtr soap_xmlParseMemory(const void *buf, size_t buf_size) */ ctxt = xmlCreateMemoryParserCtxt(buf, buf_size); if (ctxt) { - zend_bool old; + bool old; ctxt->sax->ignorableWhitespace = soap_ignorableWhitespace; ctxt->sax->comment = soap_Comment; diff --git a/ext/soap/soap.c b/ext/soap/soap.c index 861d8ebf5d..9f19b63177 100644 --- a/ext/soap/soap.c +++ b/ext/soap/soap.c @@ -71,7 +71,7 @@ static void delete_hashtable(void *hashtable); static void soap_error_handler(int error_num, const char *error_filename, const uint32_t error_lineno, zend_string *message); #define SOAP_SERVER_BEGIN_CODE() \ - zend_bool _old_handler = SOAP_GLOBAL(use_soap_error_handler);\ + bool _old_handler = SOAP_GLOBAL(use_soap_error_handler);\ char* _old_error_code = SOAP_GLOBAL(error_code);\ zend_object* _old_error_object = Z_OBJ(SOAP_GLOBAL(error_object));\ int _old_soap_version = SOAP_GLOBAL(soap_version);\ @@ -86,11 +86,11 @@ static void soap_error_handler(int error_num, const char *error_filename, const SOAP_GLOBAL(soap_version) = _old_soap_version; #define SOAP_CLIENT_BEGIN_CODE() \ - zend_bool _old_handler = SOAP_GLOBAL(use_soap_error_handler);\ + bool _old_handler = SOAP_GLOBAL(use_soap_error_handler);\ char* _old_error_code = SOAP_GLOBAL(error_code);\ zend_object* _old_error_object = Z_OBJ(SOAP_GLOBAL(error_object));\ int _old_soap_version = SOAP_GLOBAL(soap_version);\ - zend_bool _old_in_compilation = CG(in_compilation); \ + bool _old_in_compilation = CG(in_compilation); \ zend_execute_data *_old_current_execute_data = EG(current_execute_data); \ zval *_old_stack_top = EG(vm_stack_top); \ int _bailout = 0;\ @@ -544,10 +544,10 @@ PHP_METHOD(SoapHeader, __construct) zval *data = NULL; zend_string *actor_str = NULL; zend_long actor_long; - zend_bool actor_is_null = 1; + bool actor_is_null = 1; char *name, *ns; size_t name_len, ns_len; - zend_bool must_understand = 0; + bool must_understand = 0; zval *this_ptr; ZEND_PARSE_PARAMETERS_START(2, 5) @@ -689,7 +689,7 @@ PHP_METHOD(SoapVar, __construct) { zval *data, *this_ptr; zend_long type; - zend_bool type_is_null = 1; + bool type_is_null = 1; char *stype = NULL, *ns = NULL, *name = NULL, *namens = NULL; size_t stype_len = 0, ns_len = 0, name_len = 0, namens_len = 0; @@ -1823,7 +1823,7 @@ static ZEND_NORETURN void soap_server_fault(char* code, char* string, char *acto static zend_never_inline ZEND_COLD void soap_real_error_handler(int error_num, const char *error_filename, const uint32_t error_lineno, zend_string *message) /* {{{ */ { - zend_bool _old_in_compilation; + bool _old_in_compilation; zend_execute_data *_old_current_execute_data; int _old_http_response_code; char *_old_http_status_line; @@ -1935,7 +1935,7 @@ static void soap_error_handler(int error_num, const char *error_filename, const /* {{{ */ PHP_FUNCTION(use_soap_error_handler) { - zend_bool handler = 1; + bool handler = 1; ZVAL_BOOL(return_value, SOAP_GLOBAL(use_soap_error_handler)); if (zend_parse_parameters(ZEND_NUM_ARGS(), "|b", &handler) == SUCCESS) { @@ -2188,7 +2188,7 @@ PHP_METHOD(SoapClient, __construct) } /* }}} */ -static int do_request(zval *this_ptr, xmlDoc *request, char *location, char *action, int version, zend_bool one_way, zval *response) /* {{{ */ +static int do_request(zval *this_ptr, xmlDoc *request, char *location, char *action, int version, bool one_way, zval *response) /* {{{ */ { int ret = TRUE; char *buf; @@ -2361,7 +2361,7 @@ static void do_soap_call(zend_execute_data *execute_data, fn = get_function(sdl, function); if (fn != NULL) { sdlBindingPtr binding = fn->binding; - zend_bool one_way = 0; + bool one_way = 0; if (fn->responseName == NULL && fn->responseParameters == NULL && @@ -2501,7 +2501,7 @@ static void verify_soap_headers_array(HashTable *ht) /* {{{ */ /* }}} */ /* {{{ Calls a SOAP function */ -void soap_client_call_impl(INTERNAL_FUNCTION_PARAMETERS, zend_bool is_soap_call) +void soap_client_call_impl(INTERNAL_FUNCTION_PARAMETERS, bool is_soap_call) { char *function, *location=NULL, *soap_action = NULL, *uri = NULL; size_t function_len; @@ -2515,7 +2515,7 @@ void soap_client_call_impl(INTERNAL_FUNCTION_PARAMETERS, zend_bool is_soap_call) zval *param; int arg_count; zval *tmp; - zend_bool free_soap_headers = 0; + bool free_soap_headers = 0; zval *this_ptr; if (is_soap_call) { @@ -2758,7 +2758,7 @@ PHP_METHOD(SoapClient, __doRequest) char *location, *action; size_t location_size, action_size; zend_long version; - zend_bool one_way = 0; + bool one_way = 0; zval *this_ptr = ZEND_THIS; if (zend_parse_parameters(ZEND_NUM_ARGS(), "Sssl|b", diff --git a/ext/sockets/sockets.c b/ext/sockets/sockets.c index 76e63f04ad..4675615973 100644 --- a/ext/sockets/sockets.c +++ b/ext/sockets/sockets.c @@ -726,7 +726,7 @@ PHP_FUNCTION(socket_select) PHP_SOCKET max_fd = 0; int retval, sets = 0; zend_long sec, usec = 0; - zend_bool sec_is_null = 0; + bool sec_is_null = 0; if (zend_parse_parameters(ZEND_NUM_ARGS(), "a!a!a!l!|l", &r_array, &w_array, &e_array, &sec, &sec_is_null, &usec) == FAILURE) { RETURN_THROWS(); @@ -978,7 +978,7 @@ PHP_FUNCTION(socket_write) int retval; size_t str_len; zend_long length = 0; - zend_bool length_is_null = 1; + bool length_is_null = 1; char *str; if (zend_parse_parameters(ZEND_NUM_ARGS(), "Os|l!", &arg1, socket_ce, &str, &str_len, &length, &length_is_null) == FAILURE) { @@ -1265,7 +1265,7 @@ PHP_FUNCTION(socket_connect) int retval; size_t addr_len; zend_long port; - zend_bool port_is_null = 1; + bool port_is_null = 1; if (zend_parse_parameters(ZEND_NUM_ARGS(), "Os|l!", &resource_socket, socket_ce, &addr, &addr_len, &port, &port_is_null) == FAILURE) { RETURN_THROWS(); @@ -1641,7 +1641,7 @@ PHP_FUNCTION(socket_sendto) int retval; size_t buf_len, addr_len; zend_long len, flags, port; - zend_bool port_is_null = 1; + bool port_is_null = 1; char *buf, *addr; if (zend_parse_parameters(ZEND_NUM_ARGS(), "Oslls|l!", &arg1, socket_ce, &buf, &buf_len, &len, &flags, &addr, &addr_len, &port, &port_is_null) == FAILURE) { diff --git a/ext/sodium/sodium_pwhash.c b/ext/sodium/sodium_pwhash.c index e58a9514cc..174d1546de 100644 --- a/ext/sodium/sodium_pwhash.c +++ b/ext/sodium/sodium_pwhash.c @@ -95,14 +95,14 @@ static zend_string *php_sodium_argon2_hash(const zend_string *password, zend_arr return ret; } -static zend_bool php_sodium_argon2_verify(const zend_string *password, const zend_string *hash) { +static bool php_sodium_argon2_verify(const zend_string *password, const zend_string *hash) { if ((ZSTR_LEN(password) >= 0xffffffff) || (ZSTR_LEN(hash) >= 0xffffffff)) { return 0; } return crypto_pwhash_str_verify(ZSTR_VAL(hash), ZSTR_VAL(password), ZSTR_LEN(password)) == 0; } -static zend_bool php_sodium_argon2_needs_rehash(const zend_string *hash, zend_array *options) { +static bool php_sodium_argon2_needs_rehash(const zend_string *hash, zend_array *options) { size_t opslimit, memlimit; if (get_options(options, &memlimit, &opslimit) == FAILURE) { diff --git a/ext/spl/php_spl.c b/ext/spl/php_spl.c index e2ca343b1b..67f87774a0 100644 --- a/ext/spl/php_spl.c +++ b/ext/spl/php_spl.c @@ -55,7 +55,7 @@ static PHP_GINIT_FUNCTION(spl) } /* }}} */ -static zend_class_entry * spl_find_ce_by_name(zend_string *name, zend_bool autoload) +static zend_class_entry * spl_find_ce_by_name(zend_string *name, bool autoload) { zend_class_entry *ce; @@ -80,7 +80,7 @@ PHP_FUNCTION(class_parents) { zval *obj; zend_class_entry *parent_class, *ce; - zend_bool autoload = 1; + bool autoload = 1; if (zend_parse_parameters(ZEND_NUM_ARGS(), "z|b", &obj, &autoload) == FAILURE) { RETURN_THROWS(); @@ -112,7 +112,7 @@ PHP_FUNCTION(class_parents) PHP_FUNCTION(class_implements) { zval *obj; - zend_bool autoload = 1; + bool autoload = 1; zend_class_entry *ce; if (zend_parse_parameters(ZEND_NUM_ARGS(), "z|b", &obj, &autoload) == FAILURE) { @@ -140,7 +140,7 @@ PHP_FUNCTION(class_implements) PHP_FUNCTION(class_uses) { zval *obj; - zend_bool autoload = 1; + bool autoload = 1; zend_class_entry *ce; if (zend_parse_parameters(ZEND_NUM_ARGS(), "z|b", &obj, &autoload) == FAILURE) { @@ -404,7 +404,7 @@ static autoload_func_info *autoload_func_info_from_fci( return alfi; } -static zend_bool autoload_func_info_equals( +static bool autoload_func_info_equals( const autoload_func_info *alfi1, const autoload_func_info *alfi2) { return alfi1->func_ptr == alfi2->func_ptr && alfi1->obj == alfi2->obj @@ -492,8 +492,8 @@ static Bucket *spl_find_registered_function(autoload_func_info *find_alfi) { /* {{{ Register given function as autoloader */ PHP_FUNCTION(spl_autoload_register) { - zend_bool do_throw = 1; - zend_bool prepend = 0; + bool do_throw = 1; + bool prepend = 0; zend_fcall_info fci = {0}; zend_fcall_info_cache fcc; autoload_func_info *alfi; diff --git a/ext/spl/spl_array.c b/ext/spl/spl_array.c index 176e507a49..dc66241e44 100644 --- a/ext/spl/spl_array.c +++ b/ext/spl/spl_array.c @@ -111,7 +111,7 @@ static inline HashTable *spl_array_get_hash_table(spl_array_object* intern) { /* } /* }}} */ -static inline zend_bool spl_array_is_object(spl_array_object *intern) /* {{{ */ +static inline bool spl_array_is_object(spl_array_object *intern) /* {{{ */ { while (intern->ar_flags & SPL_ARRAY_USE_OTHER) { intern = Z_SPLARRAY_P(&intern->array); @@ -659,7 +659,7 @@ num_index: } { - zend_bool result = check_empty ? zend_is_true(value) : Z_TYPE_P(value) != IS_NULL; + bool result = check_empty ? zend_is_true(value) : Z_TYPE_P(value) != IS_NULL; if (value == &rv) { zval_ptr_dtor(&rv); } @@ -755,7 +755,7 @@ static HashTable *spl_array_get_properties_for(zend_object *object, zend_prop_pu { spl_array_object *intern = spl_array_from_obj(object); HashTable *ht; - zend_bool dup; + bool dup; if (intern->ar_flags & SPL_ARRAY_STD_PROP_LIST) { return zend_std_get_properties_for(object, purpose); diff --git a/ext/spl/spl_directory.c b/ext/spl/spl_directory.c index 7d9ea9cc2b..1ba7aa11c5 100644 --- a/ext/spl/spl_directory.c +++ b/ext/spl/spl_directory.c @@ -478,7 +478,7 @@ static spl_filesystem_object *spl_filesystem_object_create_info(spl_filesystem_o static spl_filesystem_object *spl_filesystem_object_create_type(int num_args, spl_filesystem_object *source, int type, zend_class_entry *ce, zval *return_value) /* {{{ */ { spl_filesystem_object *intern; - zend_bool use_include_path = 0; + bool use_include_path = 0; zval arg1, arg2; zend_error_handling error_handling; @@ -1467,7 +1467,7 @@ PHP_METHOD(FilesystemIterator, setFlags) /* {{{ Returns whether current entry is a directory and not '.' or '..' */ PHP_METHOD(RecursiveDirectoryIterator, hasChildren) { - zend_bool allow_links = 0; + bool allow_links = 0; spl_filesystem_object *intern = Z_SPLFILESYSTEM_P(ZEND_THIS); if (zend_parse_parameters(ZEND_NUM_ARGS(), "|b", &allow_links) == FAILURE) { @@ -2051,7 +2051,7 @@ static void spl_filesystem_file_rewind(zval * this_ptr, spl_filesystem_object *i PHP_METHOD(SplFileObject, __construct) { spl_filesystem_object *intern = Z_SPLFILESYSTEM_P(ZEND_THIS); - zend_bool use_include_path = 0; + bool use_include_path = 0; char *p1, *p2; char *tmp_path; size_t tmp_path_len; diff --git a/ext/spl/spl_dllist.c b/ext/spl/spl_dllist.c index cc8723f05e..bc311589b6 100644 --- a/ext/spl/spl_dllist.c +++ b/ext/spl/spl_dllist.c @@ -764,7 +764,7 @@ PHP_METHOD(SplDoublyLinkedList, offsetGet) PHP_METHOD(SplDoublyLinkedList, offsetSet) { zend_long index; - zend_bool index_is_null = 1; + bool index_is_null = 1; zval *value; spl_dllist_object *intern; diff --git a/ext/spl/spl_fixedarray.c b/ext/spl/spl_fixedarray.c index 4c7ff5dd35..ea5e6ee984 100644 --- a/ext/spl/spl_fixedarray.c +++ b/ext/spl/spl_fixedarray.c @@ -470,7 +470,7 @@ static int spl_fixedarray_object_has_dimension(zend_object *object, zval *offset if (UNEXPECTED(intern->methods && intern->methods->fptr_offset_has)) { zval rv; - zend_bool result; + bool result; zend_call_method_with_1_params(object, intern->std.ce, &intern->methods->fptr_offset_has, "offsetExists", &rv, offset); result = zend_is_true(&rv); @@ -593,7 +593,7 @@ PHP_METHOD(SplFixedArray, fromArray) spl_fixedarray array; spl_fixedarray_object *intern; int num; - zend_bool save_indexes = 1; + bool save_indexes = 1; if (zend_parse_parameters(ZEND_NUM_ARGS(), "a|b", &data, &save_indexes) == FAILURE) { RETURN_THROWS(); diff --git a/ext/spl/spl_iterators.c b/ext/spl/spl_iterators.c index 40538cda8e..a4531f6056 100644 --- a/ext/spl/spl_iterators.c +++ b/ext/spl/spl_iterators.c @@ -93,7 +93,7 @@ typedef struct _spl_recursive_it_object { RecursiveIteratorMode mode; int flags; int max_depth; - zend_bool in_iteration; + bool in_iteration; zend_function *beginIteration; zend_function *endIteration; zend_function *callHasChildren; @@ -685,7 +685,7 @@ PHP_METHOD(RecursiveIteratorIterator, getSubIterator) { spl_recursive_it_object *object = Z_SPLRECURSIVE_IT_P(ZEND_THIS); zend_long level; - zend_bool level_is_null = 1; + bool level_is_null = 1; zval *value; if (zend_parse_parameters(ZEND_NUM_ARGS(), "|l!", &level, &level_is_null) == FAILURE) { @@ -3135,7 +3135,7 @@ static int spl_iterator_to_values_apply(zend_object_iterator *iter, void *puser) PHP_FUNCTION(iterator_to_array) { zval *obj; - zend_bool use_keys = 1; + bool use_keys = 1; if (zend_parse_parameters(ZEND_NUM_ARGS(), "O|b", &obj, zend_ce_traversable, &use_keys) == FAILURE) { RETURN_THROWS(); diff --git a/ext/spl/spl_observer.c b/ext/spl/spl_observer.c index ee8abb52d7..3fd50ceb89 100644 --- a/ext/spl/spl_observer.c +++ b/ext/spl/spl_observer.c @@ -933,7 +933,7 @@ PHP_METHOD(MultipleIterator, attachIterator) zval zinfo; zend_string *info_str; zend_long info_long; - zend_bool info_is_null = 1; + bool info_is_null = 1; ZEND_PARSE_PARAMETERS_START(1, 2) Z_PARAM_OBJ_OF_CLASS(iterator, zend_ce_iterator) diff --git a/ext/sqlite3/php_sqlite3_structs.h b/ext/sqlite3/php_sqlite3_structs.h index 80e915da68..07b0c8ba95 100644 --- a/ext/sqlite3/php_sqlite3_structs.h +++ b/ext/sqlite3/php_sqlite3_structs.h @@ -74,7 +74,7 @@ typedef struct _php_sqlite3_db_object { zend_fcall_info authorizer_fci; zend_fcall_info_cache authorizer_fcc; - zend_bool exception; + bool exception; zend_llist free_list; zend_object zo; diff --git a/ext/sqlite3/sqlite3.c b/ext/sqlite3/sqlite3.c index cd91e68fd3..cfd0cb7eae 100644 --- a/ext/sqlite3/sqlite3.c +++ b/ext/sqlite3/sqlite3.c @@ -306,7 +306,7 @@ PHP_METHOD(SQLite3, enableExtendedResultCodes) { php_sqlite3_db_object *db_obj; zval *object = ZEND_THIS; - zend_bool enable = 1; + bool enable = 1; db_obj = Z_SQLITE3_DB_P(object); int ret; @@ -660,7 +660,7 @@ PHP_METHOD(SQLite3, querySingle) zend_string *sql; char *errtext = NULL; int return_code; - zend_bool entire_row = 0; + bool entire_row = 0; sqlite3_stmt *stmt; db_obj = Z_SQLITE3_DB_P(object); @@ -1281,7 +1281,7 @@ PHP_METHOD(SQLite3, enableExceptions) { php_sqlite3_db_object *db_obj; zval *object = ZEND_THIS; - zend_bool enableExceptions = 0; + bool enableExceptions = 0; db_obj = Z_SQLITE3_DB_P(object); @@ -1607,7 +1607,7 @@ static int php_sqlite3_bind_params(php_sqlite3_stmt *stmt_obj) /* {{{ */ PHP_METHOD(SQLite3Stmt, getSQL) { php_sqlite3_stmt *stmt_obj; - zend_bool expanded = 0; + bool expanded = 0; zval *object = getThis(); stmt_obj = Z_SQLITE3_STMT_P(object); int bind_rc; diff --git a/ext/standard/array.c b/ext/standard/array.c index e4707031b7..e0b52ca169 100644 --- a/ext/standard/array.c +++ b/ext/standard/array.c @@ -849,7 +849,7 @@ static inline int php_array_user_compare_unstable(Bucket *f, Bucket *s) /* {{{ * { zval args[2]; zval retval; - zend_bool call_failed; + bool call_failed; ZVAL_COPY(&args[0], &f->val); ZVAL_COPY(&args[1], &s->val); @@ -915,7 +915,7 @@ static int php_array_user_compare(Bucket *a, Bucket *b) /* {{{ */ BG(user_compare_fci) = old_user_compare_fci; \ BG(user_compare_fci_cache) = old_user_compare_fci_cache; \ -static void php_usort(INTERNAL_FUNCTION_PARAMETERS, bucket_compare_func_t compare_func, zend_bool renumber) /* {{{ */ +static void php_usort(INTERNAL_FUNCTION_PARAMETERS, bucket_compare_func_t compare_func, bool renumber) /* {{{ */ { zval *array; zend_array *arr; @@ -965,7 +965,7 @@ static inline int php_array_user_key_compare_unstable(Bucket *f, Bucket *s) /* { { zval args[2]; zval retval; - zend_bool call_failed; + bool call_failed; if (f->key == NULL) { ZVAL_LONG(&args[0], f->h); @@ -1459,7 +1459,7 @@ static inline void php_search_array(INTERNAL_FUNCTION_PARAMETERS, int behavior) *entry; /* pointer to array entry */ zend_ulong num_idx; zend_string *str_idx; - zend_bool strict = 0; /* strict comparison or not */ + bool strict = 0; /* strict comparison or not */ ZEND_PARSE_PARAMETERS_START(2, 3) Z_PARAM_ZVAL(value) @@ -1621,7 +1621,7 @@ static zend_always_inline int php_valid_var_name(const char *var_name, size_t va } /* }}} */ -PHPAPI int php_prefix_varname(zval *result, zend_string *prefix, const char *var_name, size_t var_name_len, zend_bool add_underscore) /* {{{ */ +PHPAPI int php_prefix_varname(zval *result, zend_string *prefix, const char *var_name, size_t var_name_len, bool add_underscore) /* {{{ */ { ZVAL_NEW_STR(result, zend_string_alloc(ZSTR_LEN(prefix) + (add_underscore ? 1 : 0) + var_name_len, 0)); memcpy(Z_STRVAL_P(result), ZSTR_VAL(prefix), ZSTR_LEN(prefix)); @@ -3284,7 +3284,7 @@ PHP_FUNCTION(array_splice) HashTable *rem_hash = NULL; zend_long offset, length = 0; - zend_bool length_is_null = 1; + bool length_is_null = 1; int num_in; /* Number of elements in the input array */ ZEND_PARSE_PARAMETERS_START(2, 4) @@ -3372,8 +3372,8 @@ PHP_FUNCTION(array_slice) zval *entry; /* An array entry */ zend_long offset; /* Offset to get elements from */ zend_long length = 0; /* How many elements to get */ - zend_bool length_is_null = 1; /* Whether an explicit length has been omitted */ - zend_bool preserve_keys = 0; /* Whether to preserve keys while copying to the new array */ + bool length_is_null = 1; /* Whether an explicit length has been omitted */ + bool preserve_keys = 0; /* Whether to preserve keys while copying to the new array */ uint32_t num_in; /* Number of elements in the input array */ zend_string *string_key; zend_ulong num_key; @@ -3727,7 +3727,7 @@ static zend_always_inline void php_array_merge_wrapper(INTERNAL_FUNCTION_PARAMET return; } } else { - zend_bool copy = 1; + bool copy = 1; zend_string *string_key; ZEND_HASH_FOREACH_STR_KEY(Z_ARRVAL_P(ret), string_key) { @@ -3826,7 +3826,7 @@ PHP_FUNCTION(array_keys) *search_value = NULL, /* Value to search for */ *entry, /* An entry in the input array */ new_val; /* New value */ - zend_bool strict = 0; /* do strict comparison */ + bool strict = 0; /* do strict comparison */ zend_ulong num_idx; zend_string *str_idx; zend_array *arrval; @@ -4069,10 +4069,10 @@ PHP_FUNCTION(array_column) zval *colval, *data, rv; zend_string *column_str = NULL; zend_long column_long; - zend_bool column_is_null = 0; + bool column_is_null = 0; zend_string *index_str = NULL; zend_long index_long; - zend_bool index_is_null = 1; + bool index_is_null = 1; ZEND_PARSE_PARAMETERS_START(2, 3) Z_PARAM_ARRAY_HT(input) @@ -4129,7 +4129,7 @@ PHP_FUNCTION(array_reverse) *entry; /* An entry in the input array */ zend_string *string_key; zend_ulong num_key; - zend_bool preserve_keys = 0; /* whether to preserve keys */ + bool preserve_keys = 0; /* whether to preserve keys */ ZEND_PARSE_PARAMETERS_START(1, 2) Z_PARAM_ARRAY(input) @@ -4475,7 +4475,7 @@ static void php_array_intersect_key(INTERNAL_FUNCTION_PARAMETERS, int data_compa int argc, i; zval *args; int (*intersect_data_compare_func)(zval *, zval *) = NULL; - zend_bool ok; + bool ok; zval *val, *data; char *param_spec; zend_string *key; @@ -4854,7 +4854,7 @@ static void php_array_diff_key(INTERNAL_FUNCTION_PARAMETERS, int data_compare_ty int argc, i; zval *args; int (*diff_data_compare_func)(zval *, zval *) = NULL; - zend_bool ok; + bool ok; zval *val, *data; zend_string *key; zend_ulong h; @@ -5789,7 +5789,7 @@ PHP_FUNCTION(array_filter) zval *key; zval args[2]; zval retval; - zend_bool have_callback = 0; + bool have_callback = 0; zend_long use_type = 0; zend_string *string_key; zend_fcall_info fci = empty_fcall_info; @@ -6069,7 +6069,7 @@ PHP_FUNCTION(array_chunk) zend_long size, current = 0; zend_string *str_key; zend_ulong num_key; - zend_bool preserve_keys = 0; + bool preserve_keys = 0; zval *input = NULL; zval chunk; zval *entry; diff --git a/ext/standard/assert.c b/ext/standard/assert.c index 86acaec389..fae6d940ba 100644 --- a/ext/standard/assert.c +++ b/ext/standard/assert.c @@ -24,10 +24,10 @@ ZEND_BEGIN_MODULE_GLOBALS(assert) zval callback; char *cb; - zend_bool active; - zend_bool bail; - zend_bool warning; - zend_bool exception; + bool active; + bool bail; + bool warning; + bool exception; ZEND_END_MODULE_GLOBALS(assert) ZEND_DECLARE_MODULE_GLOBALS(assert) @@ -208,7 +208,7 @@ PHP_FUNCTION(assert_options) { zval *value = NULL; zend_long what; - zend_bool oldint; + bool oldint; int ac = ZEND_NUM_ARGS(); zend_string *key; diff --git a/ext/standard/base64.c b/ext/standard/base64.c index 2d67f88f66..234d61226f 100644 --- a/ext/standard/base64.c +++ b/ext/standard/base64.c @@ -243,7 +243,7 @@ static zend_always_inline size_t neon_base64_decode(const unsigned char *in, siz } #endif /* __aarch64__ */ -static zend_always_inline int php_base64_decode_impl(const unsigned char *in, size_t inl, unsigned char *out, size_t *outl, zend_bool strict) /* {{{ */ +static zend_always_inline int php_base64_decode_impl(const unsigned char *in, size_t inl, unsigned char *out, size_t *outl, bool strict) /* {{{ */ { int ch; size_t i = 0, padding = 0, j = *outl; @@ -368,23 +368,23 @@ fail: # if ZEND_INTRIN_AVX2_RESOLVER ZEND_INTRIN_AVX2_FUNC_DECL(zend_string *php_base64_encode_avx2(const unsigned char *str, size_t length)); -ZEND_INTRIN_AVX2_FUNC_DECL(zend_string *php_base64_decode_ex_avx2(const unsigned char *str, size_t length, zend_bool strict)); +ZEND_INTRIN_AVX2_FUNC_DECL(zend_string *php_base64_decode_ex_avx2(const unsigned char *str, size_t length, bool strict)); # endif # if ZEND_INTRIN_SSSE3_RESOLVER ZEND_INTRIN_SSSE3_FUNC_DECL(zend_string *php_base64_encode_ssse3(const unsigned char *str, size_t length)); -ZEND_INTRIN_SSSE3_FUNC_DECL(zend_string *php_base64_decode_ex_ssse3(const unsigned char *str, size_t length, zend_bool strict)); +ZEND_INTRIN_SSSE3_FUNC_DECL(zend_string *php_base64_decode_ex_ssse3(const unsigned char *str, size_t length, bool strict)); # endif zend_string *php_base64_encode_default(const unsigned char *str, size_t length); -zend_string *php_base64_decode_ex_default(const unsigned char *str, size_t length, zend_bool strict); +zend_string *php_base64_decode_ex_default(const unsigned char *str, size_t length, bool strict); # if (ZEND_INTRIN_AVX2_FUNC_PROTO || ZEND_INTRIN_SSSE3_FUNC_PROTO) PHPAPI zend_string *php_base64_encode(const unsigned char *str, size_t length) __attribute__((ifunc("resolve_base64_encode"))); -PHPAPI zend_string *php_base64_decode_ex(const unsigned char *str, size_t length, zend_bool strict) __attribute__((ifunc("resolve_base64_decode"))); +PHPAPI zend_string *php_base64_decode_ex(const unsigned char *str, size_t length, bool strict) __attribute__((ifunc("resolve_base64_decode"))); typedef zend_string *(*base64_encode_func_t)(const unsigned char *, size_t); -typedef zend_string *(*base64_decode_func_t)(const unsigned char *, size_t, zend_bool); +typedef zend_string *(*base64_decode_func_t)(const unsigned char *, size_t, bool); ZEND_NO_SANITIZE_ADDRESS ZEND_ATTRIBUTE_UNUSED /* clang mistakenly warns about this */ @@ -420,12 +420,12 @@ static base64_decode_func_t resolve_base64_decode() { # else /* (ZEND_INTRIN_AVX2_FUNC_PROTO || ZEND_INTRIN_SSSE3_FUNC_PROTO) */ PHPAPI zend_string *(*php_base64_encode_ptr)(const unsigned char *str, size_t length) = NULL; -PHPAPI zend_string *(*php_base64_decode_ex_ptr)(const unsigned char *str, size_t length, zend_bool strict) = NULL; +PHPAPI zend_string *(*php_base64_decode_ex_ptr)(const unsigned char *str, size_t length, bool strict) = NULL; PHPAPI zend_string *php_base64_encode(const unsigned char *str, size_t length) { return php_base64_encode_ptr(str, length); } -PHPAPI zend_string *php_base64_decode_ex(const unsigned char *str, size_t length, zend_bool strict) { +PHPAPI zend_string *php_base64_decode_ex(const unsigned char *str, size_t length, bool strict) { return php_base64_decode_ex_ptr(str, length, strict); } @@ -775,11 +775,11 @@ static __m128i php_base64_decode_ssse3_reshuffle(__m128i in) #if ZEND_INTRIN_AVX2_NATIVE || ZEND_INTRIN_AVX2_RESOLVER || ZEND_INTRIN_SSSE3_NATIVE || ZEND_INTRIN_SSSE3_RESOLVER # if ZEND_INTRIN_AVX2_NATIVE || ZEND_INTRIN_SSSE3_NATIVE -PHPAPI zend_string *php_base64_decode_ex(const unsigned char *str, size_t length, zend_bool strict) +PHPAPI zend_string *php_base64_decode_ex(const unsigned char *str, size_t length, bool strict) # elif ZEND_INTRIN_AVX2_RESOLVER -zend_string *php_base64_decode_ex_avx2(const unsigned char *str, size_t length, zend_bool strict) +zend_string *php_base64_decode_ex_avx2(const unsigned char *str, size_t length, bool strict) # else -zend_string *php_base64_decode_ex_ssse3(const unsigned char *str, size_t length, zend_bool strict) +zend_string *php_base64_decode_ex_ssse3(const unsigned char *str, size_t length, bool strict) # endif { const unsigned char *c = str; @@ -856,7 +856,7 @@ zend_string *php_base64_decode_ex_ssse3(const unsigned char *str, size_t length, } # if ZEND_INTRIN_SSSE3_RESOLVER && ZEND_INTRIN_AVX2_RESOLVER -zend_string *php_base64_decode_ex_ssse3(const unsigned char *str, size_t length, zend_bool strict) +zend_string *php_base64_decode_ex_ssse3(const unsigned char *str, size_t length, bool strict) { const unsigned char *c = str; unsigned char *o; @@ -903,9 +903,9 @@ PHPAPI zend_string *php_base64_encode(const unsigned char *str, size_t length) #if !ZEND_INTRIN_AVX2_NATIVE && !ZEND_INTRIN_SSSE3_NATIVE #if ZEND_INTRIN_AVX2_RESOLVER || ZEND_INTRIN_SSSE3_RESOLVER -zend_string *php_base64_decode_ex_default(const unsigned char *str, size_t length, zend_bool strict) +zend_string *php_base64_decode_ex_default(const unsigned char *str, size_t length, bool strict) #else -PHPAPI zend_string *php_base64_decode_ex(const unsigned char *str, size_t length, zend_bool strict) +PHPAPI zend_string *php_base64_decode_ex(const unsigned char *str, size_t length, bool strict) #endif { zend_string *result; @@ -945,7 +945,7 @@ PHP_FUNCTION(base64_encode) PHP_FUNCTION(base64_decode) { char *str; - zend_bool strict = 0; + bool strict = 0; size_t str_len; zend_string *result; diff --git a/ext/standard/base64.h b/ext/standard/base64.h index 170c0b0c61..a6ce0e22c6 100644 --- a/ext/standard/base64.h +++ b/ext/standard/base64.h @@ -62,7 +62,7 @@ PHP_MINIT_FUNCTION(base64_intrin); #endif PHPAPI extern zend_string *php_base64_encode(const unsigned char *, size_t); -PHPAPI extern zend_string *php_base64_decode_ex(const unsigned char *, size_t, zend_bool); +PHPAPI extern zend_string *php_base64_decode_ex(const unsigned char *, size_t, bool); static inline zend_string *php_base64_encode_str(const zend_string *str) { return php_base64_encode((const unsigned char*)(ZSTR_VAL(str)), ZSTR_LEN(str)); diff --git a/ext/standard/basic_functions.c b/ext/standard/basic_functions.c index 0d4ef2dad8..54c3188771 100755 --- a/ext/standard/basic_functions.c +++ b/ext/standard/basic_functions.c @@ -790,7 +790,7 @@ PHP_FUNCTION(getenv) { char *str = NULL; size_t str_len; - zend_bool local_only = 0; + bool local_only = 0; ZEND_PARSE_PARAMETERS_START(0, 2) Z_PARAM_OPTIONAL @@ -1807,7 +1807,7 @@ PHP_FUNCTION(register_shutdown_function) } /* }}} */ -PHPAPI zend_bool register_user_shutdown_function(const char *function_name, size_t function_len, php_shutdown_function_entry *shutdown_function_entry) /* {{{ */ +PHPAPI bool register_user_shutdown_function(const char *function_name, size_t function_len, php_shutdown_function_entry *shutdown_function_entry) /* {{{ */ { if (!BG(user_shutdown_function_names)) { ALLOC_HASHTABLE(BG(user_shutdown_function_names)); @@ -1819,7 +1819,7 @@ PHPAPI zend_bool register_user_shutdown_function(const char *function_name, size } /* }}} */ -PHPAPI zend_bool remove_user_shutdown_function(const char *function_name, size_t function_len) /* {{{ */ +PHPAPI bool remove_user_shutdown_function(const char *function_name, size_t function_len) /* {{{ */ { if (BG(user_shutdown_function_names)) { return zend_hash_str_del(BG(user_shutdown_function_names), function_name, function_len) != FAILURE; @@ -1829,7 +1829,7 @@ PHPAPI zend_bool remove_user_shutdown_function(const char *function_name, size_t } /* }}} */ -PHPAPI zend_bool append_user_shutdown_function(php_shutdown_function_entry *shutdown_function_entry) /* {{{ */ +PHPAPI bool append_user_shutdown_function(php_shutdown_function_entry *shutdown_function_entry) /* {{{ */ { if (!BG(user_shutdown_function_names)) { ALLOC_HASHTABLE(BG(user_shutdown_function_names)); @@ -1857,7 +1857,7 @@ PHP_FUNCTION(highlight_file) size_t filename_len; int ret; zend_syntax_highlighter_ini syntax_highlighter_ini; - zend_bool i = 0; + bool i = 0; ZEND_PARSE_PARAMETERS_START(1, 2) Z_PARAM_PATH(filename, filename_len) @@ -1932,7 +1932,7 @@ PHP_FUNCTION(highlight_string) zend_string *str; zend_syntax_highlighter_ini syntax_highlighter_ini; char *hicompiled_string_description; - zend_bool i = 0; + bool i = 0; int old_error_reporting = EG(error_reporting); ZEND_PARSE_PARAMETERS_START(1, 2) @@ -2007,7 +2007,7 @@ PHP_FUNCTION(ini_get_all) char *extname = NULL; size_t extname_len = 0, module_number = 0; zend_module_entry *module; - zend_bool details = 1; + bool details = 1; zend_string *key; zend_ini_entry *ini_entry; @@ -2191,7 +2191,7 @@ PHP_FUNCTION(get_include_path) PHP_FUNCTION(print_r) { zval *var; - zend_bool do_return = 0; + bool do_return = 0; ZEND_PARSE_PARAMETERS_START(1, 2) Z_PARAM_ZVAL(var) @@ -2229,8 +2229,8 @@ PHP_FUNCTION(connection_status) /* {{{ Set whether we want to ignore a user abort event or not */ PHP_FUNCTION(ignore_user_abort) { - zend_bool arg = 0; - zend_bool arg_is_null = 1; + bool arg = 0; + bool arg_is_null = 1; int old_setting; ZEND_PARSE_PARAMETERS_START(0, 1) @@ -2464,7 +2464,7 @@ PHP_FUNCTION(move_uploaded_file) { char *path, *new_path; size_t path_len, new_path_len; - zend_bool successful = 0; + bool successful = 0; #ifndef PHP_WIN32 int oldmask; int ret; @@ -2595,7 +2595,7 @@ PHP_FUNCTION(parse_ini_file) { char *filename = NULL; size_t filename_len = 0; - zend_bool process_sections = 0; + bool process_sections = 0; zend_long scanner_mode = ZEND_INI_SCANNER_NORMAL; zend_file_handle fh; zend_ini_parser_cb_t ini_parser_cb; @@ -2636,7 +2636,7 @@ PHP_FUNCTION(parse_ini_string) { char *string = NULL, *str = NULL; size_t str_len = 0; - zend_bool process_sections = 0; + bool process_sections = 0; zend_long scanner_mode = ZEND_INI_SCANNER_NORMAL; zend_ini_parser_cb_t ini_parser_cb; diff --git a/ext/standard/basic_functions.h b/ext/standard/basic_functions.h index 6c745dc549..5971ffd2ab 100644 --- a/ext/standard/basic_functions.h +++ b/ext/standard/basic_functions.h @@ -49,7 +49,7 @@ PHP_RSHUTDOWN_FUNCTION(browscap); /* Left for BC (not binary safe!) */ PHPAPI int _php_error_log(int opt_err, const char *message, const char *opt, const char *headers); PHPAPI int _php_error_log_ex(int opt_err, const char *message, size_t message_len, const char *opt, const char *headers); -PHPAPI int php_prefix_varname(zval *result, zend_string *prefix, const char *var_name, size_t var_name_len, zend_bool add_underscore); +PHPAPI int php_prefix_varname(zval *result, zend_string *prefix, const char *var_name, size_t var_name_len, bool add_underscore); #define MT_N (624) @@ -62,7 +62,7 @@ typedef struct _php_basic_globals { HashTable putenv_ht; zend_string *strtok_string; zend_string *ctype_string; /* current LC_CTYPE locale (or NULL for 'C') */ - zend_bool locale_changed; /* locale was changed and has to be restored */ + bool locale_changed; /* locale was changed and has to be restored */ char *strtok_last; char strtok_table[256]; size_t strtok_len; @@ -87,7 +87,7 @@ typedef struct _php_basic_globals { uint32_t *next; /* next random value is computed from here */ int left; /* can *next++ this many times before reloading */ - zend_bool mt_rand_is_seeded; /* Whether mt_rand() has been seeded */ + bool mt_rand_is_seeded; /* Whether mt_rand() has been seeded */ zend_long mt_rand_mode; /* syslog.c */ @@ -148,9 +148,9 @@ typedef struct _php_shutdown_function_entry { int arg_count; } php_shutdown_function_entry; -PHPAPI extern zend_bool register_user_shutdown_function(const char *function_name, size_t function_len, php_shutdown_function_entry *shutdown_function_entry); -PHPAPI extern zend_bool remove_user_shutdown_function(const char *function_name, size_t function_len); -PHPAPI extern zend_bool append_user_shutdown_function(php_shutdown_function_entry *shutdown_function_entry); +PHPAPI extern bool register_user_shutdown_function(const char *function_name, size_t function_len, php_shutdown_function_entry *shutdown_function_entry); +PHPAPI extern bool remove_user_shutdown_function(const char *function_name, size_t function_len); +PHPAPI extern bool append_user_shutdown_function(php_shutdown_function_entry *shutdown_function_entry); PHPAPI void php_call_shutdown_functions(void); PHPAPI void php_free_shutdown_functions(void); diff --git a/ext/standard/browscap.c b/ext/standard/browscap.c index 4c8f331609..e5a565798b 100644 --- a/ext/standard/browscap.c +++ b/ext/standard/browscap.c @@ -85,7 +85,7 @@ static void browscap_entry_dtor_persistent(zval *zvalue) pefree(entry, 1); } -static inline zend_bool is_placeholder(char c) { +static inline bool is_placeholder(char c) { return c == '?' || c == '*'; } @@ -221,7 +221,7 @@ typedef struct _browscap_parser_ctx { } browscap_parser_ctx; static zend_string *browscap_intern_str( - browscap_parser_ctx *ctx, zend_string *str, zend_bool persistent) { + browscap_parser_ctx *ctx, zend_string *str, bool persistent) { zend_string *interned = zend_hash_find_ptr(&ctx->str_interned, str); if (interned) { zend_string_addref(interned); @@ -237,7 +237,7 @@ static zend_string *browscap_intern_str( } static zend_string *browscap_intern_str_ci( - browscap_parser_ctx *ctx, zend_string *str, zend_bool persistent) { + browscap_parser_ctx *ctx, zend_string *str, bool persistent) { zend_string *lcname; zend_string *interned; ALLOCA_FLAG(use_heap); @@ -261,7 +261,7 @@ static zend_string *browscap_intern_str_ci( } static void browscap_add_kv( - browser_data *bdata, zend_string *key, zend_string *value, zend_bool persistent) { + browser_data *bdata, zend_string *key, zend_string *value, bool persistent) { if (bdata->kv_used == bdata->kv_size) { bdata->kv_size *= 2; bdata->kv = safe_perealloc(bdata->kv, sizeof(browscap_kv), bdata->kv_size, 0, persistent); @@ -679,7 +679,7 @@ static void browscap_zval_copy_ctor(zval *p) /* {{{ */ PHP_FUNCTION(get_browser) { zend_string *agent_name = NULL, *lookup_browser_name; - zend_bool return_array = 0; + bool return_array = 0; browser_data *bdata; browscap_entry *found_entry = NULL; HashTable *agent_ht; diff --git a/ext/standard/crypt.c b/ext/standard/crypt.c index 8c105cf910..b3055bacd4 100644 --- a/ext/standard/crypt.c +++ b/ext/standard/crypt.c @@ -79,7 +79,7 @@ PHP_MSHUTDOWN_FUNCTION(crypt) /* {{{ */ } /* }}} */ -PHPAPI zend_string *php_crypt(const char *password, const int pass_len, const char *salt, int salt_len, zend_bool quiet) +PHPAPI zend_string *php_crypt(const char *password, const int pass_len, const char *salt, int salt_len, bool quiet) { char *crypt_res; zend_string *result; diff --git a/ext/standard/crypt_sha256.c b/ext/standard/crypt_sha256.c index f64cf00868..4ba4f6c3dd 100644 --- a/ext/standard/crypt_sha256.c +++ b/ext/standard/crypt_sha256.c @@ -344,7 +344,7 @@ char * php_sha256_crypt_r(const char *key, const char *salt, char *buffer, int b char *s_bytes; /* Default number of rounds. */ size_t rounds = ROUNDS_DEFAULT; - zend_bool rounds_custom = 0; + bool rounds_custom = 0; /* Find beginning of salt string. The prefix should normally always be present. Just in case it is not. */ diff --git a/ext/standard/crypt_sha512.c b/ext/standard/crypt_sha512.c index 94dc772fd9..f896dad5a8 100644 --- a/ext/standard/crypt_sha512.c +++ b/ext/standard/crypt_sha512.c @@ -377,7 +377,7 @@ php_sha512_crypt_r(const char *key, const char *salt, char *buffer, int buflen) char *s_bytes; /* Default number of rounds. */ size_t rounds = ROUNDS_DEFAULT; - zend_bool rounds_custom = 0; + bool rounds_custom = 0; /* Find beginning of salt string. The prefix should normally always be present. Just in case it is not. */ diff --git a/ext/standard/dir.c b/ext/standard/dir.c index 6807c534ba..e2b6f5bb3d 100644 --- a/ext/standard/dir.c +++ b/ext/standard/dir.c @@ -408,7 +408,7 @@ PHP_FUNCTION(glob) glob_t globbuf; size_t n; int ret; - zend_bool basedir_limit = 0; + bool basedir_limit = 0; ZEND_PARSE_PARAMETERS_START(1, 2) Z_PARAM_PATH(pattern, pattern_len) diff --git a/ext/standard/dns.c b/ext/standard/dns.c index 41b98424ed..105e0f0f26 100644 --- a/ext/standard/dns.c +++ b/ext/standard/dns.c @@ -811,7 +811,7 @@ PHP_FUNCTION(dns_get_record) u_char *cp = NULL, *end = NULL; int n, qd, an, ns = 0, ar = 0; int type, first_query = 1, store_results = 1; - zend_bool raw = 0; + bool raw = 0; ZEND_PARSE_PARAMETERS_START(1, 5) Z_PARAM_STRING(hostname, hostname_len) diff --git a/ext/standard/dns_win32.c b/ext/standard/dns_win32.c index afeab23a08..afd6b7eab6 100644 --- a/ext/standard/dns_win32.c +++ b/ext/standard/dns_win32.c @@ -351,7 +351,7 @@ PHP_FUNCTION(dns_get_record) zend_long type_param = PHP_DNS_ANY; zval *authns = NULL, *addtl = NULL; int type, type_to_fetch, first_query = 1, store_results = 1; - zend_bool raw = 0; + bool raw = 0; if (zend_parse_parameters(ZEND_NUM_ARGS(), "s|lz!z!b", &hostname, &hostname_len, &type_param, &authns, &addtl, &raw) == FAILURE) { diff --git a/ext/standard/file.c b/ext/standard/file.c index 6335b5a9af..60d0f84255 100644 --- a/ext/standard/file.c +++ b/ext/standard/file.c @@ -379,7 +379,7 @@ PHP_FUNCTION(get_meta_tags) { char *filename; size_t filename_len; - zend_bool use_include_path = 0; + bool use_include_path = 0; int in_tag = 0, done = 0; int looking_for_val = 0, have_name = 0, have_content = 0; int saw_name = 0, saw_content = 0; @@ -523,11 +523,11 @@ PHP_FUNCTION(file_get_contents) { char *filename; size_t filename_len; - zend_bool use_include_path = 0; + bool use_include_path = 0; php_stream *stream; zend_long offset = 0; zend_long maxlen; - zend_bool maxlen_is_null = 1; + bool maxlen_is_null = 1; zval *zcontext = NULL; php_stream_context *context = NULL; zend_string *contents; @@ -728,9 +728,9 @@ PHP_FUNCTION(file) register int i = 0; char eol_marker = '\n'; zend_long flags = 0; - zend_bool use_include_path; - zend_bool include_new_line; - zend_bool skip_blank_lines; + bool use_include_path; + bool include_new_line; + bool skip_blank_lines; php_stream *stream; zval *zcontext = NULL; php_stream_context *context = NULL; @@ -869,7 +869,7 @@ PHP_FUNCTION(fopen) { char *filename, *mode; size_t filename_len, mode_len; - zend_bool use_include_path = 0; + bool use_include_path = 0; zval *zcontext = NULL; php_stream *stream; php_stream_context *context = NULL; @@ -1018,7 +1018,7 @@ PHPAPI PHP_FUNCTION(fgets) { zval *res; zend_long len = 1024; - zend_bool len_is_null = 1; + bool len_is_null = 1; char *buf = NULL; size_t line_len = 0; zend_string *str; @@ -1141,7 +1141,7 @@ PHPAPI PHP_FUNCTION(fwrite) ssize_t ret; size_t num_bytes; zend_long maxlen = 0; - zend_bool maxlen_is_null = 1; + bool maxlen_is_null = 1; php_stream *stream; ZEND_PARSE_PARAMETERS_START(2, 3) @@ -1286,7 +1286,7 @@ PHP_FUNCTION(mkdir) size_t dir_len; zval *zcontext = NULL; zend_long mode = 0777; - zend_bool recursive = 0; + bool recursive = 0; php_stream_context *context; ZEND_PARSE_PARAMETERS_START(1, 4) @@ -1329,7 +1329,7 @@ PHP_FUNCTION(readfile) char *filename; size_t filename_len; size_t size = 0; - zend_bool use_include_path = 0; + bool use_include_path = 0; zval *zcontext = NULL; php_stream *stream; php_stream_context *context = NULL; @@ -1358,7 +1358,7 @@ PHP_FUNCTION(readfile) PHP_FUNCTION(umask) { zend_long mask = 0; - zend_bool mask_is_null = 1; + bool mask_is_null = 1; int oldumask; ZEND_PARSE_PARAMETERS_START(0, 1) @@ -1931,7 +1931,7 @@ PHP_FUNCTION(fgetcsv) { zval *fd; - zend_bool len_is_null = 1; + bool len_is_null = 1; char *delimiter_str = NULL; size_t delimiter_str_len = 0; char *enclosure_str = NULL; @@ -2013,7 +2013,7 @@ PHPAPI void php_fgetcsv(php_stream *stream, char delimiter, char enclosure, int char *temp, *tptr, *bptr, *line_end, *limit; size_t temp_len, line_end_len; int inc_len; - zend_bool first_field = 1; + bool first_field = 1; ZEND_ASSERT((escape_char >= 0 && escape_char <= UCHAR_MAX) || escape_char == PHP_CSV_NO_ESCAPE); diff --git a/ext/standard/file.h b/ext/standard/file.h index c51a953086..f9d153a52a 100644 --- a/ext/standard/file.h +++ b/ext/standard/file.h @@ -86,7 +86,7 @@ php_meta_tags_token php_next_meta_token(php_meta_tags_data *); typedef struct { int pclose_ret; size_t def_chunk_size; - zend_bool auto_detect_line_endings; + bool auto_detect_line_endings; zend_long default_socket_timeout; char *user_agent; /* for the http wrapper */ char *from_address; /* for the ftp and http wrappers */ diff --git a/ext/standard/filestat.c b/ext/standard/filestat.c index 303e919c19..0f39116676 100644 --- a/ext/standard/filestat.c +++ b/ext/standard/filestat.c @@ -594,7 +594,7 @@ PHP_FUNCTION(touch) char *filename; size_t filename_len; zend_long filetime = 0, fileatime = 0; - zend_bool filetime_is_null = 1, fileatime_is_null = 1; + bool filetime_is_null = 1, fileatime_is_null = 1; int ret; FILE *file; struct utimbuf newtimebuf; @@ -674,7 +674,7 @@ PHP_FUNCTION(touch) #endif /* {{{ php_clear_stat_cache() */ -PHPAPI void php_clear_stat_cache(zend_bool clear_realpath_cache, const char *filename, size_t filename_len) +PHPAPI void php_clear_stat_cache(bool clear_realpath_cache, const char *filename, size_t filename_len) { /* always clear CurrentStatFile and CurrentLStatFile even if filename is not NULL * as it may contain outdated data (e.g. "nlink" for a directory when deleting a file @@ -700,7 +700,7 @@ PHPAPI void php_clear_stat_cache(zend_bool clear_realpath_cache, const char *fil /* {{{ Clear file stat cache */ PHP_FUNCTION(clearstatcache) { - zend_bool clear_realpath_cache = 0; + bool clear_realpath_cache = 0; char *filename = NULL; size_t filename_len = 0; diff --git a/ext/standard/fsock.c b/ext/standard/fsock.c index a9c3cb0bf5..a4c5d6fe66 100644 --- a/ext/standard/fsock.c +++ b/ext/standard/fsock.c @@ -32,7 +32,7 @@ static void php_fsockopen_stream(INTERNAL_FUNCTION_PARAMETERS, int persistent) zend_long port = -1; zval *zerrno = NULL, *zerrstr = NULL; double timeout; - zend_bool timeout_is_null = 1; + bool timeout_is_null = 1; #ifndef PHP_WIN32 time_t conv; #else diff --git a/ext/standard/ftp_fopen_wrapper.c b/ext/standard/ftp_fopen_wrapper.c index 4dd38c4cba..896473b2d4 100644 --- a/ext/standard/ftp_fopen_wrapper.c +++ b/ext/standard/ftp_fopen_wrapper.c @@ -415,7 +415,7 @@ php_stream * php_stream_url_wrap_ftp(php_stream_wrapper *wrapper, const char *pa php_stream *reuseid=NULL; size_t file_size = 0; zval *tmpzval; - zend_bool allow_overwrite = 0; + bool allow_overwrite = 0; int8_t read_write = 0; char *transport; int transport_len; diff --git a/ext/standard/head.c b/ext/standard/head.c index 36f64fcb4d..19ed36c52c 100644 --- a/ext/standard/head.c +++ b/ext/standard/head.c @@ -31,7 +31,7 @@ /* {{{ Sends a raw HTTP header */ PHP_FUNCTION(header) { - zend_bool rep = 1; + bool rep = 1; sapi_header_line ctr = {0}; char *line; size_t len; @@ -193,7 +193,7 @@ PHPAPI zend_result php_setcookie(zend_string *name, zend_string *value, time_t e } static zend_result php_head_parse_cookie_options_array(HashTable *options, zend_long *expires, zend_string **path, - zend_string **domain, zend_bool *secure, zend_bool *httponly, zend_string **samesite) + zend_string **domain, bool *secure, bool *httponly, zend_string **samesite) { zend_string *key; zval *value; @@ -228,7 +228,7 @@ static void php_setcookie_common(INTERNAL_FUNCTION_PARAMETERS, bool is_raw) HashTable *options = NULL; zend_long expires = 0; zend_string *name, *value = NULL, *path = NULL, *domain = NULL, *samesite = NULL; - zend_bool secure = 0, httponly = 0; + bool secure = 0, httponly = 0; ZEND_PARSE_PARAMETERS_START(1, 7) Z_PARAM_STR(name) diff --git a/ext/standard/hrtime.c b/ext/standard/hrtime.c index 29a1132209..3bfd018597 100644 --- a/ext/standard/hrtime.c +++ b/ext/standard/hrtime.c @@ -163,7 +163,7 @@ static zend_always_inline php_hrtime_t _timer_current(void) PHP_FUNCTION(hrtime) { #if HRTIME_AVAILABLE - zend_bool get_as_num = 0; + bool get_as_num = 0; php_hrtime_t t = _timer_current(); ZEND_PARSE_PARAMETERS_START(0, 1) diff --git a/ext/standard/html.c b/ext/standard/html.c index 5806a5a8e9..a13f02dc06 100644 --- a/ext/standard/html.c +++ b/ext/standard/html.c @@ -365,7 +365,7 @@ static inline unsigned int get_next_char( /* {{{ entity_charset determine_charset * Returns the charset identifier based on an explicitly provided charset, * the internal_encoding and default_charset ini settings, or UTF-8 by default. */ -static enum entity_charset determine_charset(const char *charset_hint, zend_bool quiet) +static enum entity_charset determine_charset(const char *charset_hint, bool quiet) { if (!charset_hint || !*charset_hint) { charset_hint = get_default_charset(); @@ -1100,7 +1100,7 @@ static inline void find_entity_for_char_basic( /* }}} */ /* {{{ php_escape_html_entities */ -PHPAPI zend_string *php_escape_html_entities_ex(const unsigned char *old, size_t oldlen, int all, int flags, const char *hint_charset, zend_bool double_encode, zend_bool quiet) +PHPAPI zend_string *php_escape_html_entities_ex(const unsigned char *old, size_t oldlen, int all, int flags, const char *hint_charset, bool double_encode, bool quiet) { size_t cursor, maxlen, len; zend_string *replaced; @@ -1318,7 +1318,7 @@ static void php_html_entities(INTERNAL_FUNCTION_PARAMETERS, int all) zend_string *str, *hint_charset = NULL; zend_long flags = ENT_COMPAT; zend_string *replaced; - zend_bool double_encode = 1; + bool double_encode = 1; ZEND_PARSE_PARAMETERS_START(1, 4) Z_PARAM_STR(str) diff --git a/ext/standard/html.h b/ext/standard/html.h index 3aee85cd87..63067e72ee 100644 --- a/ext/standard/html.h +++ b/ext/standard/html.h @@ -45,7 +45,7 @@ void register_html_constants(INIT_FUNC_ARGS); PHPAPI zend_string *php_escape_html_entities(const unsigned char *old, size_t oldlen, int all, int flags, const char *hint_charset); -PHPAPI zend_string *php_escape_html_entities_ex(const unsigned char *old, size_t oldlen, int all, int flags, const char *hint_charset, zend_bool double_encode, zend_bool quiet); +PHPAPI zend_string *php_escape_html_entities_ex(const unsigned char *old, size_t oldlen, int all, int flags, const char *hint_charset, bool double_encode, bool quiet); PHPAPI zend_string *php_unescape_html_entities(zend_string *str, int all, int flags, const char *hint_charset); PHPAPI unsigned int php_next_utf8_char(const unsigned char *str, size_t str_len, size_t *cursor, int *status); diff --git a/ext/standard/http.c b/ext/standard/http.c index 18b7c6070b..b9a1605e7e 100644 --- a/ext/standard/http.c +++ b/ext/standard/http.c @@ -49,7 +49,7 @@ PHPAPI void php_url_encode_hash_ex(HashTable *ht, smart_str *formstr, arg_sep_len = strlen(arg_sep); ZEND_HASH_FOREACH_KEY_VAL(ht, idx, key, zdata) { - zend_bool is_dynamic = 1; + bool is_dynamic = 1; if (Z_TYPE_P(zdata) == IS_INDIRECT) { zdata = Z_INDIRECT_P(zdata); if (Z_ISUNDEF_P(zdata)) { diff --git a/ext/standard/http_fopen_wrapper.c b/ext/standard/http_fopen_wrapper.c index d865d7e2f9..4a1d2dd581 100644 --- a/ext/standard/http_fopen_wrapper.c +++ b/ext/standard/http_fopen_wrapper.c @@ -103,7 +103,7 @@ static inline void strip_header(char *header_bag, char *lc_header_bag, } } -static zend_bool check_has_header(const char *headers, const char *header) { +static bool check_has_header(const char *headers, const char *header) { const char *s = headers; while ((s = strstr(s, header))) { if (s == headers || *(s-1) == '\n') { @@ -136,16 +136,16 @@ static php_stream *php_stream_url_wrap_http_ex(php_stream_wrapper *wrapper, zend_string *errstr = NULL; size_t transport_len; int have_header = 0; - zend_bool request_fulluri = 0, ignore_errors = 0; + bool request_fulluri = 0, ignore_errors = 0; struct timeval timeout; char *user_headers = NULL; int header_init = ((flags & HTTP_WRAPPER_HEADER_INIT) != 0); int redirected = ((flags & HTTP_WRAPPER_REDIRECTED) != 0); - zend_bool follow_location = 1; + bool follow_location = 1; php_stream_filter *transfer_encoding = NULL; int response_code; smart_str req_buf = {0}; - zend_bool custom_request_method; + bool custom_request_method; tmp_line[0] = '\0'; diff --git a/ext/standard/image.c b/ext/standard/image.c index fc22ed3f75..2154f8e322 100644 --- a/ext/standard/image.c +++ b/ext/standard/image.c @@ -1207,7 +1207,7 @@ PHP_FUNCTION(image_type_to_mime_type) PHP_FUNCTION(image_type_to_extension) { zend_long image_type; - zend_bool inc_dot=1; + bool inc_dot=1; const char *imgext = NULL; ZEND_PARSE_PARAMETERS_START(1, 2) diff --git a/ext/standard/iptc.c b/ext/standard/iptc.c index b4890238f8..8bdb04bf67 100644 --- a/ext/standard/iptc.c +++ b/ext/standard/iptc.c @@ -179,7 +179,7 @@ PHP_FUNCTION(iptcembed) zend_string *spoolbuf = NULL; unsigned char *poi = NULL; zend_stat_t sb; - zend_bool written = 0; + bool written = 0; ZEND_PARSE_PARAMETERS_START(2, 3) Z_PARAM_STRING(iptcdata, iptcdata_len) diff --git a/ext/standard/mail.c b/ext/standard/mail.c index 4dfbfb03d0..9301d22ab7 100644 --- a/ext/standard/mail.c +++ b/ext/standard/mail.c @@ -57,7 +57,7 @@ extern zend_long php_getuid(void); -static zend_bool php_mail_build_headers_check_field_value(zval *val) +static bool php_mail_build_headers_check_field_value(zval *val) { size_t len = 0; zend_string *value = Z_STR_P(val); @@ -83,7 +83,7 @@ static zend_bool php_mail_build_headers_check_field_value(zval *val) } -static zend_bool php_mail_build_headers_check_field_name(zend_string *key) +static bool php_mail_build_headers_check_field_name(zend_string *key) { size_t len = 0; diff --git a/ext/standard/md5.c b/ext/standard/md5.c index 83d43c4976..1452d57afb 100644 --- a/ext/standard/md5.c +++ b/ext/standard/md5.c @@ -42,7 +42,7 @@ PHPAPI void make_digest_ex(char *md5str, const unsigned char *digest, int len) / PHP_FUNCTION(md5) { zend_string *arg; - zend_bool raw_output = 0; + bool raw_output = 0; PHP_MD5_CTX context; unsigned char digest[16]; @@ -70,7 +70,7 @@ PHP_FUNCTION(md5_file) { char *arg; size_t arg_len; - zend_bool raw_output = 0; + bool raw_output = 0; unsigned char buf[1024]; unsigned char digest[16]; PHP_MD5_CTX context; diff --git a/ext/standard/microtime.c b/ext/standard/microtime.c index 1817da00bf..592e1fd4fb 100644 --- a/ext/standard/microtime.c +++ b/ext/standard/microtime.c @@ -45,7 +45,7 @@ #ifdef HAVE_GETTIMEOFDAY static void _php_gettimeofday(INTERNAL_FUNCTION_PARAMETERS, int mode) { - zend_bool get_as_float = 0; + bool get_as_float = 0; struct timeval tp = {0}; ZEND_PARSE_PARAMETERS_START(0, 1) diff --git a/ext/standard/password.c b/ext/standard/password.c index a19266d214..0b98199d05 100644 --- a/ext/standard/password.c +++ b/ext/standard/password.c @@ -117,7 +117,7 @@ static zend_string* php_password_get_salt(zval *unused_, size_t required_salt_le /* bcrypt implementation */ -static zend_bool php_password_bcrypt_valid(const zend_string *hash) { +static bool php_password_bcrypt_valid(const zend_string *hash) { const char *h = ZSTR_VAL(hash); return (ZSTR_LEN(hash) == 60) && (h[0] == '$') && (h[1] == '2') && (h[2] == 'y'); @@ -137,7 +137,7 @@ static int php_password_bcrypt_get_info(zval *return_value, const zend_string *h return SUCCESS; } -static zend_bool php_password_bcrypt_needs_rehash(const zend_string *hash, zend_array *options) { +static bool php_password_bcrypt_needs_rehash(const zend_string *hash, zend_array *options) { zval *znew_cost; zend_long old_cost = PHP_PASSWORD_BCRYPT_COST; zend_long new_cost = PHP_PASSWORD_BCRYPT_COST; @@ -155,7 +155,7 @@ static zend_bool php_password_bcrypt_needs_rehash(const zend_string *hash, zend_ return old_cost != new_cost; } -static zend_bool php_password_bcrypt_verify(const zend_string *password, const zend_string *hash) { +static bool php_password_bcrypt_verify(const zend_string *password, const zend_string *hash) { size_t i; int status = 0; zend_string *ret = php_crypt(ZSTR_VAL(password), (int)ZSTR_LEN(password), ZSTR_VAL(hash), (int)ZSTR_LEN(hash), 1); @@ -276,7 +276,7 @@ static int php_password_argon2_get_info(zval *return_value, const zend_string *h return SUCCESS; } -static zend_bool php_password_argon2_needs_rehash(const zend_string *hash, zend_array *options) { +static bool php_password_argon2_needs_rehash(const zend_string *hash, zend_array *options) { zend_long v = 0; zend_long new_memory_cost = PHP_PASSWORD_ARGON2_MEMORY_COST, memory_cost = 0; zend_long new_time_cost = PHP_PASSWORD_ARGON2_TIME_COST, time_cost = 0; @@ -384,7 +384,7 @@ static zend_string *php_password_argon2_hash(const zend_string *password, zend_a /* argon2i specific methods */ -static zend_bool php_password_argon2i_verify(const zend_string *password, const zend_string *hash) { +static bool php_password_argon2i_verify(const zend_string *password, const zend_string *hash) { return ARGON2_OK == argon2_verify(ZSTR_VAL(hash), ZSTR_VAL(password), ZSTR_LEN(password), Argon2_i); } @@ -403,7 +403,7 @@ const php_password_algo php_password_algo_argon2i = { /* argon2id specific methods */ -static zend_bool php_password_argon2id_verify(const zend_string *password, const zend_string *hash) { +static bool php_password_argon2id_verify(const zend_string *password, const zend_string *hash) { return ARGON2_OK == argon2_verify(ZSTR_VAL(hash), ZSTR_VAL(password), ZSTR_LEN(password), Argon2_id); } @@ -487,7 +487,7 @@ const php_password_algo* php_password_algo_find(const zend_string *ident) { return Z_PTR_P(tmp); } -static const php_password_algo* php_password_algo_find_zval(zend_string *arg_str, zend_long arg_long, zend_bool arg_is_null) { +static const php_password_algo* php_password_algo_find_zval(zend_string *arg_str, zend_long arg_long, bool arg_is_null) { if (arg_is_null) { return php_password_algo_default(); } @@ -601,7 +601,7 @@ PHP_FUNCTION(password_needs_rehash) zend_string *hash; zend_string *new_algo_str; zend_long new_algo_long; - zend_bool new_algo_is_null; + bool new_algo_is_null; zend_array *options = 0; ZEND_PARSE_PARAMETERS_START(2, 3) @@ -649,7 +649,7 @@ PHP_FUNCTION(password_hash) zend_string *password, *digest = NULL; zend_string *algo_str; zend_long algo_long; - zend_bool algo_is_null; + bool algo_is_null; const php_password_algo *algo; zend_array *options = NULL; diff --git a/ext/standard/php_array.h b/ext/standard/php_array.h index a49e12488f..e1e43b5aaf 100644 --- a/ext/standard/php_array.h +++ b/ext/standard/php_array.h @@ -46,7 +46,7 @@ PHPAPI zend_long php_count_recursive(HashTable *ht); ZEND_BEGIN_MODULE_GLOBALS(array) bucket_compare_func_t *multisort_func; - zend_bool compare_deprecation_thrown; + bool compare_deprecation_thrown; ZEND_END_MODULE_GLOBALS(array) #define ARRAYG(v) ZEND_MODULE_GLOBALS_ACCESSOR(array, v) diff --git a/ext/standard/php_crypt.h b/ext/standard/php_crypt.h index a7eabbdd66..572248655e 100644 --- a/ext/standard/php_crypt.h +++ b/ext/standard/php_crypt.h @@ -19,7 +19,7 @@ #ifndef PHP_CRYPT_H #define PHP_CRYPT_H -PHPAPI zend_string *php_crypt(const char *password, const int pass_len, const char *salt, int salt_len, zend_bool quiet); +PHPAPI zend_string *php_crypt(const char *password, const int pass_len, const char *salt, int salt_len, bool quiet); PHP_MINIT_FUNCTION(crypt); PHP_MSHUTDOWN_FUNCTION(crypt); PHP_RINIT_FUNCTION(crypt); diff --git a/ext/standard/php_filestat.h b/ext/standard/php_filestat.h index 13b79a4e07..4f76fc39c3 100644 --- a/ext/standard/php_filestat.h +++ b/ext/standard/php_filestat.h @@ -40,7 +40,7 @@ PHP_RSHUTDOWN_FUNCTION(filestat); /* Compatibility. */ typedef size_t php_stat_len; -PHPAPI void php_clear_stat_cache(zend_bool clear_realpath_cache, const char *filename, size_t filename_len); +PHPAPI void php_clear_stat_cache(bool clear_realpath_cache, const char *filename, size_t filename_len); PHPAPI void php_stat(const char *filename, size_t filename_length, int type, zval *return_value); /* Switches for various filestat functions: */ diff --git a/ext/standard/php_incomplete_class.h b/ext/standard/php_incomplete_class.h index f36fd43cfc..fc2caaa62c 100644 --- a/ext/standard/php_incomplete_class.h +++ b/ext/standard/php_incomplete_class.h @@ -40,7 +40,7 @@ extern PHPAPI zend_class_entry *php_ce_incomplete_class; #define PHP_CLASS_ATTRIBUTES \ zend_string *class_name; \ - zend_bool incomplete_class ZEND_ATTRIBUTE_UNUSED = 0 + bool incomplete_class ZEND_ATTRIBUTE_UNUSED = 0 #define INCOMPLETE_CLASS "__PHP_Incomplete_Class" #define MAGIC_MEMBER "__PHP_Incomplete_Class_Name" diff --git a/ext/standard/php_password.h b/ext/standard/php_password.h index 45a21c5c34..2f40e18a34 100644 --- a/ext/standard/php_password.h +++ b/ext/standard/php_password.h @@ -37,10 +37,10 @@ PHP_MSHUTDOWN_FUNCTION(password); typedef struct _php_password_algo { const char *name; zend_string *(*hash)(const zend_string *password, zend_array *options); - zend_bool (*verify)(const zend_string *password, const zend_string *hash); - zend_bool (*needs_rehash)(const zend_string *password, zend_array *options); + bool (*verify)(const zend_string *password, const zend_string *hash); + bool (*needs_rehash)(const zend_string *password, zend_array *options); int (*get_info)(zval *return_value, const zend_string *hash); - zend_bool (*valid)(const zend_string *hash); + bool (*valid)(const zend_string *hash); } php_password_algo; extern const php_password_algo php_password_algo_bcrypt; diff --git a/ext/standard/php_random.h b/ext/standard/php_random.h index 290b37873d..0732e74031 100644 --- a/ext/standard/php_random.h +++ b/ext/standard/php_random.h @@ -34,8 +34,8 @@ typedef struct { #define php_random_int_silent(min, max, result) \ php_random_int((min), (max), (result), 0) -PHPAPI int php_random_bytes(void *bytes, size_t size, zend_bool should_throw); -PHPAPI int php_random_int(zend_long min, zend_long max, zend_long *result, zend_bool should_throw); +PHPAPI int php_random_bytes(void *bytes, size_t size, bool should_throw); +PHPAPI int php_random_int(zend_long min, zend_long max, zend_long *result, bool should_throw); #ifdef ZTS # define RANDOM_G(v) ZEND_TSRMG(random_globals_id, php_random_globals *, v) diff --git a/ext/standard/php_string.h b/ext/standard/php_string.h index 43e50dffc1..fa1ebe4411 100644 --- a/ext/standard/php_string.h +++ b/ext/standard/php_string.h @@ -52,14 +52,14 @@ PHPAPI zend_string *php_str_to_str(const char *haystack, size_t length, const ch size_t needle_len, const char *str, size_t str_len); PHPAPI zend_string *php_trim(zend_string *str, const char *what, size_t what_len, int mode); PHPAPI size_t php_strip_tags(char *rbuf, size_t len, const char *allow, size_t allow_len); -PHPAPI size_t php_strip_tags_ex(char *rbuf, size_t len, const char *allow, size_t allow_len, zend_bool allow_tag_spaces); +PHPAPI size_t php_strip_tags_ex(char *rbuf, size_t len, const char *allow, size_t allow_len, bool allow_tag_spaces); PHPAPI void php_implode(const zend_string *delim, HashTable *arr, zval *return_value); PHPAPI void php_explode(const zend_string *delim, zend_string *str, zval *return_value, zend_long limit); PHPAPI size_t php_strspn(const char *s1, const char *s2, const char *s1_end, const char *s2_end); PHPAPI size_t php_strcspn(const char *s1, const char *s2, const char *s1_end, const char *s2_end); -PHPAPI int string_natural_compare_function_ex(zval *result, zval *op1, zval *op2, zend_bool case_insensitive); +PHPAPI int string_natural_compare_function_ex(zval *result, zval *op1, zval *op2, bool case_insensitive); PHPAPI int string_natural_compare_function(zval *result, zval *op1, zval *op2); PHPAPI int string_natural_case_compare_function(zval *result, zval *op1, zval *op2); diff --git a/ext/standard/proc_open.c b/ext/standard/proc_open.c index 03b55c3eac..bcf4a3a35d 100644 --- a/ext/standard/proc_open.c +++ b/ext/standard/proc_open.c @@ -520,7 +520,7 @@ static char *create_win_command_from_args(HashTable *args) { smart_string str = {0}; zval *arg_zv; - zend_bool is_prog_name = 1; + bool is_prog_name = 1; int elem_num = 0; ZEND_HASH_FOREACH_VAL(args, arg_zv) { diff --git a/ext/standard/random.c b/ext/standard/random.c index 526347f565..8ab637af7d 100644 --- a/ext/standard/random.c +++ b/ext/standard/random.c @@ -84,7 +84,7 @@ PHP_MSHUTDOWN_FUNCTION(random) /* }}} */ /* {{{ php_random_bytes */ -PHPAPI int php_random_bytes(void *bytes, size_t size, zend_bool should_throw) +PHPAPI int php_random_bytes(void *bytes, size_t size, bool should_throw) { #ifdef PHP_WIN32 /* Defer to CryptGenRandom on Windows */ @@ -222,7 +222,7 @@ PHP_FUNCTION(random_bytes) /* }}} */ /* {{{ */ -PHPAPI int php_random_int(zend_long min, zend_long max, zend_long *result, zend_bool should_throw) +PHPAPI int php_random_int(zend_long min, zend_long max, zend_long *result, bool should_throw) { zend_ulong umax; zend_ulong trial; diff --git a/ext/standard/sha1.c b/ext/standard/sha1.c index f5668b9283..810871212c 100644 --- a/ext/standard/sha1.c +++ b/ext/standard/sha1.c @@ -30,7 +30,7 @@ PHPAPI void make_sha1_digest(char *sha1str, const unsigned char *digest) PHP_FUNCTION(sha1) { zend_string *arg; - zend_bool raw_output = 0; + bool raw_output = 0; PHP_SHA1_CTX context; unsigned char digest[20]; @@ -60,7 +60,7 @@ PHP_FUNCTION(sha1_file) { char *arg; size_t arg_len; - zend_bool raw_output = 0; + bool raw_output = 0; unsigned char buf[1024]; unsigned char digest[20]; PHP_SHA1_CTX context; diff --git a/ext/standard/streamsfuncs.c b/ext/standard/streamsfuncs.c index 9ca2def099..e6584ca510 100644 --- a/ext/standard/streamsfuncs.c +++ b/ext/standard/streamsfuncs.c @@ -89,7 +89,7 @@ PHP_FUNCTION(stream_socket_client) zend_string *host; zval *zerrno = NULL, *zerrstr = NULL, *zcontext = NULL; double timeout; - zend_bool timeout_is_null = 1; + bool timeout_is_null = 1; php_timeout_ull conv; struct timeval tv; char *hashkey = NULL; @@ -244,7 +244,7 @@ PHP_FUNCTION(stream_socket_server) PHP_FUNCTION(stream_socket_accept) { double timeout; - zend_bool timeout_is_null = 1; + bool timeout_is_null = 1; zval *zpeername = NULL; zend_string *peername = NULL; php_timeout_ull conv; @@ -305,7 +305,7 @@ PHP_FUNCTION(stream_socket_get_name) { php_stream *stream; zval *zstream; - zend_bool want_peer; + bool want_peer; zend_string *name = NULL; ZEND_PARSE_PARAMETERS_START(2, 2) @@ -419,7 +419,7 @@ PHP_FUNCTION(stream_get_contents) php_stream *stream; zval *zsrc; zend_long maxlen, desiredpos = -1L; - zend_bool maxlen_is_null = 1; + bool maxlen_is_null = 1; zend_string *contents; ZEND_PARSE_PARAMETERS_START(1, 3) @@ -476,7 +476,7 @@ PHP_FUNCTION(stream_copy_to_stream) php_stream *src, *dest; zval *zsrc, *zdest; zend_long maxlen, pos = 0; - zend_bool maxlen_is_null = 1; + bool maxlen_is_null = 1; size_t len; int ret; @@ -748,7 +748,7 @@ PHP_FUNCTION(stream_select) php_socket_t max_fd = 0; int retval, sets = 0; zend_long sec, usec = 0; - zend_bool secnull; + bool secnull; int set_count, max_set_count = 0; ZEND_PARSE_PARAMETERS_START(4, 5) @@ -1313,7 +1313,7 @@ PHP_FUNCTION(stream_get_line) PHP_FUNCTION(stream_set_blocking) { zval *zstream; - zend_bool block; + bool block; php_stream *stream; ZEND_PARSE_PARAMETERS_START(2, 2) @@ -1478,7 +1478,7 @@ PHP_FUNCTION(stream_socket_enable_crypto) zend_long cryptokind = 0; zval *zstream, *zsessstream = NULL; php_stream *stream, *sessstream = NULL; - zend_bool enable, cryptokindnull = 1; + bool enable, cryptokindnull = 1; int ret; ZEND_PARSE_PARAMETERS_START(2, 4) @@ -1641,7 +1641,7 @@ PHP_FUNCTION(sapi_windows_vt100_support) { zval *zsrc; php_stream *stream; - zend_bool enable, enable_is_null = 1; + bool enable, enable_is_null = 1; zend_long fileno; ZEND_PARSE_PARAMETERS_START(1, 2) diff --git a/ext/standard/string.c b/ext/standard/string.c index 05cb98351b..cb37176273 100644 --- a/ext/standard/string.c +++ b/ext/standard/string.c @@ -248,7 +248,7 @@ static void php_spn_common_handler(INTERNAL_FUNCTION_PARAMETERS, int behavior) / { zend_string *s11, *s22; zend_long start = 0, len = 0; - zend_bool len_is_null = 1; + bool len_is_null = 1; ZEND_PARSE_PARAMETERS_START(2, 4) Z_PARAM_STR(s11) @@ -886,7 +886,7 @@ PHP_FUNCTION(wordwrap) size_t alloced; zend_long current = 0, laststart = 0, lastspace = 0; zend_long linelength = 75; - zend_bool docut = 0; + bool docut = 0; zend_string *newtext; ZEND_PARSE_PARAMETERS_START(1, 4) @@ -1739,7 +1739,7 @@ PHP_FUNCTION(stristr) size_t found_offset; char *haystack_dup; char *orig_needle; - zend_bool part = 0; + bool part = 0; ZEND_PARSE_PARAMETERS_START(2, 3) Z_PARAM_STR(haystack) @@ -1774,7 +1774,7 @@ PHP_FUNCTION(strstr) zend_string *haystack, *needle; const char *found = NULL; zend_long found_offset; - zend_bool part = 0; + bool part = 0; ZEND_PARSE_PARAMETERS_START(2, 3) Z_PARAM_STR(haystack) @@ -2164,7 +2164,7 @@ PHP_FUNCTION(substr) { zend_string *str; zend_long l = 0, f; - zend_bool len_is_null = 1; + bool len_is_null = 1; ZEND_PARSE_PARAMETERS_START(2, 3) Z_PARAM_STR(str) @@ -2220,7 +2220,7 @@ PHP_FUNCTION(substr_replace) zend_long from_long; HashTable *len_ht = NULL; zend_long len_long; - zend_bool len_is_null = 1; + bool len_is_null = 1; zend_long l = 0; zend_long f; zend_string *result; @@ -4451,7 +4451,7 @@ PHP_FUNCTION(nl2br) zend_string *str; char *target; size_t repl_cnt = 0; - zend_bool is_xhtml = 1; + bool is_xhtml = 1; zend_string *result; ZEND_PARSE_PARAMETERS_START(1, 2) @@ -4798,7 +4798,7 @@ PHPAPI size_t php_strip_tags(char *rbuf, size_t len, const char *allow, size_t a swm: Added ability to strip <?xml tags without assuming it PHP code. */ -PHPAPI size_t php_strip_tags_ex(char *rbuf, size_t len, const char *allow, size_t allow_len, zend_bool allow_tag_spaces) +PHPAPI size_t php_strip_tags_ex(char *rbuf, size_t len, const char *allow, size_t allow_len, bool allow_tag_spaces) { char *tbuf, *tp, *rp, c, lc; const char *buf, *p, *end; @@ -5286,7 +5286,7 @@ static void php_strnatcmp(INTERNAL_FUNCTION_PARAMETERS, int fold_case) } /* }}} */ -PHPAPI int string_natural_compare_function_ex(zval *result, zval *op1, zval *op2, zend_bool case_insensitive) /* {{{ */ +PHPAPI int string_natural_compare_function_ex(zval *result, zval *op1, zval *op2, bool case_insensitive) /* {{{ */ { zend_string *tmp_str1, *tmp_str2; zend_string *str1 = zval_get_tmp_string(op1, &tmp_str1); @@ -5385,7 +5385,7 @@ PHP_FUNCTION(substr_count) { char *haystack, *needle; zend_long offset = 0, length = 0; - zend_bool length_is_null = 1; + bool length_is_null = 1; zend_long count = 0; size_t haystack_len, needle_len; const char *p, *endp; @@ -5859,8 +5859,8 @@ PHP_FUNCTION(substr_compare) { zend_string *s1, *s2; zend_long offset, len=0; - zend_bool len_is_default=1; - zend_bool cs=0; + bool len_is_default=1; + bool cs=0; size_t cmp_len; ZEND_PARSE_PARAMETERS_START(3, 5) diff --git a/ext/standard/type.c b/ext/standard/type.c index 5a8b2a0b9d..afe0e7afc2 100644 --- a/ext/standard/type.c +++ b/ext/standard/type.c @@ -390,8 +390,8 @@ PHP_FUNCTION(is_callable) zval *var, *callable_name = NULL; zend_string *name; char *error; - zend_bool retval; - zend_bool syntax_only = 0; + bool retval; + bool syntax_only = 0; int check_flags = 0; ZEND_PARSE_PARAMETERS_START(1, 3) diff --git a/ext/standard/uniqid.c b/ext/standard/uniqid.c index 89c4bc8736..0dc9098af0 100644 --- a/ext/standard/uniqid.c +++ b/ext/standard/uniqid.c @@ -41,7 +41,7 @@ ZEND_TLS struct timeval prev_tv = { 0, 0 }; PHP_FUNCTION(uniqid) { char *prefix = ""; - zend_bool more_entropy = 0; + bool more_entropy = 0; zend_string *uniqid; int sec, usec; size_t prefix_len = 0; diff --git a/ext/standard/url.c b/ext/standard/url.c index 113e010024..c700367ee1 100644 --- a/ext/standard/url.c +++ b/ext/standard/url.c @@ -111,13 +111,13 @@ static int is_userinfo_valid(const char *str, size_t len) /* {{{ php_url_parse */ PHPAPI php_url *php_url_parse_ex(char const *str, size_t length) { - zend_bool has_port; + bool has_port; return php_url_parse_ex2(str, length, &has_port); } /* {{{ php_url_parse_ex2 */ -PHPAPI php_url *php_url_parse_ex2(char const *str, size_t length, zend_bool *has_port) +PHPAPI php_url *php_url_parse_ex2(char const *str, size_t length, bool *has_port) { char port_buf[6]; php_url *ret = ecalloc(1, sizeof(php_url)); @@ -355,7 +355,7 @@ PHP_FUNCTION(parse_url) php_url *resource; zend_long key = -1; zval tmp; - zend_bool has_port; + bool has_port; ZEND_PARSE_PARAMETERS_START(1, 2) Z_PARAM_STRING(str, str_len) @@ -478,7 +478,7 @@ static int php_htoi(char *s) static const unsigned char hexchars[] = "0123456789ABCDEF"; -static zend_always_inline zend_string *php_url_encode_impl(const char *s, size_t len, zend_bool raw) /* {{{ */ { +static zend_always_inline zend_string *php_url_encode_impl(const char *s, size_t len, bool raw) /* {{{ */ { register unsigned char c; unsigned char *to; unsigned char const *from, *end; @@ -703,7 +703,7 @@ PHP_FUNCTION(get_headers) size_t url_len; php_stream *stream; zval *prev_val, *hdr = NULL; - zend_bool format = 0; + bool format = 0; zval *zcontext = NULL; php_stream_context *context; diff --git a/ext/standard/url.h b/ext/standard/url.h index a751aa4ee1..6483b7211b 100644 --- a/ext/standard/url.h +++ b/ext/standard/url.h @@ -31,7 +31,7 @@ typedef struct php_url { PHPAPI void php_url_free(php_url *theurl); PHPAPI php_url *php_url_parse(char const *str); PHPAPI php_url *php_url_parse_ex(char const *str, size_t length); -PHPAPI php_url *php_url_parse_ex2(char const *str, size_t length, zend_bool *has_port); +PHPAPI php_url *php_url_parse_ex2(char const *str, size_t length, bool *has_port); PHPAPI size_t php_url_decode(char *str, size_t len); /* return value: length of decoded string */ PHPAPI size_t php_raw_url_decode(char *str, size_t len); /* return value: length of decoded string */ PHPAPI zend_string *php_url_encode(char const *s, size_t len); diff --git a/ext/standard/url_scanner_ex.re b/ext/standard/url_scanner_ex.re index bef17733e2..7cfd848717 100644 --- a/ext/standard/url_scanner_ex.re +++ b/ext/standard/url_scanner_ex.re @@ -619,7 +619,7 @@ PHPAPI char *php_url_scanner_adapt_single_url(const char *url, size_t urllen, co } -static char *url_adapt_ext(const char *src, size_t srclen, size_t *newlen, zend_bool do_flush, url_adapt_state_ex_t *ctx) +static char *url_adapt_ext(const char *src, size_t srclen, size_t *newlen, bool do_flush, url_adapt_state_ex_t *ctx) { char *retval; @@ -690,7 +690,7 @@ static inline void php_url_scanner_session_handler_impl(char *output, size_t out } if (ZSTR_LEN(url_state->url_app.s) != 0) { - *handled_output = url_adapt_ext(output, output_len, &len, (zend_bool) (mode & (PHP_OUTPUT_HANDLER_END | PHP_OUTPUT_HANDLER_CONT | PHP_OUTPUT_HANDLER_FLUSH | PHP_OUTPUT_HANDLER_FINAL) ? 1 : 0), url_state); + *handled_output = url_adapt_ext(output, output_len, &len, (bool) (mode & (PHP_OUTPUT_HANDLER_END | PHP_OUTPUT_HANDLER_CONT | PHP_OUTPUT_HANDLER_FLUSH | PHP_OUTPUT_HANDLER_FINAL) ? 1 : 0), url_state); if (sizeof(unsigned int) < sizeof(size_t)) { if (len > UINT_MAX) len = UINT_MAX; @@ -842,7 +842,7 @@ static inline int php_url_scanner_reset_var_impl(zend_string *name, int encode, smart_str form_app = {0}; zend_string *encoded; int ret = SUCCESS; - zend_bool sep_removed = 0; + bool sep_removed = 0; url_adapt_state_ex_t *url_state; if (type) { diff --git a/ext/standard/user_filters.c b/ext/standard/user_filters.c index 758f79ff11..6c5574f991 100644 --- a/ext/standard/user_filters.c +++ b/ext/standard/user_filters.c @@ -42,7 +42,7 @@ static int le_bucket; PHP_METHOD(php_user_filter, filter) { zval *in, *out, *consumed; - zend_bool closing; + bool closing; if (zend_parse_parameters(ZEND_NUM_ARGS(), "rrzb", &in, &out, &consumed, &closing) == FAILURE) { RETURN_THROWS(); } diff --git a/ext/standard/var.c b/ext/standard/var.c index 91cc95c6bd..5c13846a82 100644 --- a/ext/standard/var.c +++ b/ext/standard/var.c @@ -620,7 +620,7 @@ PHPAPI void php_var_export(zval *struc, int level) /* {{{ */ PHP_FUNCTION(var_export) { zval *var; - zend_bool return_output = 0; + bool return_output = 0; smart_str buf = {0}; ZEND_PARSE_PARAMETERS_START(1, 2) @@ -647,7 +647,7 @@ static inline zend_long php_add_var_hash(php_serialize_data_t data, zval *var) / { zval *zv; zend_ulong key; - zend_bool is_ref = Z_ISREF_P(var); + bool is_ref = Z_ISREF_P(var); data->n += 1; @@ -707,7 +707,7 @@ static inline void php_var_serialize_string(smart_str *buf, char *str, size_t le } /* }}} */ -static inline zend_bool php_var_serialize_class_name(smart_str *buf, zval *struc) /* {{{ */ +static inline bool php_var_serialize_class_name(smart_str *buf, zval *struc) /* {{{ */ { PHP_CLASS_ATTRIBUTES; @@ -877,7 +877,7 @@ static int php_var_serialize_get_sleep_props( } /* }}} */ -static void php_var_serialize_nested_data(smart_str *buf, zval *struc, HashTable *ht, uint32_t count, zend_bool incomplete_class, php_serialize_data_t var_hash) /* {{{ */ +static void php_var_serialize_nested_data(smart_str *buf, zval *struc, HashTable *ht, uint32_t count, bool incomplete_class, php_serialize_data_t var_hash) /* {{{ */ { smart_str_append_unsigned(buf, count); smart_str_appendl(buf, ":{", 2); @@ -998,7 +998,7 @@ again: case IS_OBJECT: { zend_class_entry *ce = Z_OBJCE_P(struc); - zend_bool incomplete_class; + bool incomplete_class; uint32_t count; if (ce->__serialize) { @@ -1309,7 +1309,7 @@ PHP_FUNCTION(unserialize) /* {{{ Returns the allocated by PHP memory */ PHP_FUNCTION(memory_get_usage) { - zend_bool real_usage = 0; + bool real_usage = 0; ZEND_PARSE_PARAMETERS_START(0, 1) Z_PARAM_OPTIONAL @@ -1322,7 +1322,7 @@ PHP_FUNCTION(memory_get_usage) { /* {{{ Returns the peak allocated by PHP memory */ PHP_FUNCTION(memory_get_peak_usage) { - zend_bool real_usage = 0; + bool real_usage = 0; ZEND_PARSE_PARAMETERS_START(0, 1) Z_PARAM_OPTIONAL diff --git a/ext/standard/var_unserializer.re b/ext/standard/var_unserializer.re index 1b191a0367..c5a1476938 100644 --- a/ext/standard/var_unserializer.re +++ b/ext/standard/var_unserializer.re @@ -217,7 +217,7 @@ PHPAPI void var_destroy(php_unserialize_data_t *var_hashx) zend_long i; var_entries *var_hash = (*var_hashx)->entries.next; var_dtor_entries *var_dtor_hash = (*var_hashx)->first_dtor; - zend_bool delayed_call_failed = 0; + bool delayed_call_failed = 0; zval wakeup_name; ZVAL_UNDEF(&wakeup_name); @@ -688,10 +688,10 @@ static inline int object_custom(UNSERIALIZE_PARAMETER, zend_class_entry *ce) #ifdef PHP_WIN32 # pragma optimize("", off) #endif -static inline int object_common(UNSERIALIZE_PARAMETER, zend_long elements, zend_bool has_unserialize) +static inline int object_common(UNSERIALIZE_PARAMETER, zend_long elements, bool has_unserialize) { HashTable *ht; - zend_bool has_wakeup; + bool has_wakeup; if (has_unserialize) { zval ary, *tmp; @@ -1034,9 +1034,9 @@ object ":" uiv ":" ["] { char *str; zend_string *class_name; zend_class_entry *ce; - zend_bool incomplete_class = 0; - zend_bool custom_object = 0; - zend_bool has_unserialize = 0; + bool incomplete_class = 0; + bool custom_object = 0; + bool has_unserialize = 0; zval user_func; zval retval; diff --git a/ext/sysvmsg/sysvmsg.c b/ext/sysvmsg/sysvmsg.c index c12eaa0674..8f24d7e017 100644 --- a/ext/sysvmsg/sysvmsg.c +++ b/ext/sysvmsg/sysvmsg.c @@ -281,7 +281,7 @@ PHP_FUNCTION(msg_receive) zval *out_message, *queue, *out_msgtype, *zerrcode = NULL; zend_long desiredmsgtype, maxsize, flags = 0; zend_long realflags = 0; - zend_bool do_unserialize = 1; + bool do_unserialize = 1; sysvmsg_queue_t *mq = NULL; struct php_msgbuf *messagebuffer = NULL; /* buffer to transmit */ int result; @@ -363,7 +363,7 @@ PHP_FUNCTION(msg_send) { zval *message, *queue, *zerror=NULL; zend_long msgtype; - zend_bool do_serialize = 1, blocking = 1; + bool do_serialize = 1, blocking = 1; sysvmsg_queue_t * mq = NULL; struct php_msgbuf * messagebuffer = NULL; /* buffer to transmit */ int result; diff --git a/ext/sysvsem/sysvsem.c b/ext/sysvsem/sysvsem.c index dbde858ab9..46116e212e 100644 --- a/ext/sysvsem/sysvsem.c +++ b/ext/sysvsem/sysvsem.c @@ -188,7 +188,7 @@ PHP_MINFO_FUNCTION(sysvsem) PHP_FUNCTION(sem_get) { zend_long key, max_acquire = 1, perm = 0666; - zend_bool auto_release = 1; + bool auto_release = 1; int semid; struct sembuf sop[3]; int count; @@ -298,7 +298,7 @@ PHP_FUNCTION(sem_get) static void php_sysvsem_semop(INTERNAL_FUNCTION_PARAMETERS, int acquire) { zval *arg_id; - zend_bool nowait = 0; + bool nowait = 0; sysvsem_sem *sem_ptr; struct sembuf sop; diff --git a/ext/sysvshm/sysvshm.c b/ext/sysvshm/sysvshm.c index e3a6d9501b..96b437b419 100644 --- a/ext/sysvshm/sysvshm.c +++ b/ext/sysvshm/sysvshm.c @@ -136,7 +136,7 @@ PHP_FUNCTION(shm_attach) char *shm_ptr; sysvshm_chunk_head *chunk_ptr; zend_long shm_key, shm_id, shm_size, shm_flag = 0666; - zend_bool shm_size_is_null = 1; + bool shm_size_is_null = 1; if (SUCCESS != zend_parse_parameters(ZEND_NUM_ARGS(), "l|l!l", &shm_key, &shm_size, &shm_size_is_null, &shm_flag)) { RETURN_THROWS(); diff --git a/ext/tidy/php_tidy.h b/ext/tidy/php_tidy.h index ab9e90eb93..35869482e1 100644 --- a/ext/tidy/php_tidy.h +++ b/ext/tidy/php_tidy.h @@ -25,7 +25,7 @@ extern zend_module_entry tidy_module_entry; ZEND_BEGIN_MODULE_GLOBALS(tidy) char *default_config; - zend_bool clean_output; + bool clean_output; ZEND_END_MODULE_GLOBALS(tidy) #define TG(v) ZEND_MODULE_GLOBALS_ACCESSOR(tidy, v) diff --git a/ext/tidy/tidy.c b/ext/tidy/tidy.c index 5b53f65578..40c55c4add 100644 --- a/ext/tidy/tidy.c +++ b/ext/tidy/tidy.c @@ -205,7 +205,7 @@ static inline PHPTidyObj *php_tidy_fetch_object(zend_object *obj) { /* }}} */ /* {{{ ext/tidy prototypes */ -static zend_string *php_tidy_file_to_mem(char *, zend_bool); +static zend_string *php_tidy_file_to_mem(char *, bool); static void tidy_object_free_storage(zend_object *); static zend_object *tidy_object_new_node(zend_class_entry *); static zend_object *tidy_object_new_doc(zend_class_entry *); @@ -335,7 +335,7 @@ static int _php_tidy_set_tidy_opt(TidyDoc doc, char *optname, zval *value) return FAILURE; } -static void php_tidy_quick_repair(INTERNAL_FUNCTION_PARAMETERS, zend_bool is_file) +static void php_tidy_quick_repair(INTERNAL_FUNCTION_PARAMETERS, bool is_file) { char *enc = NULL; size_t enc_len = 0; @@ -345,7 +345,7 @@ static void php_tidy_quick_repair(INTERNAL_FUNCTION_PARAMETERS, zend_bool is_fil HashTable *config_ht = NULL; if (is_file) { - zend_bool use_include_path = 0; + bool use_include_path = 0; ZEND_PARSE_PARAMETERS_START(1, 4) Z_PARAM_PATH_STR(arg1) @@ -432,7 +432,7 @@ static void php_tidy_quick_repair(INTERNAL_FUNCTION_PARAMETERS, zend_bool is_fil tidyRelease(doc); } -static zend_string *php_tidy_file_to_mem(char *filename, zend_bool use_include_path) +static zend_string *php_tidy_file_to_mem(char *filename, bool use_include_path) { php_stream *stream; zend_string *data = NULL; @@ -895,16 +895,16 @@ static PHP_MINFO_FUNCTION(tidy) static PHP_INI_MH(php_tidy_set_clean_output) { int status; - zend_bool value; + bool value; if (ZSTR_LEN(new_value)==2 && strcasecmp("on", ZSTR_VAL(new_value))==0) { - value = (zend_bool) 1; + value = (bool) 1; } else if (ZSTR_LEN(new_value)==3 && strcasecmp("yes", ZSTR_VAL(new_value))==0) { - value = (zend_bool) 1; + value = (bool) 1; } else if (ZSTR_LEN(new_value)==4 && strcasecmp("true", ZSTR_VAL(new_value))==0) { - value = (zend_bool) 1; + value = (bool) 1; } else { - value = (zend_bool) atoi(ZSTR_VAL(new_value)); + value = (bool) atoi(ZSTR_VAL(new_value)); } if (stage == PHP_INI_STAGE_RUNTIME) { @@ -1063,7 +1063,7 @@ PHP_FUNCTION(tidy_parse_file) { char *enc = NULL; size_t enc_len = 0; - zend_bool use_include_path = 0; + bool use_include_path = 0; zend_string *inputfile, *contents, *options_str = NULL; HashTable *options_ht = NULL; @@ -1357,7 +1357,7 @@ PHP_METHOD(tidy, __construct) { char *enc = NULL; size_t enc_len = 0; - zend_bool use_include_path = 0; + bool use_include_path = 0; HashTable *options_ht = NULL; zend_string *contents, *inputfile = NULL, *options_str = NULL; PHPTidyObj *obj; @@ -1396,7 +1396,7 @@ PHP_METHOD(tidy, parseFile) { char *enc = NULL; size_t enc_len = 0; - zend_bool use_include_path = 0; + bool use_include_path = 0; HashTable *options_ht = NULL; zend_string *inputfile, *contents, *options_str = NULL; PHPTidyObj *obj; diff --git a/ext/tokenizer/tokenizer.c b/ext/tokenizer/tokenizer.c index 7567a270af..43296760e4 100644 --- a/ext/tokenizer/tokenizer.c +++ b/ext/tokenizer/tokenizer.c @@ -89,7 +89,7 @@ static zend_string *php_token_get_text(zval *obj) { return Z_STR_P(text_zval); } -static zend_bool tokenize_common( +static bool tokenize_common( zval *return_value, zend_string *source, zend_long flags, zend_class_entry *token_class); PHP_METHOD(PhpToken, tokenize) @@ -345,7 +345,7 @@ static void add_token( zend_hash_next_index_insert_new(Z_ARRVAL_P(return_value), &token); } -static zend_bool tokenize(zval *return_value, zend_string *source, zend_class_entry *token_class) +static bool tokenize(zval *return_value, zend_string *source, zend_class_entry *token_class) { zval source_zval; zend_lex_state original_lex_state; @@ -477,15 +477,15 @@ void on_event( } } -static zend_bool tokenize_parse( +static bool tokenize_parse( zval *return_value, zend_string *source, zend_class_entry *token_class) { zval source_zval; struct event_context ctx; zval token_stream; zend_lex_state original_lex_state; - zend_bool original_in_compilation; - zend_bool success; + bool original_in_compilation; + bool success; ZVAL_STR_COPY(&source_zval, source); @@ -523,7 +523,7 @@ static zend_bool tokenize_parse( return success; } -static zend_bool tokenize_common( +static bool tokenize_common( zval *return_value, zend_string *source, zend_long flags, zend_class_entry *token_class) { if (flags & TOKEN_PARSE) { diff --git a/ext/xml/xml.c b/ext/xml/xml.c index eebccca19c..ced0ac7d5d 100644 --- a/ext/xml/xml.c +++ b/ext/xml/xml.c @@ -1249,7 +1249,7 @@ PHP_FUNCTION(xml_parse) char *data; size_t data_len; int ret; - zend_bool isFinal = 0; + bool isFinal = 0; if (zend_parse_parameters(ZEND_NUM_ARGS(), "Os|b", &pind, xml_parser_ce, &data, &data_len, &isFinal) == FAILURE) { RETURN_THROWS(); diff --git a/ext/xmlreader/php_xmlreader.c b/ext/xmlreader/php_xmlreader.c index afc8cc80ba..2a8eed34fe 100644 --- a/ext/xmlreader/php_xmlreader.c +++ b/ext/xmlreader/php_xmlreader.c @@ -964,7 +964,7 @@ PHP_METHOD(XMLReader, setParserProperty) zval *id; zend_long property; int retval = -1; - zend_bool value; + bool value; xmlreader_object *intern; if (zend_parse_parameters(ZEND_NUM_ARGS(), "lb", &property, &value) == FAILURE) { diff --git a/ext/xmlwriter/php_xmlwriter.c b/ext/xmlwriter/php_xmlwriter.c index 61e4a3a7d9..6934feb77e 100644 --- a/ext/xmlwriter/php_xmlwriter.c +++ b/ext/xmlwriter/php_xmlwriter.c @@ -252,7 +252,7 @@ PHP_FUNCTION(xmlwriter_set_indent) { xmlTextWriterPtr ptr; int retval; - zend_bool indent; + bool indent; zval *self; if (zend_parse_method_parameters(ZEND_NUM_ARGS(), getThis(), "Ob", &self, xmlwriter_class_entry_ce, &indent) == FAILURE) { @@ -814,7 +814,7 @@ PHP_FUNCTION(xmlwriter_start_dtd_entity) char *name; size_t name_len; int retval; - zend_bool isparm; + bool isparm; zval *self; if (zend_parse_method_parameters(ZEND_NUM_ARGS(), getThis(), "Osb", &self, xmlwriter_class_entry_ce, &name, &name_len, &isparm) == FAILURE) { @@ -851,7 +851,7 @@ PHP_FUNCTION(xmlwriter_write_dtd_entity) int retval; /* Optional parameters */ char *pubid = NULL, *sysid = NULL, *ndataid = NULL; - zend_bool pe = 0; + bool pe = 0; size_t pubid_len, sysid_len, ndataid_len; zval *self; @@ -985,7 +985,7 @@ PHP_FUNCTION(xmlwriter_open_memory) static void php_xmlwriter_flush(INTERNAL_FUNCTION_PARAMETERS, int force_string) { xmlTextWriterPtr ptr; xmlBufferPtr buffer; - zend_bool empty = 1; + bool empty = 1; int output_bytes; zval *self; diff --git a/ext/zip/php_zip.c b/ext/zip/php_zip.c index 6875850687..fd1585d472 100644 --- a/ext/zip/php_zip.c +++ b/ext/zip/php_zip.c @@ -2996,7 +2996,7 @@ PHP_METHOD(ZipArchive, registerCancelCallback) PHP_METHOD(ZipArchive, isCompressionMethodSupported) { zend_long method; - zend_bool enc = 1; + bool enc = 1; if (zend_parse_parameters(ZEND_NUM_ARGS(), "l|b", &method, &enc) == FAILURE) { return; @@ -3009,7 +3009,7 @@ PHP_METHOD(ZipArchive, isCompressionMethodSupported) PHP_METHOD(ZipArchive, isEncryptionMethodSupported) { zend_long method; - zend_bool enc = 1; + bool enc = 1; if (zend_parse_parameters(ZEND_NUM_ARGS(), "l|b", &method, &enc) == FAILURE) { return; diff --git a/ext/zlib/php_zlib.h b/ext/zlib/php_zlib.h index 6c43625217..d32bac7346 100644 --- a/ext/zlib/php_zlib.h +++ b/ext/zlib/php_zlib.h @@ -57,7 +57,7 @@ ZEND_BEGIN_MODULE_GLOBALS(zlib) char *output_handler; php_zlib_context *ob_gzhandler; zend_long output_compression_default; - zend_bool handler_registered; + bool handler_registered; int compression_coding; ZEND_END_MODULE_GLOBALS(zlib); diff --git a/ext/zlib/zlib.c b/ext/zlib/zlib.c index eab3b02ca5..b284b8a494 100644 --- a/ext/zlib/zlib.c +++ b/ext/zlib/zlib.c @@ -788,7 +788,7 @@ PHP_ZLIB_DECODE_FUNC(gzdecode, PHP_ZLIB_ENCODING_GZIP); PHP_ZLIB_DECODE_FUNC(gzuncompress, PHP_ZLIB_ENCODING_DEFLATE); /* }}} */ -static zend_bool zlib_create_dictionary_string(HashTable *options, char **dict, size_t *dictlen) { +static bool zlib_create_dictionary_string(HashTable *options, char **dict, size_t *dictlen) { zval *option_buffer; if (options && (option_buffer = zend_hash_str_find(options, ZEND_STRL("dictionary"))) != NULL) { diff --git a/ext/zlib/zlib_filter.c b/ext/zlib/zlib_filter.c index cdd981afde..1723ef904f 100644 --- a/ext/zlib/zlib_filter.c +++ b/ext/zlib/zlib_filter.c @@ -27,7 +27,7 @@ typedef struct _php_zlib_filter_data { unsigned char *outbuf; size_t outbuf_len; int persistent; - zend_bool finished; /* for zlib.deflate: signals that no flush is pending */ + bool finished; /* for zlib.deflate: signals that no flush is pending */ } php_zlib_filter_data; /* }}} */ |
