diff options
author | Serhiy Storchaka <storchaka@gmail.com> | 2020-03-09 13:12:41 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-03-09 13:12:41 (GMT) |
commit | dccd41e29fb9e75ac53c04ed3b097f51f8f65c4e (patch) | |
tree | ca6ee279bd077135214943b03768fb31075cd871 /Modules/clinic/_elementtree.c.h | |
parent | 88944a44aa84b0f3674939019b1befbc7a9dc874 (diff) | |
download | cpython-dccd41e29fb9e75ac53c04ed3b097f51f8f65c4e.zip cpython-dccd41e29fb9e75ac53c04ed3b097f51f8f65c4e.tar.gz cpython-dccd41e29fb9e75ac53c04ed3b097f51f8f65c4e.tar.bz2 |
bpo-39822: Use NULL instead of None for empty attrib in Element. (GH-18735)
Diffstat (limited to 'Modules/clinic/_elementtree.c.h')
-rw-r--r-- | Modules/clinic/_elementtree.c.h | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/Modules/clinic/_elementtree.c.h b/Modules/clinic/_elementtree.c.h index dae5233..825416f 100644 --- a/Modules/clinic/_elementtree.c.h +++ b/Modules/clinic/_elementtree.c.h @@ -515,6 +515,10 @@ _elementtree_Element_makeelement(ElementObject *self, PyObject *const *args, Py_ goto exit; } tag = args[0]; + if (!PyDict_Check(args[1])) { + _PyArg_BadArgument("makeelement", "argument 2", "dict", args[1]); + goto exit; + } attrib = args[1]; return_value = _elementtree_Element_makeelement_impl(self, tag, attrib); @@ -916,4 +920,4 @@ skip_optional: exit: return return_value; } -/*[clinic end generated code: output=3ad029ba71f5ae39 input=a9049054013a1b77]*/ +/*[clinic end generated code: output=b7f6a32462fc42a9 input=a9049054013a1b77]*/ |