Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
View | Details | Raw Unified | Return to bug 185819
Collapse All | Expand All

(-)statesaver.c (-3 / +5 lines)
Lines 44-50 Link Here
44
    Py_INCREF(g);  /* exhausted -- can return 'g' itself */
44
    Py_INCREF(g);  /* exhausted -- can return 'g' itself */
45
    return g;
45
    return g;
46
  }
46
  }
47
  if (f->f_nfreevars || f->f_ncells) {
47
  if (PySequence_Length(co->co_freevars) || PySequence_Length(co->co_cellvars)) {
48
    PyErr_SetString(PyExc_ValueError, "generator has cell or free vars");
48
    PyErr_SetString(PyExc_ValueError, "generator has cell or free vars");
49
    return NULL;
49
    return NULL;
50
  }
50
  }
Lines 67-72 Link Here
67
  PyFrameObject* f;
67
  PyFrameObject* f;
68
  PyFrameObject* f2;
68
  PyFrameObject* f2;
69
  PyCodeObject* co;
69
  PyCodeObject* co;
70
  PyCodeObject* code;
71
  PyCodeObject* code2;
70
  int i, res;
72
  int i, res;
71
73
72
  if (g != g2)
74
  if (g != g2)
Lines 94-101 Link Here
94
        PyErr_SetString(PyExc_TypeError, "returned gi_frame");
96
        PyErr_SetString(PyExc_TypeError, "returned gi_frame");
95
        return -1;
97
        return -1;
96
      }
98
      }
97
      f2 = (PyFrameObject*) x;
99
      code2 = (PyFrameObject*) x;
98
      if (f2->f_stacksize != f->f_stacksize) {
100
      if (code2->co_stacksize != code->co_stacksize) {
99
        PyErr_SetString(PyExc_TypeError, "stack size mismatch");
101
        PyErr_SetString(PyExc_TypeError, "stack size mismatch");
100
        return -1;
102
        return -1;
101
      }
103
      }

Return to bug 185819