summaryrefslogtreecommitdiffstats
path: root/Modules/clinic
diff options
context:
space:
mode:
authorErlend E. Aasland <erlend.aasland@protonmail.com>2023-01-21 11:01:15 (GMT)
committerGitHub <noreply@github.com>2023-01-21 11:01:15 (GMT)
commit13566a37c2f27b7f3a5ef1ecf4288230171b7daf (patch)
treeecf43d81477bff1b623331ad6375b921dad11c54 /Modules/clinic
parent401fdf9c851eb61229250ebffa942adca99b36d1 (diff)
downloadcpython-13566a37c2f27b7f3a5ef1ecf4288230171b7daf.zip
cpython-13566a37c2f27b7f3a5ef1ecf4288230171b7daf.tar.gz
cpython-13566a37c2f27b7f3a5ef1ecf4288230171b7daf.tar.bz2
GH-92123: Move _elementtree heap types to module state (#101187)
Diffstat (limited to 'Modules/clinic')
-rw-r--r--Modules/clinic/_elementtree.c.h14
1 files changed, 7 insertions, 7 deletions
diff --git a/Modules/clinic/_elementtree.c.h b/Modules/clinic/_elementtree.c.h
index b816e1b..4bf342c 100644
--- a/Modules/clinic/_elementtree.c.h
+++ b/Modules/clinic/_elementtree.c.h
@@ -25,8 +25,8 @@ _elementtree_Element_append(ElementObject *self, PyObject *arg)
PyObject *return_value = NULL;
PyObject *subelement;
- if (!PyObject_TypeCheck(arg, Element_Type)) {
- _PyArg_BadArgument("append", "argument", (Element_Type)->tp_name, arg);
+ if (!PyObject_TypeCheck(arg, clinic_state()->Element_Type)) {
+ _PyArg_BadArgument("append", "argument", (clinic_state()->Element_Type)->tp_name, arg);
goto exit;
}
subelement = arg;
@@ -586,8 +586,8 @@ _elementtree_Element_insert(ElementObject *self, PyObject *const *args, Py_ssize
}
index = ival;
}
- if (!PyObject_TypeCheck(args[1], Element_Type)) {
- _PyArg_BadArgument("insert", "argument 2", (Element_Type)->tp_name, args[1]);
+ if (!PyObject_TypeCheck(args[1], clinic_state()->Element_Type)) {
+ _PyArg_BadArgument("insert", "argument 2", (clinic_state()->Element_Type)->tp_name, args[1]);
goto exit;
}
subelement = args[1];
@@ -682,8 +682,8 @@ _elementtree_Element_remove(ElementObject *self, PyObject *arg)
PyObject *return_value = NULL;
PyObject *subelement;
- if (!PyObject_TypeCheck(arg, Element_Type)) {
- _PyArg_BadArgument("remove", "argument", (Element_Type)->tp_name, arg);
+ if (!PyObject_TypeCheck(arg, clinic_state()->Element_Type)) {
+ _PyArg_BadArgument("remove", "argument", (clinic_state()->Element_Type)->tp_name, arg);
goto exit;
}
subelement = arg;
@@ -1105,4 +1105,4 @@ skip_optional:
exit:
return return_value;
}
-/*[clinic end generated code: output=db3d6654de9f8013 input=a9049054013a1b77]*/
+/*[clinic end generated code: output=d380adb43d8f4a62 input=a9049054013a1b77]*/