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
a3c3f2c5
Kaydet (Commit)
a3c3f2c5
authored
Şub 07, 1995
tarafından
Guido van Rossum
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
use PyCallable_Check; export TK_VERSION and TCL_VERSION strings;
some Tk 4.0 specific changes
üst
3fdf58b5
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
19 additions
and
7 deletions
+19
-7
_tkinter.c
Modules/_tkinter.c
+19
-7
No files found.
Modules/_tkinter.c
Dosyayı görüntüle @
a3c3f2c5
...
...
@@ -194,10 +194,16 @@ int
Tcl_AppInit
(
interp
)
Tcl_Interp
*
interp
;
{
if
(
Tcl_Init
(
interp
)
==
TCL_ERROR
)
Tk_Window
main
;
main
=
Tk_MainWindow
(
interp
);
if
(
Tcl_Init
(
interp
)
==
TCL_ERROR
)
{
fprintf
(
stderr
,
"Tcl_Init error: %s
\n
"
,
interp
->
result
);
return
TCL_ERROR
;
if
(
Tk_Init
(
interp
)
==
TCL_ERROR
)
}
if
(
Tk_Init
(
interp
)
==
TCL_ERROR
)
{
fprintf
(
stderr
,
"Tk_Init error: %s
\n
"
,
interp
->
result
);
return
TCL_ERROR
;
}
return
TCL_OK
;
}
#endif
/* !WITH_APPINIT */
...
...
@@ -699,8 +705,7 @@ Tkapp_CreateCommand (self, args)
if
(
!
PyTuple_Check
(
args
)
||
!
(
PyTuple_Size
(
args
)
==
2
)
||
!
PyString_Check
(
PyTuple_GetItem
(
args
,
0
))
||
!
(
PyMethod_Check
(
PyTuple_GetItem
(
args
,
1
))
||
PyFunction_Check
(
PyTuple_GetItem
(
args
,
1
))))
||
!
PyCallable_Check
(
PyTuple_GetItem
(
args
,
1
)))
{
PyErr_SetString
(
PyExc_TypeError
,
"bad argument list"
);
return
NULL
;
...
...
@@ -813,7 +818,7 @@ Tkapp_CreateFileHandler (self, args)
id
=
GetFileNo
(
file
);
if
(
id
<
0
)
return
NULL
;
if
(
!
(
PyMethod_Check
(
func
)
||
PyFunction_Check
(
func
)
))
if
(
!
PyCallable_Check
(
func
))
{
PyErr_SetString
(
PyExc_TypeError
,
"bad argument list"
);
return
NULL
;
...
...
@@ -982,8 +987,7 @@ Tkapp_CreateTimerHandler (self, args)
if
(
!
PyArg_Parse
(
args
,
"(iO)"
,
&
milliseconds
,
&
func
))
return
NULL
;
if
(
!
(
PyMethod_Check
(
func
)
||
PyFunction_Check
(
func
)
||
PyCFunction_Check
(
func
)))
if
(
!
PyCallable_Check
(
func
))
{
PyErr_SetString
(
PyExc_TypeError
,
"bad argument list"
);
return
NULL
;
...
...
@@ -1191,6 +1195,7 @@ static PyMethodDef moduleMethods[] =
{
NULL
,
NULL
}
};
#undef WITH_READLINE
/* XXX */
#ifdef WITH_READLINE
static
int
EventHook
()
...
...
@@ -1211,9 +1216,12 @@ EventHook ()
static
void
Tkinter_Cleanup
()
{
/* This segfault with Tk 4.0 beta and seems unnecessary there as well */
#if TK_MAJOR_VERSION < 4
/* XXX rl_deprep_terminal is static, damned! */
while
(
tkMainWindowList
!=
0
)
Tk_DestroyWindow
(
tkMainWindowList
->
win
);
#endif
}
void
...
...
@@ -1250,6 +1258,10 @@ PyInit_tkinter ()
PyDict_SetItemString
(
d
,
"ALL_EVENTS"
,
v
);
v
=
Py_BuildValue
(
"i"
,
TK_DONT_WAIT
);
PyDict_SetItemString
(
d
,
"DONT_WAIT"
,
v
);
v
=
Py_BuildValue
(
"s"
,
TK_VERSION
);
PyDict_SetItemString
(
d
,
"TK_VERSION"
,
v
);
v
=
Py_BuildValue
(
"s"
,
TCL_VERSION
);
PyDict_SetItemString
(
d
,
"TCL_VERSION"
,
v
);
#ifdef WITH_READLINE
rl_event_hook
=
EventHook
;
...
...
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