Victor Stinner
84d8baadbe
Fix xml.etree.ElementTree.Element.getiterator()
Issue #28314 : Fix function declaration (C flags) for the getiterator() method
of xml.etree.ElementTree.Element.
9 years ago
Benjamin Peterson
2f8bfef158
replace PY_SIZE_MAX with SIZE_MAX
9 years ago
Benjamin Peterson
ca47063998
replace Py_(u)intptr_t with the c99 standard types
9 years ago
Victor Stinner
3466bde1cc
Avoid calling functions with an empty string as format string
Directly pass NULL rather than an empty string.
9 years ago
Victor Stinner
559bb6a713
Rename _PyObject_FastCall() to _PyObject_FastCallDict()
Issue #27809 :
* Rename _PyObject_FastCall() function to _PyObject_FastCallDict()
* Add _PyObject_FastCall(), _PyObject_CallNoArg() and _PyObject_CallArg1()
macros calling _PyObject_FastCallDict()
10 years ago
Victor Stinner
7fbac45287
_elementtree: deepcopy() now uses fast call
Issue #27128 .
10 years ago
Serhiy Storchaka
9062c261a4
Issue #25455 : Fixed a crash in repr of ElementTree.Element with recursive tag.
10 years ago
Serhiy Storchaka
57a01d3a0e
Issue #26200 : Added Py_SETREF and replaced Py_XSETREF with Py_SETREF
in places where Py_DECREF was used.
10 years ago
Serhiy Storchaka
48842714b9
Issue #22570 : Renamed Py_SETREF to Py_XSETREF.
10 years ago
Serhiy Storchaka
576f132b98
Issue #20440 : Cleaning up the code by using Py_SETREF.
10 years ago
Serhiy Storchaka
1ed017ae92
Issue #20440 : Cleaning up the code by using Py_SETREF and Py_CLEAR.
Old code is correct, but with Py_SETREF and Py_CLEAR it can be cleaner.
This patch doesn't fix bugs and hence there is no need to backport it.
10 years ago
Serhiy Storchaka
191321d11b
Issue #20440 : More use of Py_SETREF.
This patch is manually crafted and contains changes that couldn't be handled
automatically.
10 years ago
Serhiy Storchaka
bc4ded9537
Issue #24103 : Fixed possible use after free in ElementTree.XMLPullParser.
10 years ago
Serhiy Storchaka
060ed718ce
Issue #25869 : Optimized deepcopying ElementTree; it is now 20 times faster.
10 years ago
Serhiy Storchaka
22adf2ac02
Issue #25873 : Optimized iterating ElementTree.
Iterating elements Element.iter() is now 40% faster,
iterating text Element.itertext() is now up to 2.5 times faster.
10 years ago
Serhiy Storchaka
66c08d90f6
Issue #25902 : Fixed various refcount issues in ElementTree iteration.
10 years ago
Serhiy Storchaka
5c4064e8bd
Issue #25421 : __sizeof__ methods of builtin types now use dynamic basic size.
This allows sys.getsize() to work correctly with their subclasses with
__slots__ defined.
10 years ago
Serhiy Storchaka
36ff997988
Issue #25638 : Optimized ElementTree parsing; it is now 10% faster.
10 years ago
Serhiy Storchaka
a29eb08fb9
Fixed possible leaks in ElementTree parser.
10 years ago
Serhiy Storchaka
d6a69d8ccb
Fixed possible leak in ElementTree.Element.iter().
10 years ago
Serhiy Storchaka
9ec5e25f26
Issue #25638 : Optimized ElementTree.iterparse(); it is now 2x faster.
ElementTree.XMLParser._setevents now accepts any objects with the append
method, not just a list.
10 years ago
Serhiy Storchaka
7efaf95934
Issue25814: Propagate all errors from custom XML parser handlers
in ElementTree.iterparse().
10 years ago
Serhiy Storchaka
097a664f57
Issue #19687 : Fixed possible integer overflows in ElementTree.
Based on patch by Christian Heimes.
10 years ago
Serhiy Storchaka
dde0815c35
Issue #7990 : dir() on ElementTree.Element now lists properties: "tag",
"text", "tail" and "attrib". Original patch by Santoso Wijaya.
10 years ago
Serhiy Storchaka
b6aa5375d5
Issue #25691 : Fixed crash on deleting ElementTree.Element attributes.
10 years ago
Serhiy Storchaka
04d759b1e4
Issue #19687 : Fixed memory leak on failed Element slice assignment.
Added new tests for Element slice assignments.
10 years ago
Serhiy Storchaka
05744ac6e0
Issue #19176 : Fixed doctype() related bugs in C implementation of ElementTree.
A deprecation warning no longer issued by XMLParser subclass with default
doctype() method. Direct call of doctype() now issues a warning. Parser's
doctype() now is not called if target's doctype() is called. Based on patch
by Martin Panter.
11 years ago
Serhiy Storchaka
5bf3120e24
Issue #24091 : Fixed various crashes in corner cases in C implementation of
ElementTree.
11 years ago
Larry Hastings
dbfdc380df
Issue #24001 : Argument Clinic converters now use accept={type}
instead of types={'type'} to specify the types the converter accepts.
11 years ago
Serhiy Storchaka
cb98556373
Issue #20159 . Converted the _elementtree module to Argument Clinic.
11 years ago
Serhiy Storchaka
26861b0b29
Issue #23450 : Fixed possible integer overflows.
11 years ago
Victor Stinner
706768c687
Issue #22156 : Fix some "comparison between signed and unsigned integers"
compiler warnings in the Modules/ subdirectory.
12 years ago
Eli Bendersky
4b79518f83
Fix indentation from previous commit
12 years ago
Eli Bendersky
5dd40e555b
Issue #19815 : Fix segfault when parsing empty namespace declaration.
Based on patches by Christian Heimes and Vajrasky Kok
12 years ago
Eli Bendersky
163d7f02a1
Cosmetic fixes
12 years ago
Victor Stinner
59799a8399
Don't use deprecated function PyUnicode_GET_SIZE()
Replace it with PyUnicode_GET_LENGTH() or PyUnicode_AsUnicodeAndSize()
12 years ago
Antoine Pitrou
09fcb72048
Issue #19356 : Avoid using a C variabled named "_self", it's a reserved word in some C compilers.
12 years ago
doko@ubuntu.com
0648bf795c
- followup for issue #18997 , make _clear_joined_ptr static.
12 years ago
Eli Bendersky
dd3661e782
Issue #18997 : fix ElementTree crash with using pickle and __getstate__.
Based on report and initial patch from Germán M. Bravo
12 years ago
Eli Bendersky
6eb50b1f5b
Use consistent style for else if / else
13 years ago
Eli Bendersky
532d03e547
Issue #15651 : PEP 3121 refactoring for _elementtree
Patch by Antoine Pitrou (based on Robin Schreiber's original patch)
13 years ago
Christian Heimes
7ed4294d7f
Add missing check of PyDict_Update()'s return value in _elementtree.c
CID 719637
13 years ago
Ronald Oussoren
138d080a28
#18480 : Add missing PyType_Ready call to _elementtree extension
13 years ago
Victor Stinner
3fd8cbd5e4
Issue #18408 : Fix _elementtree.c, don't call Python function from an expat
handler if a Python exception is set
13 years ago
Victor Stinner
d917dcbe5e
Issue #18408 : Fix constructors of _elementtree.c
* Use Py_DECREF() instead of PyObject_GC_Del() to release correctly all
resources
* Raise MemoryError on memory allocation failure
13 years ago
Victor Stinner
81aac734e1
Issue #18408 : Fix create_extra() of _elementtree.c, raise MemoryError on memory
allocation failure
13 years ago
Victor Stinner
71c8b7ec04
Issue #18408 : Different fixes in _elementtree.c to handle correctly MemoryError
* create_new_element() initializes all attributes before handling errors,
to fix a crash in the destructor
* create_new_element() calls PyObject_GC_Del() on error, instead of
PyObject_Del(), because the object was created by PyObject_GC_New()
* subelement() now handles create_new_element() failure
* element_getattro() now handles element_get_text() failure
* makeuniversal() now handles PyBytes_FromStringAndSize() failure
13 years ago
Victor Stinner
4d46343340
Cleanup _elementtree.c
13 years ago
Victor Stinner
5f0af23f5e
Issue #18408 : _elementtree.c now handles create_extra() failure
13 years ago
Eli Bendersky
6dc32b34dd
Issue #13612 : handle unknown encodings without a buffer overflow.
This affects pyexpat and _elementtree. PyExpat_CAPI now exposes a new
function - DefaultUnknownEncodingHandler.
Based on a patch by Serhiy Storchaka.
13 years ago