[pypy-commit] pypy pypy3-release-2.4.x: Fix curses on OS X -- copy this logic from cpython

alex_gaynor noreply at buildbot.pypy.org
Tue Oct 14 21:13:21 CEST 2014


Author: Alex Gaynor <alex.gaynor at gmail.com>
Branch: pypy3-release-2.4.x
Changeset: r73958:65555bd61b67
Date: 2014-09-20 14:16 -0700
http://bitbucket.org/pypy/pypy/changeset/65555bd61b67/

Log:	Fix curses on OS X -- copy this logic from cpython (grafted from
	6948fbcc00424949d28366780bd91868e21a7f25)

diff --git a/lib_pypy/_curses.py b/lib_pypy/_curses.py
--- a/lib_pypy/_curses.py
+++ b/lib_pypy/_curses.py
@@ -286,6 +286,13 @@
 
 
 lib = ffi.verify("""
+#ifdef __APPLE__
+/* the following define is necessary for OS X 10.6+; without it, the
+   Apple-supplied ncurses.h sets NCURSES_OPAQUE to 1, and then Python
+   can't get at the WINDOW flags field. */
+#define NCURSES_OPAQUE 0
+#endif
+
 #include <ncurses.h>
 #include <panel.h>
 #include <term.h>


More information about the pypy-commit mailing list