|
17 | 17 | /* -------------------------------------------------------------------- */ |
18 | 18 | /* configuration */ |
19 | 19 |
|
20 | | -/* Leave defined to include the expat-based XMLParser type */ |
21 | | -#define USE_EXPAT |
22 | | - |
23 | 20 | /* An element can hold this many children without extra memory |
24 | 21 | allocations. */ |
25 | 22 | #define STATIC_CHILDREN 4 |
@@ -2645,8 +2642,6 @@ static PyTypeObject TreeBuilder_Type = { |
2645 | 2642 | /* ==================================================================== */ |
2646 | 2643 | /* the expat interface */ |
2647 | 2644 |
|
2648 | | -#if defined(USE_EXPAT) |
2649 | | - |
2650 | 2645 | #include "expat.h" |
2651 | 2646 | #include "pyexpat.h" |
2652 | 2647 | static struct PyExpat_CAPI *expat_capi; |
@@ -3604,8 +3599,6 @@ static PyTypeObject XMLParser_Type = { |
3604 | 3599 | 0, /* tp_free */ |
3605 | 3600 | }; |
3606 | 3601 |
|
3607 | | -#endif |
3608 | | - |
3609 | 3602 | /* ==================================================================== */ |
3610 | 3603 | /* python module interface */ |
3611 | 3604 |
|
@@ -3637,10 +3630,8 @@ PyInit__elementtree(void) |
3637 | 3630 | return NULL; |
3638 | 3631 | if (PyType_Ready(&Element_Type) < 0) |
3639 | 3632 | return NULL; |
3640 | | -#if defined(USE_EXPAT) |
3641 | 3633 | if (PyType_Ready(&XMLParser_Type) < 0) |
3642 | 3634 | return NULL; |
3643 | | -#endif |
3644 | 3635 |
|
3645 | 3636 | m = PyModule_Create(&_elementtreemodule); |
3646 | 3637 | if (!m) |
@@ -3683,10 +3674,8 @@ PyInit__elementtree(void) |
3683 | 3674 | Py_INCREF((PyObject *)&TreeBuilder_Type); |
3684 | 3675 | PyModule_AddObject(m, "TreeBuilder", (PyObject *)&TreeBuilder_Type); |
3685 | 3676 |
|
3686 | | -#if defined(USE_EXPAT) |
3687 | 3677 | Py_INCREF((PyObject *)&XMLParser_Type); |
3688 | 3678 | PyModule_AddObject(m, "XMLParser", (PyObject *)&XMLParser_Type); |
3689 | | -#endif |
3690 | 3679 |
|
3691 | 3680 | return m; |
3692 | 3681 | } |
0 commit comments