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
bfc7bf06
Kaydet (Commit)
bfc7bf06
authored
Mar 21, 2011
tarafından
Victor Stinner
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
_elementtree.c: remove trailing spaces
üst
78780200
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
19 additions
and
19 deletions
+19
-19
_elementtree.c
Modules/_elementtree.c
+19
-19
No files found.
Modules/_elementtree.c
Dosyayı görüntüle @
bfc7bf06
...
...
@@ -226,7 +226,7 @@ typedef struct {
PyObject
*
*
children
;
PyObject
*
_children
[
STATIC_CHILDREN
];
}
ElementObjectExtra
;
typedef
struct
{
...
...
@@ -354,14 +354,14 @@ element_resize(ElementObject* self, int extra)
/* use Python 2.4's list growth strategy */
size
=
(
size
>>
3
)
+
(
size
<
9
?
3
:
6
)
+
size
;
/* Coverity CID #182 size_error: Allocating 1 bytes to pointer "children"
* which needs at least 4 bytes.
* Although it's a false alarm always assume at least one child to
* which needs at least 4 bytes.
* Although it's a false alarm always assume at least one child to
* be safe.
*/
size
=
size
?
size
:
1
;
if
(
self
->
extra
->
children
!=
self
->
extra
->
_children
)
{
/* Coverity CID #182 size_error: Allocating 1 bytes to pointer
* "children", which needs at least 4 bytes. Although it's a
* "children", which needs at least 4 bytes. Although it's a
* false alarm always assume at least one child to be safe.
*/
children
=
PyObject_Realloc
(
self
->
extra
->
children
,
...
...
@@ -606,7 +606,7 @@ element_copy(ElementObject* self, PyObject* args)
Py_INCREF
(
JOIN_OBJ
(
element
->
tail
));
if
(
self
->
extra
)
{
if
(
element_resize
(
element
,
self
->
extra
->
length
)
<
0
)
{
Py_DECREF
(
element
);
return
NULL
;
...
...
@@ -618,7 +618,7 @@ element_copy(ElementObject* self, PyObject* args)
}
element
->
extra
->
length
=
self
->
extra
->
length
;
}
return
(
PyObject
*
)
element
;
...
...
@@ -661,7 +661,7 @@ element_deepcopy(ElementObject* self, PyObject* args)
if
(
!
element
)
return
NULL
;
text
=
deepcopy
(
JOIN_OBJ
(
self
->
text
),
memo
);
if
(
!
text
)
goto
error
;
...
...
@@ -675,7 +675,7 @@ element_deepcopy(ElementObject* self, PyObject* args)
element
->
tail
=
JOIN_SET
(
tail
,
JOIN_GET
(
self
->
tail
));
if
(
self
->
extra
)
{
if
(
element_resize
(
element
,
self
->
extra
->
length
)
<
0
)
goto
error
;
...
...
@@ -689,7 +689,7 @@ element_deepcopy(ElementObject* self, PyObject* args)
}
element
->
extra
->
length
=
self
->
extra
->
length
;
}
/* add object to memo dictionary (so deepcopy won't visit it again) */
...
...
@@ -800,7 +800,7 @@ element_find(ElementObject* self, PyObject* args)
if
(
!
self
->
extra
)
Py_RETURN_NONE
;
for
(
i
=
0
;
i
<
self
->
extra
->
length
;
i
++
)
{
PyObject
*
item
=
self
->
extra
->
children
[
i
];
if
(
Element_CheckExact
(
item
)
&&
...
...
@@ -953,7 +953,7 @@ static PyObject*
element_iter
(
ElementObject
*
self
,
PyObject
*
args
)
{
PyObject
*
result
;
PyObject
*
tag
=
Py_None
;
if
(
!
PyArg_ParseTuple
(
args
,
"|O:iter"
,
&
tag
))
return
NULL
;
...
...
@@ -985,7 +985,7 @@ static PyObject*
element_itertext
(
ElementObject
*
self
,
PyObject
*
args
)
{
PyObject
*
result
;
if
(
!
PyArg_ParseTuple
(
args
,
":itertext"
))
return
NULL
;
...
...
@@ -1483,7 +1483,7 @@ element_getattro(ElementObject* self, PyObject* nameobj)
if
(
PyUnicode_Check
(
nameobj
))
name
=
_PyUnicode_AsString
(
nameobj
);
if
(
name
==
NULL
)
return
NULL
;
...
...
@@ -2113,7 +2113,7 @@ makeuniversal(XMLParserObject* self, const char* string)
Py_INCREF
(
key
);
tag
=
key
;
}
/* decode universal name */
p
=
PyBytes_AS_STRING
(
tag
);
value
=
PyUnicode_DecodeUTF8
(
p
,
size
,
"strict"
);
...
...
@@ -2407,7 +2407,7 @@ expat_unknown_encoding_handler(XMLParserObject *self, const XML_Char *name,
for
(
i
=
0
;
i
<
256
;
i
++
)
s
[
i
]
=
i
;
u
=
PyUnicode_Decode
((
char
*
)
s
,
256
,
name
,
"replace"
);
if
(
!
u
)
return
XML_STATUS_ERROR
;
...
...
@@ -2466,7 +2466,7 @@ xmlparser(PyObject* self_, PyObject* args, PyObject* kw)
PyObject_Del
(
self
);
return
NULL
;
}
self
->
names
=
PyDict_New
();
if
(
!
self
->
names
)
{
PyObject_Del
(
self
->
entity
);
...
...
@@ -2645,7 +2645,7 @@ xmlparser_parse(XMLParserObject* self, PyObject* args)
reader
=
PyObject_GetAttrString
(
fileobj
,
"read"
);
if
(
!
reader
)
return
NULL
;
/* read from open file object */
for
(;;)
{
...
...
@@ -2796,7 +2796,7 @@ static PyMethodDef xmlparser_methods[] = {
{
NULL
,
NULL
}
};
static
PyObject
*
static
PyObject
*
xmlparser_getattro
(
XMLParserObject
*
self
,
PyObject
*
nameobj
)
{
if
(
PyUnicode_Check
(
nameobj
))
{
...
...
@@ -2957,7 +2957,7 @@ PyInit__elementtree(void)
" break
\n
"
" parser.feed(data)
\n
"
" self._root = parser.close()
\n
"
" else:
\n
"
" else:
\n
"
" parser = cElementTree.XMLParser()
\n
"
" self._root = parser._parse(source)
\n
"
" return self._root
\n
"
...
...
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