Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
C
cpython
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
cpython
Commits
87c66e46
Commit
87c66e46
authored
7 years ago
by
Miss Islington (bot)
Committed by
Serhiy Storchaka
7 years ago
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
bpo-31919: Fix building the curses module on OpenIndiana. (GH-4211) (#4216)
(cherry picked from commit
894ebd06
)
parent
4b73a79e
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
61 additions
and
11 deletions
+61
-11
Lib/test/test_curses.py
Lib/test/test_curses.py
+13
-9
Modules/_cursesmodule.c
Modules/_cursesmodule.c
+4
-2
configure
configure
+30
-0
configure.ac
configure.ac
+11
-0
pyconfig.h.in
pyconfig.h.in
+3
-0
No files found.
Lib/test/test_curses.py
View file @
87c66e46
...
...
@@ -142,6 +142,7 @@ class TestCurses(unittest.TestCase):
stdscr
.
idlok
(
1
)
if
hasattr
(
stdscr
,
'immedok'
):
stdscr
.
immedok
(
1
)
stdscr
.
immedok
(
0
)
stdscr
.
insch
(
'c'
)
stdscr
.
insdelln
(
1
)
stdscr
.
insnstr
(
'abc'
,
3
)
...
...
@@ -175,26 +176,27 @@ class TestCurses(unittest.TestCase):
stdscr
.
setscrreg
(
10
,
15
)
win3
=
stdscr
.
subwin
(
10
,
10
)
win3
=
stdscr
.
subwin
(
10
,
10
,
5
,
5
)
if
hasattr
(
stdscr
,
'syncok'
):
if
hasattr
(
stdscr
,
'syncok'
)
and
not
sys
.
platform
.
startswith
(
"sunos"
)
:
stdscr
.
syncok
(
1
)
stdscr
.
timeout
(
5
)
stdscr
.
touchline
(
5
,
5
)
stdscr
.
touchline
(
5
,
5
,
0
)
stdscr
.
vline
(
'a'
,
3
)
stdscr
.
vline
(
'a'
,
3
,
curses
.
A_STANDOUT
)
stdscr
.
chgat
(
5
,
2
,
3
,
curses
.
A_BLINK
)
stdscr
.
chgat
(
3
,
curses
.
A_BOLD
)
stdscr
.
chgat
(
5
,
8
,
curses
.
A_UNDERLINE
)
stdscr
.
chgat
(
curses
.
A_BLINK
)
if
hasattr
(
stdscr
,
'chgat'
):
stdscr
.
chgat
(
5
,
2
,
3
,
curses
.
A_BLINK
)
stdscr
.
chgat
(
3
,
curses
.
A_BOLD
)
stdscr
.
chgat
(
5
,
8
,
curses
.
A_UNDERLINE
)
stdscr
.
chgat
(
curses
.
A_BLINK
)
stdscr
.
refresh
()
stdscr
.
vline
(
1
,
1
,
'a'
,
3
)
stdscr
.
vline
(
1
,
1
,
'a'
,
3
,
curses
.
A_STANDOUT
)
if
hasattr
(
curses
,
'resize'
):
stdscr
.
resize
()
if
hasattr
(
curses
,
'enclose'
):
stdscr
.
enclose
()
if
hasattr
(
stdscr
,
'resize'
):
stdscr
.
resize
(
25
,
80
)
if
hasattr
(
stdscr
,
'enclose'
):
stdscr
.
enclose
(
10
,
10
)
self
.
assertRaises
(
ValueError
,
stdscr
.
getstr
,
-
400
)
self
.
assertRaises
(
ValueError
,
stdscr
.
getstr
,
2
,
3
,
-
400
)
...
...
@@ -351,6 +353,8 @@ class TestCurses(unittest.TestCase):
def
test_issue13051
(
self
):
stdscr
=
self
.
stdscr
if
not
hasattr
(
stdscr
,
'resize'
):
raise
unittest
.
SkipTest
(
'requires curses.window.resize'
)
box
=
curses
.
textpad
.
Textbox
(
stdscr
,
insert_mode
=
True
)
lines
,
cols
=
stdscr
.
getmaxyx
()
stdscr
.
resize
(
lines
-
2
,
cols
-
2
)
...
...
This diff is collapsed.
Click to expand it.
Modules/_cursesmodule.c
View file @
87c66e46
...
...
@@ -670,7 +670,7 @@ int py_mvwdelch(WINDOW *w, int y, int x)
#endif
/* chgat, added by Fabian Kreutz <fabian.kreutz at gmx.net> */
#ifdef HAVE_CURSES_WCHGAT
static
PyObject
*
PyCursesWindow_ChgAt
(
PyCursesWindowObject
*
self
,
PyObject
*
args
)
{
...
...
@@ -723,7 +723,7 @@ PyCursesWindow_ChgAt(PyCursesWindowObject *self, PyObject *args)
}
return
PyCursesCheckERR
(
rtn
,
"chgat"
);
}
#endif
static
PyObject
*
PyCursesWindow_DelCh
(
PyCursesWindowObject
*
self
,
PyObject
*
args
)
...
...
@@ -1569,7 +1569,9 @@ static PyMethodDef PyCursesWindow_Methods[] = {
{
"attron"
,
(
PyCFunction
)
PyCursesWindow_AttrOn
,
METH_VARARGS
},
{
"attrset"
,
(
PyCFunction
)
PyCursesWindow_AttrSet
,
METH_VARARGS
},
{
"bkgd"
,
(
PyCFunction
)
PyCursesWindow_Bkgd
,
METH_VARARGS
},
#ifdef HAVE_CURSES_WCHGAT
{
"chgat"
,
(
PyCFunction
)
PyCursesWindow_ChgAt
,
METH_VARARGS
},
#endif
{
"bkgdset"
,
(
PyCFunction
)
PyCursesWindow_BkgdSet
,
METH_VARARGS
},
{
"border"
,
(
PyCFunction
)
PyCursesWindow_Border
,
METH_VARARGS
},
{
"box"
,
(
PyCFunction
)
PyCursesWindow_Box
,
METH_VARARGS
},
...
...
This diff is collapsed.
Click to expand it.
configure
View file @
87c66e46
...
...
@@ -14852,6 +14852,36 @@ $as_echo "no" >&6; }
fi
rm
-f
core conftest.err conftest.
$ac_objext
conftest.
$ac_ext
{
$as_echo
"
$as_me
:
${
as_lineno
-
$LINENO
}
: checking for wchgat"
>
&5
$as_echo_n
"checking for wchgat... "
>
&6
;
}
cat
confdefs.h -
<<
_ACEOF
>conftest.
$ac_ext
/* end confdefs.h. */
#include <curses.h>
int
main ()
{
#ifndef wchgat
void *x=wchgat
#endif
;
return 0;
}
_ACEOF
if
ac_fn_c_try_compile
"
$LINENO
"
;
then
:
$as_echo
"#define HAVE_CURSES_WCHGAT 1"
>>
confdefs.h
{
$as_echo
"
$as_me
:
${
as_lineno
-
$LINENO
}
: result: yes"
>
&5
$as_echo
"yes"
>
&6
;
}
else
{
$as_echo
"
$as_me
:
${
as_lineno
-
$LINENO
}
: result: no"
>
&5
$as_echo
"no"
>
&6
;
}
fi
rm
-f
core conftest.err conftest.
$ac_objext
conftest.
$ac_ext
{
$as_echo
"
$as_me
:
${
as_lineno
-
$LINENO
}
: checking for filter"
>
&5
$as_echo_n
"checking for filter... "
>
&6
;
}
cat
confdefs.h -
<<
_ACEOF
>conftest.
$ac_ext
...
...
This diff is collapsed.
Click to expand it.
configure.ac
View file @
87c66e46
...
...
@@ -4594,6 +4594,17 @@ void *x=syncok
[AC_MSG_RESULT(no)]
)
AC_MSG_CHECKING(for wchgat)
AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include <curses.h>]], [[
#ifndef wchgat
void *x=wchgat
#endif
]])],
[AC_DEFINE(HAVE_CURSES_WCHGAT, 1, Define if you have the 'wchgat' function.)
AC_MSG_RESULT(yes)],
[AC_MSG_RESULT(no)]
)
AC_MSG_CHECKING(for filter)
AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include <curses.h>]], [[
#ifndef filter
...
...
This diff is collapsed.
Click to expand it.
pyconfig.h.in
View file @
87c66e46
...
...
@@ -169,6 +169,9 @@
/* Define if you have the 'use_env' function. */
#undef HAVE_CURSES_USE_ENV
/* Define if you have the 'wchgat' function. */
#undef HAVE_CURSES_WCHGAT
/* Define to 1 if you have the declaration of `isfinite', and to 0 if you
don't. */
#undef HAVE_DECL_ISFINITE
...
...
This diff is collapsed.
Click to expand it.
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment