updated on Wed Jan 11 00:07:16 UTC 2012
[aur-mirror.git] / bubbros / bub-n-bros-1.6-python25.patch
blobd681f31ae850f8086287afd618f4e661d25687ec
1 diff -ur bubbros-1.5.orig/bubbob/statesaver.c bubbros-1.5/bubbob/statesaver.c
2 --- bubbros-1.5.orig/bubbob/statesaver.c 2007-09-08 17:43:14.000000000 +0200
3 +++ bubbros-1.5/bubbob/statesaver.c 2007-09-08 17:43:14.000000000 +0200
4 @@ -75,7 +75,7 @@
5 Py_INCREF(g); /* exhausted -- can return 'g' itself */
6 return g;
8 - if (f->f_nfreevars || f->f_ncells) {
9 + if (PySequence_Length(co->co_freevars) || PySequence_Length(co->co_cellvars)) {
10 PyErr_SetString(PyExc_ValueError, "generator has cell or free vars");
11 goto error;
13 @@ -112,6 +112,8 @@
14 PyFrameObject* f = NULL;
15 PyFrameObject* f2 = NULL;
16 PyCodeObject* co;
17 + PyCodeObject* code;
18 + PyCodeObject* code2;
19 int i, res;
21 if (g != g2)
22 @@ -141,9 +143,9 @@
23 Py_DECREF(x);
24 goto error;
26 - f2 = (PyFrameObject*) x;
28 - if (f2->f_stacksize != f->f_stacksize) {
29 + code2 = (PyFrameObject*) x;
30 + if (code2->co_stacksize != code->co_stacksize) {
31 PyErr_SetString(PyExc_TypeError, "stack size mismatch");
32 goto error;