Skip to content

Commit 734a42a

Browse files
author
Anselm Kruis
committed
merge 3.4-slp (Stackless python#70)
2 parents c86af92 + 04d419a commit 734a42a

File tree

4 files changed

+5
-44
lines changed

4 files changed

+5
-44
lines changed

Objects/abstract.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2104,14 +2104,14 @@ PyObject_Call(PyObject *func, PyObject *arg, PyObject *kw)
21042104
#endif
21052105
Py_LeaveRecursiveCall();
21062106
#ifdef NDEBUG
2107-
if (result == NULL && !PyErr_Occurred()) {
2107+
if (STACKLESS_RETVAL(result) == NULL && !PyErr_Occurred()) {
21082108
PyErr_SetString(
21092109
PyExc_SystemError,
21102110
"NULL result without error in PyObject_Call");
21112111
}
21122112
#else
2113-
assert((result != NULL && !PyErr_Occurred())
2114-
|| (result == NULL && PyErr_Occurred()));
2113+
assert((STACKLESS_RETVAL(result) != NULL && !PyErr_Occurred())
2114+
|| (STACKLESS_RETVAL(result) == NULL && PyErr_Occurred()));
21152115
#endif
21162116
return result;
21172117
}

Python/ceval.c

Lines changed: 0 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -3862,13 +3862,8 @@ PyEval_EvalFrame_value(PyFrameObject *f, int throwflag, PyObject *retval)
38623862
if (why != WHY_RETURN)
38633863
retval = NULL;
38643864

3865-
#ifdef STACKLESS
38663865
assert((STACKLESS_RETVAL(retval) != NULL && !PyErr_Occurred())
38673866
|| (STACKLESS_RETVAL(retval) == NULL && PyErr_Occurred()));
3868-
#else
3869-
assert((retval != NULL && !PyErr_Occurred())
3870-
|| (retval == NULL && PyErr_Occurred()));
3871-
#endif
38723867

38733868
fast_yield:
38743869
if (co->co_flags & CO_GENERATOR) {
@@ -4936,13 +4931,8 @@ PyEval_CallObjectWithKeywords(PyObject *func, PyObject *arg, PyObject *kw)
49364931
STACKLESS_ASSERT();
49374932
Py_DECREF(arg);
49384933

4939-
#ifdef STACKLESS
49404934
assert((STACKLESS_RETVAL(result) != NULL && !PyErr_Occurred())
49414935
|| (STACKLESS_RETVAL(result) == NULL && PyErr_Occurred()));
4942-
#else
4943-
assert((result != NULL && !PyErr_Occurred())
4944-
|| (result == NULL && PyErr_Occurred()));
4945-
#endif
49464936
return result;
49474937
}
49484938

@@ -5097,13 +5087,8 @@ call_function(PyObject ***pp_stack, int oparg
50975087
READ_TIMESTAMP(*pintr1);
50985088
Py_DECREF(func);
50995089
}
5100-
#ifdef STACKLESS
51015090
assert((STACKLESS_RETVAL(x) != NULL && !PyErr_Occurred())
51025091
|| (STACKLESS_RETVAL(x) == NULL && PyErr_Occurred()));
5103-
#else
5104-
assert((x != NULL && !PyErr_Occurred())
5105-
|| (x == NULL && PyErr_Occurred()));
5106-
#endif
51075092

51085093
/* Clear the stack of the function object. Also removes
51095094
the arguments in case they weren't consumed already
@@ -5115,13 +5100,8 @@ call_function(PyObject ***pp_stack, int oparg
51155100
PCALL(PCALL_POP);
51165101
}
51175102

5118-
#ifdef STACKLESS
51195103
assert((STACKLESS_RETVAL(x) != NULL && !PyErr_Occurred())
51205104
|| (STACKLESS_RETVAL(x) == NULL && PyErr_Occurred()));
5121-
#else
5122-
assert((x != NULL && !PyErr_Occurred())
5123-
|| (x == NULL && PyErr_Occurred()));
5124-
#endif
51255105
return x;
51265106
}
51275107

@@ -5424,13 +5404,8 @@ ext_do_call(PyObject *func, PyObject ***pp_stack, int flags, int na, int nk)
54245404
Py_XDECREF(callargs);
54255405
Py_XDECREF(kwdict);
54265406
Py_XDECREF(stararg);
5427-
#ifdef STACKLESS
54285407
assert((STACKLESS_RETVAL(result) != NULL && !PyErr_Occurred())
54295408
|| (STACKLESS_RETVAL(result) == NULL && PyErr_Occurred()));
5430-
#else
5431-
assert((result != NULL && !PyErr_Occurred())
5432-
|| (result == NULL && PyErr_Occurred()));
5433-
#endif
54345409
return result;
54355410
}
54365411

Stackless/changelog.txt

Lines changed: 0 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -245,18 +245,6 @@ What's New in Stackless 3.3.5?
245245
- http://www.stackless.com/ticket/23: Fix compile error with STACKLESS_OFF
246246
defined
247247

248-
<<<<<<< local
249-
=======
250-
251-
What's New in Stackless 2.7.4rc2?
252-
=================================
253-
254-
*Release date: 2013-05-01*
255-
256-
(A selection of user visible changes from mercurial commit log messages. Use
257-
"hg log -b 2.7-slp -r v2.7.4rc2-slp:v2.7.2-slp -v -M" to get the complete log.)
258-
259-
>>>>>>> other
260248
- http://www.stackless.com/ticket/21: Fix crash on exit.
261249

262250
- http://www.stackless.com/ticket/22: soft switching for context managers.
@@ -359,11 +347,7 @@ The very beginning of Stackless
359347
Especially, the frame dispatcher idea will be revived.
360348
It turns out to make sense:
361349
Try to let the innermost interpreter resolve some recusrions.
362-
<<<<<<< local
363-
Find an equivalent of olde Py_UnwindToken. Probably the
364-
=======
365350
Find an equivalent of old Py_UnwindToken. Probably the
366-
>>>>>>> other
367351
protocol of the new generators can be extended.
368352
Now I *do* think to modify frames. They get an additional
369353
field for their C stack part.

Stackless/core/stackless_impl.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -554,6 +554,8 @@ PyObject * slp_get_channel_callback(void);
554554
#define STACKLESS_RETRACT() assert(1)
555555
#define STACKLESS_ASSERT() assert(1)
556556

557+
#define STACKLESS_RETVAL(obj) (obj)
558+
557559
#define STACKLESS_DECLARE_METHOD(type, meth)
558560

559561
#endif /* STACKLESS */

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy