@@ -99,10 +99,10 @@ typedef enum {
9999} tidy_base_nodetypes ;
100100
101101struct _PHPTidyDoc {
102- TidyDoc doc ;
103- TidyBuffer * errbuf ;
104- unsigned int ref_count ;
105- unsigned int initialized : 1 ;
102+ TidyDoc doc ;
103+ TidyBuffer * errbuf ;
104+ uint32_t ref_count ;
105+ bool initialized ;
106106};
107107
108108struct _PHPTidyObj {
@@ -412,7 +412,7 @@ static void tidy_object_free_storage(zend_object *object)
412412 if (intern -> ptdoc ) {
413413 intern -> ptdoc -> ref_count -- ;
414414
415- if (intern -> ptdoc -> ref_count < = 0 ) {
415+ if (intern -> ptdoc -> ref_count = = 0 ) {
416416 tidyBufFree (intern -> ptdoc -> errbuf );
417417 efree (intern -> ptdoc -> errbuf );
418418 tidyRelease (intern -> ptdoc -> doc );
@@ -437,7 +437,7 @@ static zend_object *tidy_object_new(zend_class_entry *class_type, zend_object_ha
437437 intern -> ptdoc = emalloc (sizeof (PHPTidyDoc ));
438438 intern -> ptdoc -> doc = tidyCreate ();
439439 intern -> ptdoc -> ref_count = 1 ;
440- intern -> ptdoc -> initialized = 0 ;
440+ intern -> ptdoc -> initialized = false ;
441441 intern -> ptdoc -> errbuf = emalloc (sizeof (TidyBuffer ));
442442 tidyBufInit (intern -> ptdoc -> errbuf );
443443
@@ -814,7 +814,7 @@ static int php_tidy_parse_string(PHPTidyObj *obj, const char *string, uint32_t l
814814 }
815815 }
816816
817- obj -> ptdoc -> initialized = 1 ;
817+ obj -> ptdoc -> initialized = true ;
818818
819819 tidyBufInit (& buf );
820820 tidyBufAttach (& buf , (byte * ) string , len );
0 commit comments