diff Python/thread.c @ 20491:149a65fa427c legacy-trunk

Fix computation of stack depth for classdef and closures. Also minor tweaks to internal routines. Use PyCF_MASK instead of explicit list of flags. For the MAKE_CLOSURE opcode, the number of items popped off the stack depends on both the oparg and the number of free variables for the code object. Fix the code so it accounts for the free variables. In com_classdef(), record an extra pop to account for the STORE call after the BUILD_CLASS. Get rid of some commented out debugging code in com_push() and com_pop(). Factor string resize logic into helper routine com_check_size(). In com_addbyte(), remove redudant if statement after assert. (They test the same condition.) In several routines, use string macros instead of string functions.
author Jeremy Hylton <jeremy@alum.mit.edu>
date Wed, 17 Oct 2001 13:22:22 +0000
parents ebfd87e87884
children c64fc56f6072
line wrap: on
line diff