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
3f5f8228
Kaydet (Commit)
3f5f8228
authored
Ock 03, 2009
tarafından
Guilherme Polo
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
Fix for issue #3638: Remove module level functions in _tkinter that
depend on TkappObject
üst
92ad63f7
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
11 additions
and
66 deletions
+11
-66
NEWS
Misc/NEWS
+3
-0
_tkinter.c
Modules/_tkinter.c
+8
-66
No files found.
Misc/NEWS
Dosyayı görüntüle @
3f5f8228
...
...
@@ -82,6 +82,9 @@ Core and Builtins
Library
-------
- Issue #3638: Remove functions from _tkinter module level that depend on
TkappObject to work with multiple threads.
- Issue #4718: Adapt the wsgiref package so that it actually works with
Python 3.x, in accordance with the `official amendments of the spec
<http://www.wsgi.org/wsgi/Amendments_1.0>`_.
...
...
Modules/_tkinter.c
Dosyayı görüntüle @
3f5f8228
...
...
@@ -2171,19 +2171,7 @@ Tkapp_CreateFileHandler(PyObject *self, PyObject *args)
&
file
,
&
mask
,
&
func
))
return
NULL
;
#ifdef WITH_THREAD
if
(
!
self
&&
!
tcl_lock
)
{
/* We don't have the Tcl lock since Tcl is threaded. */
PyErr_SetString
(
PyExc_RuntimeError
,
"_tkinter.createfilehandler not supported "
"for threaded Tcl"
);
return
NULL
;
}
#endif
if
(
self
)
{
CHECK_TCL_APPARTMENT
;
}
CHECK_TCL_APPARTMENT
;
tfile
=
PyObject_AsFileDescriptor
(
file
);
if
(
tfile
<
0
)
...
...
@@ -2214,19 +2202,7 @@ Tkapp_DeleteFileHandler(PyObject *self, PyObject *args)
if
(
!
PyArg_ParseTuple
(
args
,
"O:deletefilehandler"
,
&
file
))
return
NULL
;
#ifdef WITH_THREAD
if
(
!
self
&&
!
tcl_lock
)
{
/* We don't have the Tcl lock since Tcl is threaded. */
PyErr_SetString
(
PyExc_RuntimeError
,
"_tkinter.deletefilehandler not supported "
"for threaded Tcl"
);
return
NULL
;
}
#endif
if
(
self
)
{
CHECK_TCL_APPARTMENT
;
}
CHECK_TCL_APPARTMENT
;
tfile
=
PyObject_AsFileDescriptor
(
file
);
if
(
tfile
<
0
)
...
...
@@ -2400,19 +2376,7 @@ Tkapp_CreateTimerHandler(PyObject *self, PyObject *args)
return
NULL
;
}
#ifdef WITH_THREAD
if
(
!
self
&&
!
tcl_lock
)
{
/* We don't have the Tcl lock since Tcl is threaded. */
PyErr_SetString
(
PyExc_RuntimeError
,
"_tkinter.createtimerhandler not supported "
"for threaded Tcl"
);
return
NULL
;
}
#endif
if
(
self
)
{
CHECK_TCL_APPARTMENT
;
}
CHECK_TCL_APPARTMENT
;
v
=
Tktt_New
(
func
);
if
(
v
)
{
...
...
@@ -2438,20 +2402,8 @@ Tkapp_MainLoop(PyObject *selfptr, PyObject *args)
if
(
!
PyArg_ParseTuple
(
args
,
"|i:mainloop"
,
&
threshold
))
return
NULL
;
#ifdef WITH_THREAD
if
(
!
self
&&
!
tcl_lock
)
{
/* We don't have the Tcl lock since Tcl is threaded. */
PyErr_SetString
(
PyExc_RuntimeError
,
"_tkinter.mainloop not supported "
"for threaded Tcl"
);
return
NULL
;
}
#endif
if
(
self
)
{
CHECK_TCL_APPARTMENT
;
self
->
dispatching
=
1
;
}
CHECK_TCL_APPARTMENT
;
self
->
dispatching
=
1
;
quitMainLoop
=
0
;
while
(
Tk_GetNumMainWindows
()
>
threshold
&&
...
...
@@ -2461,7 +2413,7 @@ Tkapp_MainLoop(PyObject *selfptr, PyObject *args)
int
result
;
#ifdef WITH_THREAD
if
(
self
&&
self
->
threaded
)
{
if
(
self
->
threaded
)
{
/* Allow other Python threads to run. */
ENTER_TCL
result
=
Tcl_DoOneEvent
(
0
);
...
...
@@ -2483,15 +2435,13 @@ Tkapp_MainLoop(PyObject *selfptr, PyObject *args)
#endif
if
(
PyErr_CheckSignals
()
!=
0
)
{
if
(
self
)
self
->
dispatching
=
0
;
self
->
dispatching
=
0
;
return
NULL
;
}
if
(
result
<
0
)
break
;
}
if
(
self
)
self
->
dispatching
=
0
;
self
->
dispatching
=
0
;
quitMainLoop
=
0
;
if
(
errorInCmd
)
{
...
...
@@ -2884,14 +2834,6 @@ static PyMethodDef moduleMethods[] =
{
{
"_flatten"
,
Tkinter_Flatten
,
METH_VARARGS
},
{
"create"
,
Tkinter_Create
,
METH_VARARGS
},
#ifdef HAVE_CREATEFILEHANDLER
{
"createfilehandler"
,
Tkapp_CreateFileHandler
,
METH_VARARGS
},
{
"deletefilehandler"
,
Tkapp_DeleteFileHandler
,
METH_VARARGS
},
#endif
{
"createtimerhandler"
,
Tkapp_CreateTimerHandler
,
METH_VARARGS
},
{
"mainloop"
,
Tkapp_MainLoop
,
METH_VARARGS
},
{
"dooneevent"
,
Tkapp_DoOneEvent
,
METH_VARARGS
},
{
"quit"
,
Tkapp_Quit
,
METH_VARARGS
},
{
"setbusywaitinterval"
,
Tkinter_setbusywaitinterval
,
METH_VARARGS
,
setbusywaitinterval_doc
},
{
"getbusywaitinterval"
,(
PyCFunction
)
Tkinter_getbusywaitinterval
,
...
...
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