diff options
Diffstat (limited to 'ext/tidy/tidy.c')
-rw-r--r-- | ext/tidy/tidy.c | 40 |
1 files changed, 20 insertions, 20 deletions
diff --git a/ext/tidy/tidy.c b/ext/tidy/tidy.c index 5617dca7d6..7fdf6087b4 100644 --- a/ext/tidy/tidy.c +++ b/ext/tidy/tidy.c @@ -554,7 +554,7 @@ static int _php_tidy_set_tidy_opt(TidyDoc doc, char *optname, zval *value TSRMLS static void php_tidy_quick_repair(INTERNAL_FUNCTION_PARAMETERS, zend_bool is_file) { char *enc = NULL; - int enc_len = 0; + size_t enc_len = 0; zend_bool use_include_path = 0; TidyDoc doc; TidyBuffer *errbuf; @@ -627,7 +627,7 @@ static void php_tidy_quick_repair(INTERNAL_FUNCTION_PARAMETERS, zend_bool is_fil } if (is_file) { - STR_RELEASE(data); + zend_string_release(data); } tidyBufFree(errbuf); @@ -1080,14 +1080,14 @@ static PHP_INI_MH(php_tidy_set_clean_output) int status; zend_bool value; - if (new_value_length==2 && strcasecmp("on", new_value)==0) { + if (new_value->len==2 && strcasecmp("on", new_value->val)==0) { value = (zend_bool) 1; - } else if (new_value_length==3 && strcasecmp("yes", new_value)==0) { + } else if (new_value->len==3 && strcasecmp("yes", new_value->val)==0) { value = (zend_bool) 1; - } else if (new_value_length==4 && strcasecmp("true", new_value)==0) { + } else if (new_value->len==4 && strcasecmp("true", new_value->val)==0) { value = (zend_bool) 1; } else { - value = (zend_bool) atoi(new_value); + value = (zend_bool) atoi(new_value->val); } if (stage == PHP_INI_STAGE_RUNTIME) { @@ -1103,7 +1103,7 @@ static PHP_INI_MH(php_tidy_set_clean_output) } } - status = OnUpdateBool(entry, new_value, new_value_length, mh_arg1, mh_arg2, mh_arg3, stage TSRMLS_CC); + status = OnUpdateBool(entry, new_value, mh_arg1, mh_arg2, mh_arg3, stage TSRMLS_CC); if (stage == PHP_INI_STAGE_RUNTIME && value) { if (!php_output_handler_started(ZEND_STRL("ob_tidyhandler") TSRMLS_CC)) { @@ -1182,7 +1182,7 @@ static int php_tidy_output_handler(void **nothing, php_output_context *output_co static PHP_FUNCTION(tidy_parse_string) { char *enc = NULL; - int enc_len = 0; + size_t enc_len = 0; zend_string *input; zval *options = NULL; PHPTidyObj *obj; @@ -1237,7 +1237,7 @@ static PHP_FUNCTION(tidy_get_output) static PHP_FUNCTION(tidy_parse_file) { char *enc = NULL; - int enc_len = 0; + size_t enc_len = 0; zend_bool use_include_path = 0; zend_string *inputfile, *contents; zval *options = NULL; @@ -1264,7 +1264,7 @@ static PHP_FUNCTION(tidy_parse_file) RETVAL_FALSE; } - STR_RELEASE(contents); + zend_string_release(contents); } /* }}} */ @@ -1334,7 +1334,7 @@ static PHP_FUNCTION(tidy_get_opt_doc) { PHPTidyObj *obj; char *optval, *optname; - int optname_len; + size_t optname_len; TidyOption opt; TIDY_SET_CONTEXT; @@ -1396,11 +1396,11 @@ static PHP_FUNCTION(tidy_get_config) break; case TidyInteger: - add_assoc_long(return_value, opt_name, (long)opt_value); + add_assoc_long(return_value, opt_name, (zend_long)opt_value); break; case TidyBoolean: - add_assoc_bool(return_value, opt_name, (long)opt_value); + add_assoc_bool(return_value, opt_name, (zend_long)opt_value); break; } } @@ -1496,7 +1496,7 @@ static PHP_FUNCTION(tidy_getopt) PHPTidyObj *obj; char *optname; void *optval; - int optname_len; + size_t optname_len; TidyOption opt; TidyOptionType optt; @@ -1529,7 +1529,7 @@ static PHP_FUNCTION(tidy_getopt) return; case TidyInteger: - RETURN_LONG((long)optval); + RETURN_LONG((zend_long)optval); break; case TidyBoolean: @@ -1552,7 +1552,7 @@ static PHP_FUNCTION(tidy_getopt) static TIDY_DOC_METHOD(__construct) { char *enc = NULL; - int enc_len = 0; + size_t enc_len = 0; zend_bool use_include_path = 0; zval *options = NULL; zend_string *contents, *inputfile = NULL; @@ -1577,14 +1577,14 @@ static TIDY_DOC_METHOD(__construct) php_tidy_parse_string(obj, contents->val, contents->len, enc TSRMLS_CC); - STR_RELEASE(contents); + zend_string_release(contents); } } static TIDY_DOC_METHOD(parseFile) { char *enc = NULL; - int enc_len = 0; + size_t enc_len = 0; zend_bool use_include_path = 0; zval *options = NULL; zend_string *inputfile, *contents; @@ -1612,13 +1612,13 @@ static TIDY_DOC_METHOD(parseFile) RETVAL_TRUE; } - STR_RELEASE(contents); + zend_string_release(contents); } static TIDY_DOC_METHOD(parseString) { char *enc = NULL; - int enc_len = 0; + size_t enc_len = 0; zval *options = NULL; PHPTidyObj *obj; zend_string *input; |