[Python-checkins] cpython: Remove useless #define and #ifdefs
eli.bendersky
python-checkins at python.org
Sat Apr 20 15:37:01 CEST 2013
http://hg.python.org/cpython/rev/6e51ee80754a
changeset: 83462:6e51ee80754a
user: Eli Bendersky <eliben at gmail.com>
date: Sat Apr 20 06:36:43 2013 -0700
summary:
Remove useless #define and #ifdefs
files:
Modules/_elementtree.c | 11 -----------
1 files changed, 0 insertions(+), 11 deletions(-)
diff --git a/Modules/_elementtree.c b/Modules/_elementtree.c
--- a/Modules/_elementtree.c
+++ b/Modules/_elementtree.c
@@ -17,9 +17,6 @@
/* -------------------------------------------------------------------- */
/* configuration */
-/* Leave defined to include the expat-based XMLParser type */
-#define USE_EXPAT
-
/* An element can hold this many children without extra memory
allocations. */
#define STATIC_CHILDREN 4
@@ -2645,8 +2642,6 @@
/* ==================================================================== */
/* the expat interface */
-#if defined(USE_EXPAT)
-
#include "expat.h"
#include "pyexpat.h"
static struct PyExpat_CAPI *expat_capi;
@@ -3604,8 +3599,6 @@
0, /* tp_free */
};
-#endif
-
/* ==================================================================== */
/* python module interface */
@@ -3637,10 +3630,8 @@
return NULL;
if (PyType_Ready(&Element_Type) < 0)
return NULL;
-#if defined(USE_EXPAT)
if (PyType_Ready(&XMLParser_Type) < 0)
return NULL;
-#endif
m = PyModule_Create(&_elementtreemodule);
if (!m)
@@ -3683,10 +3674,8 @@
Py_INCREF((PyObject *)&TreeBuilder_Type);
PyModule_AddObject(m, "TreeBuilder", (PyObject *)&TreeBuilder_Type);
-#if defined(USE_EXPAT)
Py_INCREF((PyObject *)&XMLParser_Type);
PyModule_AddObject(m, "XMLParser", (PyObject *)&XMLParser_Type);
-#endif
return m;
}
--
Repository URL: http://hg.python.org/cpython
More information about the Python-checkins
mailing list