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
dc075b9d
Kaydet (Commit)
dc075b9d
authored
Agu 16, 2006
tarafından
Fredrik Lundh
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
SF#1534630
ignore data that arrives before the opening start tag
üst
574cfea9
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
16 additions
and
1 deletion
+16
-1
test_xml_etree_c.py
Lib/test/test_xml_etree_c.py
+11
-0
_elementtree.c
Modules/_elementtree.c
+5
-1
No files found.
Lib/test/test_xml_etree_c.py
Dosyayı görüntüle @
dc075b9d
...
@@ -204,6 +204,17 @@ def check_encoding(encoding):
...
@@ -204,6 +204,17 @@ def check_encoding(encoding):
"<?xml version='1.0' encoding='
%
s'?><xml />"
%
encoding
"<?xml version='1.0' encoding='
%
s'?><xml />"
%
encoding
)
)
def
bug_1534630
():
"""
>>> bob = ET.TreeBuilder()
>>> e = bob.data("data")
>>> e = bob.start("tag", {})
>>> e = bob.end("tag")
>>> e = bob.close()
>>> serialize(ET, e)
'<tag />'
"""
def
test_main
():
def
test_main
():
from
test
import
test_xml_etree_c
from
test
import
test_xml_etree_c
test_support
.
run_doctest
(
test_xml_etree_c
,
verbosity
=
True
)
test_support
.
run_doctest
(
test_xml_etree_c
,
verbosity
=
True
)
...
...
Modules/_elementtree.c
Dosyayı görüntüle @
dc075b9d
...
@@ -48,7 +48,7 @@
...
@@ -48,7 +48,7 @@
#include "Python.h"
#include "Python.h"
#define VERSION "1.0.6
-snapshot
"
#define VERSION "1.0.6"
/* -------------------------------------------------------------------- */
/* -------------------------------------------------------------------- */
/* configuration */
/* configuration */
...
@@ -1599,6 +1599,10 @@ LOCAL(PyObject*)
...
@@ -1599,6 +1599,10 @@ LOCAL(PyObject*)
treebuilder_handle_data
(
TreeBuilderObject
*
self
,
PyObject
*
data
)
treebuilder_handle_data
(
TreeBuilderObject
*
self
,
PyObject
*
data
)
{
{
if
(
!
self
->
data
)
{
if
(
!
self
->
data
)
{
if
(
self
->
last
==
(
ElementObject
*
)
Py_None
)
{
/* ignore calls to data before the first call to start */
Py_RETURN_NONE
;
}
/* store the first item as is */
/* store the first item as is */
Py_INCREF
(
data
);
self
->
data
=
data
;
Py_INCREF
(
data
);
self
->
data
=
data
;
}
else
{
}
else
{
...
...
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