Skip to content
Projeler
Gruplar
Parçacıklar
Yardım
Yükleniyor...
Oturum aç / Kaydol
Gezinmeyi değiştir
C
cpython
Proje
Proje
Ayrıntılar
Etkinlik
Cycle Analytics
Depo (repository)
Depo (repository)
Dosyalar
Kayıtlar (commit)
Dallar (branch)
Etiketler
Katkıda bulunanlar
Grafik
Karşılaştır
Grafikler
Konular (issue)
0
Konular (issue)
0
Liste
Pano
Etiketler
Kilometre Taşları
Birleştirme (merge) Talepleri
0
Birleştirme (merge) Talepleri
0
CI / CD
CI / CD
İş akışları (pipeline)
İşler
Zamanlamalar
Grafikler
Paketler
Paketler
Wiki
Wiki
Parçacıklar
Parçacıklar
Üyeler
Üyeler
Collapse sidebar
Close sidebar
Etkinlik
Grafik
Grafikler
Yeni bir konu (issue) oluştur
İşler
Kayıtlar (commit)
Konu (issue) Panoları
Kenar çubuğunu aç
Batuhan Osman TASKAYA
cpython
Commits
20d4174b
Kaydet (Commit)
20d4174b
authored
Haz 01, 2012
tarafından
Eli Bendersky
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
We're always building _elementtree with USE_PYEXPAT_CAPI, so the #ifdefs in
the code are unnecessary.
üst
2e185e17
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
12 deletions
+2
-12
_elementtree.c
Modules/_elementtree.c
+2
-12
No files found.
Modules/_elementtree.c
Dosyayı görüntüle @
20d4174b
...
...
@@ -58,9 +58,6 @@
/* Leave defined to include the expat-based XMLParser type */
#define USE_EXPAT
/* Define to do all expat calls via pyexpat's embedded expat library */
/* #define USE_PYEXPAT_CAPI */
/* An element can hold this many children without extra memory
allocations. */
#define STATIC_CHILDREN 4
...
...
@@ -2248,14 +2245,9 @@ static PyTypeObject TreeBuilder_Type = {
#if defined(USE_EXPAT)
#include "expat.h"
#if defined(USE_PYEXPAT_CAPI)
#include "pyexpat.h"
static
struct
PyExpat_CAPI
*
expat_capi
;
static
struct
PyExpat_CAPI
*
expat_capi
;
#define EXPAT(func) (expat_capi->func)
#else
#define EXPAT(func) (XML_##func)
#endif
static
XML_Memory_Handling_Suite
ExpatMemoryHandler
=
{
PyObject_Malloc
,
PyObject_Realloc
,
PyObject_Free
};
...
...
@@ -3223,8 +3215,7 @@ PyInit__elementtree(void)
elementtree_iter_obj
=
PyDict_GetItemString
(
g
,
"iter"
);
elementtree_itertext_obj
=
PyDict_GetItemString
(
g
,
"itertext"
);
#if defined(USE_PYEXPAT_CAPI)
/* link against pyexpat, if possible */
/* link against pyexpat */
expat_capi
=
PyCapsule_Import
(
PyExpat_CAPSULE_NAME
,
0
);
if
(
expat_capi
)
{
/* check that it's usable */
...
...
@@ -3242,7 +3233,6 @@ PyInit__elementtree(void)
);
return
NULL
;
}
#endif
elementtree_parseerror_obj
=
PyErr_NewException
(
"xml.etree.ElementTree.ParseError"
,
PyExc_SyntaxError
,
NULL
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment