diff options
author | Armin Rigo <arigo@tunes.org> | 2013-07-31 10:27:47 +0200 |
---|---|---|
committer | Armin Rigo <arigo@tunes.org> | 2013-07-31 10:27:47 +0200 |
commit | 8119d3a7cb0ab5f323e7109ad6680e7da9c39649 (patch) | |
tree | ffe0173d4e556342a7daee5a4b5d3af07b497fa1 | |
parent | Argh. Turning "try: list[index]; except IndexError" into "try: (diff) | |
download | pypy-8119d3a7cb0ab5f323e7109ad6680e7da9c39649.tar.gz pypy-8119d3a7cb0ab5f323e7109ad6680e7da9c39649.tar.bz2 pypy-8119d3a7cb0ab5f323e7109ad6680e7da9c39649.zip |
Manual transplant of the code fixes from 2b1c8d8458adrelease-2.1.0
-rw-r--r-- | lib_pypy/_curses.py | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/lib_pypy/_curses.py b/lib_pypy/_curses.py index d4c3108c98..f92af04e0e 100644 --- a/lib_pypy/_curses.py +++ b/lib_pypy/_curses.py @@ -966,7 +966,7 @@ def color_content(color): r, g, b = ffi.new("short *"), ffi.new("short *"), ffi.new("short *") if lib.color_content(color, r, g, b) == lib.ERR: raise error("Argument 1 was out of range. Check value of COLORS.") - return (r, g, b) + return (r[0], g[0], b[0]) def color_pair(n): @@ -1121,6 +1121,7 @@ def setupterm(term=None, fd=-1): term = ffi.NULL err = ffi.new("int *") if lib.setupterm(term, fd, err) == lib.ERR: + err = err[0] if err == 0: raise error("setupterm: could not find terminal") elif err == -1: |