Skip to content
Projeler
Gruplar
Parçacıklar
Yardım
Yükleniyor...
Oturum aç / Kaydol
Gezinmeyi değiştir
C
cpython
Proje
Proje
Ayrıntılar
Etkinlik
Cycle Analytics
Depo (repository)
Depo (repository)
Dosyalar
Kayıtlar (commit)
Dallar (branch)
Etiketler
Katkıda bulunanlar
Grafik
Karşılaştır
Grafikler
Konular (issue)
0
Konular (issue)
0
Liste
Pano
Etiketler
Kilometre Taşları
Birleştirme (merge) Talepleri
0
Birleştirme (merge) Talepleri
0
CI / CD
CI / CD
İş akışları (pipeline)
İşler
Zamanlamalar
Grafikler
Paketler
Paketler
Wiki
Wiki
Parçacıklar
Parçacıklar
Üyeler
Üyeler
Collapse sidebar
Close sidebar
Etkinlik
Grafik
Grafikler
Yeni bir konu (issue) oluştur
İşler
Kayıtlar (commit)
Konu (issue) Panoları
Kenar çubuğunu aç
Batuhan Osman TASKAYA
cpython
Commits
a0d9c685
Kaydet (Commit)
a0d9c685
authored
Eki 30, 2016
tarafından
Serhiy Storchaka
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Sade Fark
Issue #28549: Fixed segfault in curses's addch() with ncurses6.
üst
2f4453ef
0bcd89b8
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
11 additions
and
8 deletions
+11
-8
NEWS
Misc/NEWS
+2
-0
_cursesmodule.c
Modules/_cursesmodule.c
+9
-8
No files found.
Misc/NEWS
Dosyayı görüntüle @
a0d9c685
...
@@ -30,6 +30,8 @@ Core and Builtins
...
@@ -30,6 +30,8 @@ Core and Builtins
Library
Library
-------
-------
- Issue #28549: Fixed segfault in curses'
s
addch
()
with
ncurses6
.
-
Issue
#
28449
:
tarfile
.
open
()
with
mode
"r"
or
"r:"
now
tries
to
open
a
tar
-
Issue
#
28449
:
tarfile
.
open
()
with
mode
"r"
or
"r:"
now
tries
to
open
a
tar
file
with
compression
before
trying
to
open
it
without
compression
.
Otherwise
file
with
compression
before
trying
to
open
it
without
compression
.
Otherwise
it
had
50
%
chance
failed
with
ignore_zeros
=
True
.
it
had
50
%
chance
failed
with
ignore_zeros
=
True
.
...
...
Modules/_cursesmodule.c
Dosyayı görüntüle @
a0d9c685
...
@@ -280,7 +280,7 @@ static int
...
@@ -280,7 +280,7 @@ static int
PyCurses_ConvertToCchar_t
(
PyCursesWindowObject
*
win
,
PyObject
*
obj
,
PyCurses_ConvertToCchar_t
(
PyCursesWindowObject
*
win
,
PyObject
*
obj
,
chtype
*
ch
chtype
*
ch
#ifdef HAVE_NCURSESW
#ifdef HAVE_NCURSESW
,
c
char_t
*
wch
,
w
char_t
*
wch
#endif
#endif
)
)
{
{
...
@@ -298,8 +298,7 @@ PyCurses_ConvertToCchar_t(PyCursesWindowObject *win, PyObject *obj,
...
@@ -298,8 +298,7 @@ PyCurses_ConvertToCchar_t(PyCursesWindowObject *win, PyObject *obj,
PyUnicode_GET_LENGTH
(
obj
));
PyUnicode_GET_LENGTH
(
obj
));
return
0
;
return
0
;
}
}
memset
(
wch
->
chars
,
0
,
sizeof
(
wch
->
chars
));
*
wch
=
buffer
[
0
];
wch
->
chars
[
0
]
=
buffer
[
0
];
return
2
;
return
2
;
#else
#else
return
PyCurses_ConvertToChtype
(
win
,
obj
,
ch
);
return
PyCurses_ConvertToChtype
(
win
,
obj
,
ch
);
...
@@ -597,7 +596,8 @@ curses_window_addch_impl(PyCursesWindowObject *self, int group_left_1, int y,
...
@@ -597,7 +596,8 @@ curses_window_addch_impl(PyCursesWindowObject *self, int group_left_1, int y,
int
type
;
int
type
;
chtype
cch
;
chtype
cch
;
#ifdef HAVE_NCURSESW
#ifdef HAVE_NCURSESW
cchar_t
wch
;
wchar_t
wstr
[
2
];
cchar_t
wcval
;
#endif
#endif
const
char
*
funcname
;
const
char
*
funcname
;
...
@@ -605,14 +605,15 @@ curses_window_addch_impl(PyCursesWindowObject *self, int group_left_1, int y,
...
@@ -605,14 +605,15 @@ curses_window_addch_impl(PyCursesWindowObject *self, int group_left_1, int y,
attr
=
A_NORMAL
;
attr
=
A_NORMAL
;
#ifdef HAVE_NCURSESW
#ifdef HAVE_NCURSESW
type
=
PyCurses_ConvertToCchar_t
(
cwself
,
ch
,
&
cch
,
&
wch
);
type
=
PyCurses_ConvertToCchar_t
(
cwself
,
ch
,
&
cch
,
wstr
);
if
(
type
==
2
)
{
if
(
type
==
2
)
{
funcname
=
"add_wch"
;
funcname
=
"add_wch"
;
wch
.
attr
=
attr
;
wstr
[
1
]
=
L'\0'
;
setcchar
(
&
wcval
,
wstr
,
attr
,
0
,
NULL
);
if
(
coordinates_group
)
if
(
coordinates_group
)
rtn
=
mvwadd_wch
(
cwself
->
win
,
y
,
x
,
&
wc
h
);
rtn
=
mvwadd_wch
(
cwself
->
win
,
y
,
x
,
&
wc
val
);
else
{
else
{
rtn
=
wadd_wch
(
cwself
->
win
,
&
wc
h
);
rtn
=
wadd_wch
(
cwself
->
win
,
&
wc
val
);
}
}
}
}
else
else
...
...
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