summaryrefslogtreecommitdiffstats
path: root/Objects
diff options
context:
space:
mode:
Diffstat (limited to 'Objects')
-rw-r--r--Objects/frameobject.c19
-rw-r--r--Objects/object.c2
2 files changed, 15 insertions, 6 deletions
diff --git a/Objects/frameobject.c b/Objects/frameobject.c
index 44b3a2a..15ec4b7 100644
--- a/Objects/frameobject.c
+++ b/Objects/frameobject.c
@@ -1261,18 +1261,27 @@ mark_stacks(PyCodeObject *code_obj, int len)
stacks[next_i] = next_stack;
break;
case LOAD_GLOBAL:
+ {
+ int j = oparg;
next_stack = push_value(next_stack, Object);
+ if (j & 1) {
+ next_stack = push_value(next_stack, Null);
+ }
stacks[next_i] = next_stack;
break;
+ }
case LOAD_ATTR:
+ {
assert(top_of_stack(next_stack) == Object);
+ int j = oparg;
+ if (j & 1) {
+ next_stack = pop_value(next_stack);
+ next_stack = push_value(next_stack, Object);
+ next_stack = push_value(next_stack, Null);
+ }
stacks[next_i] = next_stack;
break;
- case LOAD_METHOD:
- assert(top_of_stack(next_stack) == Object);
- next_stack = push_value(next_stack, Null);
- stacks[next_i] = next_stack;
- break;
+ }
case SWAP:
{
int n = oparg;
diff --git a/Objects/object.c b/Objects/object.c
index 0a15c1e..51b6016b 100644
--- a/Objects/object.c
+++ b/Objects/object.c
@@ -1551,7 +1551,7 @@ _PyObject_NextNotImplemented(PyObject *self)
/* Specialized version of _PyObject_GenericGetAttrWithDict
- specifically for the loading methods
+ specifically for the LOAD_METHOD opcode.
Return 1 if a method is found, 0 if it's a regular attribute
from __dict__ or something returned by using a descriptor