Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 98a9b31

Browse files
committed
Marshal the new stacksize item in code objects.
1 parent 7af8130 commit 98a9b31

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

Python/marshal.c

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -244,6 +244,7 @@ w_object(v, p)
244244
w_byte(TYPE_CODE, p);
245245
w_short(co->co_argcount, p);
246246
w_short(co->co_nlocals, p);
247+
w_short(co->co_stacksize, p);
247248
w_short(co->co_flags, p);
248249
w_object((object *)co->co_code, p);
249250
w_object(co->co_consts, p);
@@ -511,6 +512,7 @@ r_object(p)
511512
{
512513
int argcount = r_short(p);
513514
int nlocals = r_short(p);
515+
int stacksize = r_short(p);
514516
int flags = r_short(p);
515517
object *code = NULL;
516518
object *consts = NULL;
@@ -528,7 +530,7 @@ r_object(p)
528530

529531
if (!err_occurred()) {
530532
v = (object *) newcodeobject(
531-
argcount, nlocals, flags,
533+
argcount, nlocals, stacksize, flags,
532534
code, consts, names, varnames,
533535
filename, name);
534536
}

0 commit comments

Comments
 (0)