diff options
author | Raymond Hettinger <python@rcn.com> | 2011-03-23 12:53:32 -0700 |
---|---|---|
committer | Raymond Hettinger <python@rcn.com> | 2011-03-23 12:53:32 -0700 |
commit | 41da10e62cfa2fee9c651d0d613a6f6998bf6f2c (patch) | |
tree | 50897c71d9ac469c30cb0d0e8fa8817e3623f567 /Python | |
parent | 2ebea41d315bb42a6d6983137bf5fdb01d3f1a95 (diff) | |
parent | 5839b9635cd582a5a2660605a48bddafab44aa06 (diff) | |
download | cpython-git-41da10e62cfa2fee9c651d0d613a6f6998bf6f2c.tar.gz |
Merge
Diffstat (limited to 'Python')
-rw-r--r-- | Python/peephole.c | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/Python/peephole.c b/Python/peephole.c index 4bc65dcc31..69f61617f8 100644 --- a/Python/peephole.c +++ b/Python/peephole.c @@ -238,7 +238,7 @@ fold_binops_on_constants(unsigned char *codestr, PyObject *consts, PyObject **ob static int fold_unaryops_on_constants(unsigned char *codestr, PyObject *consts, PyObject *v) { - PyObject *newconst=NULL/*, *v*/; + PyObject *newconst; Py_ssize_t len_consts; int opcode; @@ -250,9 +250,7 @@ fold_unaryops_on_constants(unsigned char *codestr, PyObject *consts, PyObject *v opcode = codestr[3]; switch (opcode) { case UNARY_NEGATIVE: - /* Preserve the sign of -0.0 */ - if (PyObject_IsTrue(v) == 1) - newconst = PyNumber_Negative(v); + newconst = PyNumber_Negative(v); break; case UNARY_INVERT: newconst = PyNumber_Invert(v); |