Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
C
cpython
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
cpython
Commits
ced1226c
Commit
ced1226c
authored
Jul 19, 2013
by
Ronald Oussoren
Browse files
Options
Browse Files
Download
Plain Diff
(3.3->default): #18480: Add missing PyType_Ready call to _elementtree extension
parents
f24bb35a
138d080a
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
11 additions
and
5 deletions
+11
-5
Misc/NEWS
Misc/NEWS
+2
-0
Modules/_elementtree.c
Modules/_elementtree.c
+9
-5
No files found.
Misc/NEWS
View file @
ced1226c
...
@@ -159,6 +159,8 @@ Core and Builtins
...
@@ -159,6 +159,8 @@ Core and Builtins
Library
Library
-------
-------
-
Issue
#
18480
:
Add
missing
call
to
PyType_Ready
to
the
_elementtree
extension
.
-
Issue
#
17778
:
Fix
test
discovery
for
test_multiprocessing
.
(
Patch
by
-
Issue
#
17778
:
Fix
test
discovery
for
test_multiprocessing
.
(
Patch
by
Zachary
Ware
.)
Zachary
Ware
.)
...
...
Modules/_elementtree.c
View file @
ced1226c
...
@@ -59,6 +59,13 @@ do { memory -= size; printf("%8d - %s\n", memory, comment); } while (0)
...
@@ -59,6 +59,13 @@ do { memory -= size; printf("%8d - %s\n", memory, comment); } while (0)
#define JOIN_SET(p, flag) ((void*) ((Py_uintptr_t) (JOIN_OBJ(p)) | (flag)))
#define JOIN_SET(p, flag) ((void*) ((Py_uintptr_t) (JOIN_OBJ(p)) | (flag)))
#define JOIN_OBJ(p) ((PyObject*) ((Py_uintptr_t) (p) & ~(Py_uintptr_t)1))
#define JOIN_OBJ(p) ((PyObject*) ((Py_uintptr_t) (p) & ~(Py_uintptr_t)1))
/* Types defined by this extension */
static
PyTypeObject
Element_Type
;
static
PyTypeObject
ElementIter_Type
;
static
PyTypeObject
TreeBuilder_Type
;
static
PyTypeObject
XMLParser_Type
;
/* glue functions (see the init function for details) */
/* glue functions (see the init function for details) */
static
PyObject
*
elementtree_parseerror_obj
;
static
PyObject
*
elementtree_parseerror_obj
;
static
PyObject
*
elementtree_deepcopy_obj
;
static
PyObject
*
elementtree_deepcopy_obj
;
...
@@ -159,7 +166,6 @@ typedef struct {
...
@@ -159,7 +166,6 @@ typedef struct {
}
ElementObject
;
}
ElementObject
;
static
PyTypeObject
Element_Type
;
#define Element_CheckExact(op) (Py_TYPE(op) == &Element_Type)
#define Element_CheckExact(op) (Py_TYPE(op) == &Element_Type)
...
@@ -2182,8 +2188,6 @@ typedef struct {
...
@@ -2182,8 +2188,6 @@ typedef struct {
PyObject
*
end_ns_event_obj
;
PyObject
*
end_ns_event_obj
;
}
TreeBuilderObject
;
}
TreeBuilderObject
;
static
PyTypeObject
TreeBuilder_Type
;
#define TreeBuilder_CheckExact(op) (Py_TYPE(op) == &TreeBuilder_Type)
#define TreeBuilder_CheckExact(op) (Py_TYPE(op) == &TreeBuilder_Type)
/* -------------------------------------------------------------------- */
/* -------------------------------------------------------------------- */
...
@@ -2693,8 +2697,6 @@ typedef struct {
...
@@ -2693,8 +2697,6 @@ typedef struct {
}
XMLParserObject
;
}
XMLParserObject
;
static
PyTypeObject
XMLParser_Type
;
#define XMLParser_CheckExact(op) (Py_TYPE(op) == &XMLParser_Type)
#define XMLParser_CheckExact(op) (Py_TYPE(op) == &XMLParser_Type)
/* helpers */
/* helpers */
...
@@ -3654,6 +3656,8 @@ PyInit__elementtree(void)
...
@@ -3654,6 +3656,8 @@ PyInit__elementtree(void)
PyObject
*
m
,
*
temp
;
PyObject
*
m
,
*
temp
;
/* Initialize object types */
/* Initialize object types */
if
(
PyType_Ready
(
&
ElementIter_Type
)
<
0
)
return
NULL
;
if
(
PyType_Ready
(
&
TreeBuilder_Type
)
<
0
)
if
(
PyType_Ready
(
&
TreeBuilder_Type
)
<
0
)
return
NULL
;
return
NULL
;
if
(
PyType_Ready
(
&
Element_Type
)
<
0
)
if
(
PyType_Ready
(
&
Element_Type
)
<
0
)
...
...
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