summaryrefslogtreecommitdiffstats
path: root/Python/marshal.c
diff options
context:
space:
mode:
Diffstat (limited to 'Python/marshal.c')
-rw-r--r--Python/marshal.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/Python/marshal.c b/Python/marshal.c
index d7fdb83..1260704 100644
--- a/Python/marshal.c
+++ b/Python/marshal.c
@@ -522,6 +522,7 @@ w_complex_object(PyObject *v, char flag, WFILE *p)
w_object(co->co_localspluskinds, p);
w_object(co->co_filename, p);
w_object(co->co_name, p);
+ w_object(co->co_qualname, p);
w_long(co->co_firstlineno, p);
w_object(co->co_linetable, p);
w_object(co->co_endlinetable, p);
@@ -1315,6 +1316,7 @@ r_object(RFILE *p)
PyObject *localspluskinds = NULL;
PyObject *filename = NULL;
PyObject *name = NULL;
+ PyObject *qualname = NULL;
int firstlineno;
PyObject *linetable = NULL;
PyObject* endlinetable = NULL;
@@ -1365,6 +1367,9 @@ r_object(RFILE *p)
name = r_object(p);
if (name == NULL)
goto code_error;
+ qualname = r_object(p);
+ if (qualname == NULL)
+ goto code_error;
firstlineno = (int)r_long(p);
if (firstlineno == -1 && PyErr_Occurred())
break;
@@ -1384,6 +1389,7 @@ r_object(RFILE *p)
struct _PyCodeConstructor con = {
.filename = filename,
.name = name,
+ .qualname = qualname,
.flags = flags,
.code = code,
@@ -1426,6 +1432,7 @@ r_object(RFILE *p)
Py_XDECREF(localspluskinds);
Py_XDECREF(filename);
Py_XDECREF(name);
+ Py_XDECREF(qualname);
Py_XDECREF(linetable);
Py_XDECREF(endlinetable);
Py_XDECREF(columntable);