28
28
#include "php_xmlwriter.h"
29
29
#include "ext/standard/php_string.h"
30
30
31
- #if LIBXML_VERSION >= 20605
32
31
static PHP_FUNCTION (xmlwriter_set_indent );
33
32
static PHP_FUNCTION (xmlwriter_set_indent_string );
34
- #endif
35
33
static PHP_FUNCTION (xmlwriter_start_attribute );
36
34
static PHP_FUNCTION (xmlwriter_end_attribute );
37
35
static PHP_FUNCTION (xmlwriter_write_attribute );
@@ -55,25 +53,21 @@ static PHP_FUNCTION(xmlwriter_text);
55
53
static PHP_FUNCTION (xmlwriter_write_raw );
56
54
static PHP_FUNCTION (xmlwriter_start_document );
57
55
static PHP_FUNCTION (xmlwriter_end_document );
58
- #if LIBXML_VERSION >= 20607
59
56
static PHP_FUNCTION (xmlwriter_start_comment );
60
57
static PHP_FUNCTION (xmlwriter_end_comment );
61
- #endif
62
58
static PHP_FUNCTION (xmlwriter_write_comment );
63
59
static PHP_FUNCTION (xmlwriter_start_dtd );
64
60
static PHP_FUNCTION (xmlwriter_end_dtd );
65
61
static PHP_FUNCTION (xmlwriter_write_dtd );
66
62
static PHP_FUNCTION (xmlwriter_start_dtd_element );
67
63
static PHP_FUNCTION (xmlwriter_end_dtd_element );
68
64
static PHP_FUNCTION (xmlwriter_write_dtd_element );
69
- #if LIBXML_VERSION > 20608
70
65
static PHP_FUNCTION (xmlwriter_start_dtd_attlist );
71
66
static PHP_FUNCTION (xmlwriter_end_dtd_attlist );
72
67
static PHP_FUNCTION (xmlwriter_write_dtd_attlist );
73
68
static PHP_FUNCTION (xmlwriter_start_dtd_entity );
74
69
static PHP_FUNCTION (xmlwriter_end_dtd_entity );
75
70
static PHP_FUNCTION (xmlwriter_write_dtd_entity );
76
- #endif
77
71
static PHP_FUNCTION (xmlwriter_open_uri );
78
72
static PHP_FUNCTION (xmlwriter_open_memory );
79
73
static PHP_FUNCTION (xmlwriter_output_memory );
@@ -462,14 +456,10 @@ ZEND_END_ARG_INFO()
462
456
static const zend_function_entry xmlwriter_functions [] = {
463
457
PHP_FE (xmlwriter_open_uri , arginfo_xmlwriter_open_uri )
464
458
PHP_FE (xmlwriter_open_memory , arginfo_xmlwriter_void )
465
- #if LIBXML_VERSION >= 20605
466
459
PHP_FE (xmlwriter_set_indent , arginfo_xmlwriter_set_indent )
467
460
PHP_FE (xmlwriter_set_indent_string , arginfo_xmlwriter_set_indent_string )
468
- #endif
469
- #if LIBXML_VERSION >= 20607
470
461
PHP_FE (xmlwriter_start_comment , arginfo_xmlwriter_resource )
471
462
PHP_FE (xmlwriter_end_comment , arginfo_xmlwriter_resource )
472
- #endif
473
463
PHP_FE (xmlwriter_start_attribute , arginfo_xmlwriter_start_attribute )
474
464
PHP_FE (xmlwriter_end_attribute , arginfo_xmlwriter_resource )
475
465
PHP_FE (xmlwriter_write_attribute , arginfo_xmlwriter_write_attribute )
@@ -500,14 +490,12 @@ static const zend_function_entry xmlwriter_functions[] = {
500
490
PHP_FE (xmlwriter_start_dtd_element , arginfo_xmlwriter_start_dtd_element )
501
491
PHP_FE (xmlwriter_end_dtd_element , arginfo_xmlwriter_resource )
502
492
PHP_FE (xmlwriter_write_dtd_element , arginfo_xmlwriter_write_dtd_element )
503
- #if LIBXML_VERSION > 20608
504
493
PHP_FE (xmlwriter_start_dtd_attlist , arginfo_xmlwriter_start_dtd_attlist )
505
494
PHP_FE (xmlwriter_end_dtd_attlist , arginfo_xmlwriter_resource )
506
495
PHP_FE (xmlwriter_write_dtd_attlist , arginfo_xmlwriter_write_dtd_attlist )
507
496
PHP_FE (xmlwriter_start_dtd_entity , arginfo_xmlwriter_start_dtd_entity )
508
497
PHP_FE (xmlwriter_end_dtd_entity , arginfo_xmlwriter_resource )
509
498
PHP_FE (xmlwriter_write_dtd_entity , arginfo_xmlwriter_write_dtd_entity )
510
- #endif
511
499
PHP_FE (xmlwriter_output_memory , arginfo_xmlwriter_output_memory )
512
500
PHP_FE (xmlwriter_flush , arginfo_xmlwriter_flush )
513
501
PHP_FE_END
@@ -518,14 +506,10 @@ static const zend_function_entry xmlwriter_functions[] = {
518
506
static const zend_function_entry xmlwriter_class_functions [] = {
519
507
PHP_ME_MAPPING (openUri , xmlwriter_open_uri , arginfo_xmlwriter_open_uri , 0 )
520
508
PHP_ME_MAPPING (openMemory , xmlwriter_open_memory , arginfo_xmlwriter_void , 0 )
521
- #if LIBXML_VERSION >= 20605
522
509
PHP_ME_MAPPING (setIndent , xmlwriter_set_indent , arginfo_xmlwriter_method_set_indent , 0 )
523
510
PHP_ME_MAPPING (setIndentString , xmlwriter_set_indent_string , arginfo_xmlwriter_method_set_indent_string , 0 )
524
- #endif
525
- #if LIBXML_VERSION >= 20607
526
511
PHP_ME_MAPPING (startComment , xmlwriter_start_comment , arginfo_xmlwriter_void , 0 )
527
512
PHP_ME_MAPPING (endComment , xmlwriter_end_comment , arginfo_xmlwriter_void , 0 )
528
- #endif
529
513
PHP_ME_MAPPING (startAttribute , xmlwriter_start_attribute , arginfo_xmlwriter_method_start_attribute , 0 )
530
514
PHP_ME_MAPPING (endAttribute , xmlwriter_end_attribute , arginfo_xmlwriter_void , 0 )
531
515
PHP_ME_MAPPING (writeAttribute , xmlwriter_write_attribute , arginfo_xmlwriter_method_write_attribute , 0 )
@@ -556,14 +540,12 @@ static const zend_function_entry xmlwriter_class_functions[] = {
556
540
PHP_ME_MAPPING (startDtdElement , xmlwriter_start_dtd_element ,arginfo_xmlwriter_method_start_dtd_element , 0 )
557
541
PHP_ME_MAPPING (endDtdElement , xmlwriter_end_dtd_element , arginfo_xmlwriter_void , 0 )
558
542
PHP_ME_MAPPING (writeDtdElement , xmlwriter_write_dtd_element , arginfo_xmlwriter_method_write_dtd_element , 0 )
559
- #if LIBXML_VERSION > 20608
560
543
PHP_ME_MAPPING (startDtdAttlist , xmlwriter_start_dtd_attlist , arginfo_xmlwriter_method_start_dtd_attlist , 0 )
561
544
PHP_ME_MAPPING (endDtdAttlist , xmlwriter_end_dtd_attlist , arginfo_xmlwriter_void , 0 )
562
545
PHP_ME_MAPPING (writeDtdAttlist , xmlwriter_write_dtd_attlist , arginfo_xmlwriter_method_write_dtd_attlist , 0 )
563
546
PHP_ME_MAPPING (startDtdEntity , xmlwriter_start_dtd_entity , arginfo_xmlwriter_method_start_dtd_entity , 0 )
564
547
PHP_ME_MAPPING (endDtdEntity , xmlwriter_end_dtd_entity , arginfo_xmlwriter_void , 0 )
565
548
PHP_ME_MAPPING (writeDtdEntity , xmlwriter_write_dtd_entity , arginfo_xmlwriter_method_write_dtd_entity , 0 )
566
- #endif
567
549
PHP_ME_MAPPING (outputMemory , xmlwriter_output_memory , arginfo_xmlwriter_method_output_memory , 0 )
568
550
PHP_ME_MAPPING (flush , xmlwriter_flush , arginfo_xmlwriter_method_flush , 0 )
569
551
PHP_FE_END
@@ -763,7 +745,6 @@ static void php_xmlwriter_end(INTERNAL_FUNCTION_PARAMETERS, xmlwriter_read_int_t
763
745
RETURN_FALSE ;
764
746
}
765
747
766
- #if LIBXML_VERSION >= 20605
767
748
/* {{{ proto bool xmlwriter_set_indent(resource xmlwriter, bool indent)
768
749
Toggle indentation on/off - returns FALSE on error */
769
750
static PHP_FUNCTION (xmlwriter_set_indent )
@@ -811,8 +792,6 @@ static PHP_FUNCTION(xmlwriter_set_indent_string)
811
792
}
812
793
/* }}} */
813
794
814
- #endif
815
-
816
795
/* {{{ proto bool xmlwriter_start_attribute(resource xmlwriter, string name)
817
796
Create start attribute - returns FALSE on error */
818
797
static PHP_FUNCTION (xmlwriter_start_attribute )
@@ -1265,7 +1244,6 @@ static PHP_FUNCTION(xmlwriter_text)
1265
1244
}
1266
1245
/* }}} */
1267
1246
1268
- #if LIBXML_VERSION >= 20607
1269
1247
/* {{{ proto bool xmlwriter_start_comment(resource xmlwriter)
1270
1248
Create start comment - returns FALSE on error */
1271
1249
static PHP_FUNCTION (xmlwriter_start_comment )
@@ -1307,8 +1285,6 @@ static PHP_FUNCTION(xmlwriter_end_comment)
1307
1285
php_xmlwriter_end (INTERNAL_FUNCTION_PARAM_PASSTHRU , xmlTextWriterEndComment );
1308
1286
}
1309
1287
/* }}} */
1310
- #endif /* LIBXML_VERSION >= 20607 */
1311
-
1312
1288
1313
1289
/* {{{ proto bool xmlwriter_write_comment(resource xmlwriter, string content)
1314
1290
Write full comment tag - returns FALSE on error */
@@ -1512,7 +1488,6 @@ static PHP_FUNCTION(xmlwriter_write_dtd_element)
1512
1488
}
1513
1489
/* }}} */
1514
1490
1515
- #if LIBXML_VERSION > 20608
1516
1491
/* {{{ proto bool xmlwriter_start_dtd_attlist(resource xmlwriter, string name)
1517
1492
Create start DTD AttList - returns FALSE on error */
1518
1493
static PHP_FUNCTION (xmlwriter_start_dtd_attlist )
@@ -1670,7 +1645,6 @@ static PHP_FUNCTION(xmlwriter_write_dtd_entity)
1670
1645
RETURN_FALSE ;
1671
1646
}
1672
1647
/* }}} */
1673
- #endif
1674
1648
1675
1649
/* {{{ proto resource xmlwriter_open_uri(string source)
1676
1650
Create new xmlwriter using source uri for output */
0 commit comments