summaryrefslogtreecommitdiffstats
path: root/Modules/_testcapi/code.c
diff options
context:
space:
mode:
Diffstat (limited to 'Modules/_testcapi/code.c')
-rw-r--r--Modules/_testcapi/code.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/Modules/_testcapi/code.c b/Modules/_testcapi/code.c
index 691dd5f..c019348 100644
--- a/Modules/_testcapi/code.c
+++ b/Modules/_testcapi/code.c
@@ -1,4 +1,5 @@
#include "parts.h"
+#include "util.h"
static Py_ssize_t
get_code_extra_index(PyInterpreterState* interp) {
@@ -75,7 +76,7 @@ test_code_extra(PyObject* self, PyObject *Py_UNUSED(callable))
}
// Check the value is initially NULL
- void *extra;
+ void *extra = UNINITIALIZED_PTR;
int res = PyUnstable_Code_GetExtra(test_func_code, code_extra_index, &extra);
if (res < 0) {
goto finally;
@@ -88,6 +89,7 @@ test_code_extra(PyObject* self, PyObject *Py_UNUSED(callable))
goto finally;
}
// Assert it was set correctly
+ extra = UNINITIALIZED_PTR;
res = PyUnstable_Code_GetExtra(test_func_code, code_extra_index, &extra);
if (res < 0) {
goto finally;