@@ -712,7 +712,7 @@ PHP_FUNCTION(dom_document_create_element)
712
712
RETURN_FALSE ;
713
713
}
714
714
715
- node = xmlNewDocNode (docp , NULL , name , value );
715
+ node = xmlNewDocNode (docp , NULL , ( xmlChar * ) name , ( xmlChar * ) value );
716
716
if (!node ) {
717
717
RETURN_FALSE ;
718
718
}
@@ -931,7 +931,7 @@ PHP_FUNCTION(dom_document_create_entity_reference)
931
931
RETURN_FALSE ;
932
932
}
933
933
934
- node = xmlNewReference (docp , name );
934
+ node = xmlNewReference (docp , ( xmlChar * ) name );
935
935
if (!node ) {
936
936
RETURN_FALSE ;
937
937
}
@@ -1048,9 +1048,9 @@ PHP_FUNCTION(dom_document_create_element_ns)
1048
1048
1049
1049
if (errorcode == 0 ) {
1050
1050
if (xmlValidateName ((xmlChar * ) localname , 0 ) == 0 ) {
1051
- nodep = xmlNewDocNode (docp , NULL , localname , value );
1051
+ nodep = xmlNewDocNode (docp , NULL , ( xmlChar * ) localname , ( xmlChar * ) value );
1052
1052
if (nodep != NULL && uri != NULL ) {
1053
- nsptr = xmlSearchNsByHref (nodep -> doc , nodep , uri );
1053
+ nsptr = xmlSearchNsByHref (nodep -> doc , nodep , ( xmlChar * ) uri );
1054
1054
if (nsptr == NULL ) {
1055
1055
nsptr = dom_get_ns (nodep , uri , & errorcode , prefix );
1056
1056
}
@@ -1113,9 +1113,9 @@ PHP_FUNCTION(dom_document_create_attribute_ns)
1113
1113
errorcode = dom_check_qname (name , & localname , & prefix , uri_len , name_len );
1114
1114
if (errorcode == 0 ) {
1115
1115
if (xmlValidateName ((xmlChar * ) localname , 0 ) == 0 ) {
1116
- nodep = (xmlNodePtr ) xmlNewDocProp (docp , localname , NULL );
1116
+ nodep = (xmlNodePtr ) xmlNewDocProp (docp , ( xmlChar * ) localname , NULL );
1117
1117
if (nodep != NULL && uri_len > 0 ) {
1118
- nsptr = xmlSearchNsByHref (nodep -> doc , root , uri );
1118
+ nsptr = xmlSearchNsByHref (nodep -> doc , root , ( xmlChar * ) uri );
1119
1119
if (nsptr == NULL ) {
1120
1120
nsptr = dom_get_ns (root , uri , & errorcode , prefix );
1121
1121
}
@@ -1268,15 +1268,15 @@ PHP_METHOD(domdocument, __construct)
1268
1268
}
1269
1269
1270
1270
zend_restore_error_handling (& error_handling TSRMLS_CC );
1271
- docp = xmlNewDoc (version );
1271
+ docp = xmlNewDoc (( xmlChar * ) version );
1272
1272
1273
1273
if (!docp ) {
1274
1274
php_dom_throw_error (INVALID_STATE_ERR , 1 TSRMLS_CC );
1275
1275
RETURN_FALSE ;
1276
1276
}
1277
1277
1278
1278
if (encoding_len > 0 ) {
1279
- docp -> encoding = (const xmlChar * ) xmlStrdup (encoding );
1279
+ docp -> encoding = (const xmlChar * ) xmlStrdup (( xmlChar * ) encoding );
1280
1280
}
1281
1281
1282
1282
intern = Z_DOMOBJ_P (id );
@@ -1306,8 +1306,8 @@ char *_dom_get_valid_file_path(char *source, char *resolved_path, int resolved_p
1306
1306
int isFileUri = 0 ;
1307
1307
1308
1308
uri = xmlCreateURI ();
1309
- escsource = xmlURIEscapeStr (source , ":" );
1310
- xmlParseURIReference (uri , escsource );
1309
+ escsource = xmlURIEscapeStr (( xmlChar * ) source , ( xmlChar * ) ":" );
1310
+ xmlParseURIReference (uri , ( char * ) escsource );
1311
1311
xmlFree (escsource );
1312
1312
1313
1313
if (uri -> scheme != NULL ) {
@@ -1454,7 +1454,7 @@ static xmlDocPtr dom_document_parser(zval *id, int mode, char *source, size_t so
1454
1454
}
1455
1455
/* If loading from memory, set the base reference uri for the document */
1456
1456
if (ret && ret -> URL == NULL && ctxt -> directory != NULL ) {
1457
- ret -> URL = xmlStrdup (ctxt -> directory );
1457
+ ret -> URL = xmlStrdup (( xmlChar * ) ctxt -> directory );
1458
1458
}
1459
1459
} else {
1460
1460
ret = NULL ;
@@ -1642,7 +1642,7 @@ PHP_FUNCTION(dom_document_savexml)
1642
1642
xmlBufferFree (buf );
1643
1643
RETURN_FALSE ;
1644
1644
}
1645
- RETVAL_STRING (mem );
1645
+ RETVAL_STRING (( char * ) mem );
1646
1646
xmlBufferFree (buf );
1647
1647
} else {
1648
1648
if (options & LIBXML_SAVE_NOEMPTYTAG ) {
@@ -1657,7 +1657,7 @@ PHP_FUNCTION(dom_document_savexml)
1657
1657
if (!size ) {
1658
1658
RETURN_FALSE ;
1659
1659
}
1660
- RETVAL_STRINGL (mem , size );
1660
+ RETVAL_STRINGL (( char * ) mem , size );
1661
1661
xmlFree (mem );
1662
1662
}
1663
1663
}
@@ -1995,7 +1995,7 @@ static void dom_load_html(INTERNAL_FUNCTION_PARAMETERS, int mode) /* {{{ */
1995
1995
if (mode == DOM_LOAD_FILE ) {
1996
1996
ctxt = htmlCreateFileParserCtxt (source , NULL );
1997
1997
} else {
1998
- source_len = xmlStrlen (source );
1998
+ source_len = xmlStrlen (( xmlChar * ) source );
1999
1999
ctxt = htmlCreateMemoryParserCtxt (source , source_len );
2000
2000
}
2001
2001
0 commit comments