diff options
author | Antoine Pitrou <solipsis@pitrou.net> | 2014-11-23 15:56:41 +0100 |
---|---|---|
committer | Antoine Pitrou <solipsis@pitrou.net> | 2014-11-23 15:56:41 +0100 |
commit | 7b53f4ba313ddc97503a1b20a32c7ece98e6f14f (patch) | |
tree | d4a1ae925557271361d6681d52110a9baab414f8 /Python/marshal.c | |
parent | 45d2905e417a1edcec07d77bb7a2b5e16a6d7a85 (diff) | |
parent | 86a6e9bbd9773fe387dae31f7ca24ccfcdc7ded1 (diff) | |
download | cpython-7b53f4ba313ddc97503a1b20a32c7ece98e6f14f.tar.gz |
Issue #22894: TestCase.subTest() would cause the test suite to be stopped when in failfast mode, even in the absence of failures.
Diffstat (limited to 'Python/marshal.c')
-rw-r--r-- | Python/marshal.c | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/Python/marshal.c b/Python/marshal.c index dc5411c1ff..837aa4812c 100644 --- a/Python/marshal.c +++ b/Python/marshal.c @@ -13,15 +13,13 @@ #include "code.h" #include "marshal.h" -#define ABS(x) ((x) < 0 ? -(x) : (x)) - /* High water mark to determine when the marshalled object is dangerously deep * and risks coring the interpreter. When the object stack gets this deep, * raise an exception instead of continuing. * On Windows debug builds, reduce this value. */ #if defined(MS_WINDOWS) && defined(_DEBUG) -#define MAX_MARSHAL_STACK_DEPTH 1500 +#define MAX_MARSHAL_STACK_DEPTH 1000 #else #define MAX_MARSHAL_STACK_DEPTH 2000 #endif @@ -192,7 +190,7 @@ w_PyLong(const PyLongObject *ob, char flag, WFILE *p) } /* set l to number of base PyLong_MARSHAL_BASE digits */ - n = ABS(Py_SIZE(ob)); + n = Py_ABS(Py_SIZE(ob)); l = (n-1) * PyLong_MARSHAL_RATIO; d = ob->ob_digit[n-1]; assert(d != 0); /* a PyLong is always normalized */ @@ -727,8 +725,8 @@ r_PyLong(RFILE *p) return NULL; } - size = 1 + (ABS(n) - 1) / PyLong_MARSHAL_RATIO; - shorts_in_top_digit = 1 + (ABS(n) - 1) % PyLong_MARSHAL_RATIO; + size = 1 + (Py_ABS(n) - 1) / PyLong_MARSHAL_RATIO; + shorts_in_top_digit = 1 + (Py_ABS(n) - 1) % PyLong_MARSHAL_RATIO; ob = _PyLong_New(size); if (ob == NULL) return NULL; |