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
f07a4b66
Kaydet (Commit)
f07a4b66
authored
Mar 22, 2015
tarafından
Serhiy Storchaka
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
Issue #21526: Tkinter now supports new boolean type in Tcl 8.5.
üst
1b2f4d5f
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
14 additions
and
8 deletions
+14
-8
NEWS
Misc/NEWS
+2
-0
_tkinter.c
Modules/_tkinter.c
+12
-8
No files found.
Misc/NEWS
Dosyayı görüntüle @
f07a4b66
...
@@ -23,6 +23,8 @@ Core and Builtins
...
@@ -23,6 +23,8 @@ Core and Builtins
Library
Library
-------
-------
- Issue #21526: Tkinter now supports new boolean type in Tcl 8.5.
- Issue #23647: Increase impalib'
s
MAXLINE
to
accommodate
modern
mailbox
sizes
.
- Issue #23647: Increase impalib'
s
MAXLINE
to
accommodate
modern
mailbox
sizes
.
-
Issue
#
23539
:
If
body
is
None
,
http
.
client
.
HTTPConnection
.
request
now
sets
-
Issue
#
23539
:
If
body
is
None
,
http
.
client
.
HTTPConnection
.
request
now
sets
...
...
Modules/_tkinter.c
Dosyayı görüntüle @
f07a4b66
...
@@ -229,6 +229,7 @@ typedef struct {
...
@@ -229,6 +229,7 @@ typedef struct {
int
dispatching
;
int
dispatching
;
/* We cannot include tclInt.h, as this is internal.
/* We cannot include tclInt.h, as this is internal.
So we cache interesting types here. */
So we cache interesting types here. */
const
Tcl_ObjType
*
OldBooleanType
;
const
Tcl_ObjType
*
BooleanType
;
const
Tcl_ObjType
*
BooleanType
;
const
Tcl_ObjType
*
ByteArrayType
;
const
Tcl_ObjType
*
ByteArrayType
;
const
Tcl_ObjType
*
DoubleType
;
const
Tcl_ObjType
*
DoubleType
;
...
@@ -585,7 +586,8 @@ Tkapp_New(const char *screenName, const char *className,
...
@@ -585,7 +586,8 @@ Tkapp_New(const char *screenName, const char *className,
}
}
#endif
#endif
v
->
BooleanType
=
Tcl_GetObjType
(
"boolean"
);
v
->
OldBooleanType
=
Tcl_GetObjType
(
"boolean"
);
v
->
BooleanType
=
Tcl_GetObjType
(
"booleanString"
);
v
->
ByteArrayType
=
Tcl_GetObjType
(
"bytearray"
);
v
->
ByteArrayType
=
Tcl_GetObjType
(
"bytearray"
);
v
->
DoubleType
=
Tcl_GetObjType
(
"double"
);
v
->
DoubleType
=
Tcl_GetObjType
(
"double"
);
v
->
IntType
=
Tcl_GetObjType
(
"int"
);
v
->
IntType
=
Tcl_GetObjType
(
"int"
);
...
@@ -1001,15 +1003,18 @@ FromObj(PyObject* tkapp, Tcl_Obj *value)
...
@@ -1001,15 +1003,18 @@ FromObj(PyObject* tkapp, Tcl_Obj *value)
{
{
PyObject
*
result
=
NULL
;
PyObject
*
result
=
NULL
;
TkappObject
*
app
=
(
TkappObject
*
)
tkapp
;
TkappObject
*
app
=
(
TkappObject
*
)
tkapp
;
Tcl_Interp
*
interp
=
Tkapp_Interp
(
tkapp
);
if
(
value
->
typePtr
==
NULL
)
{
if
(
value
->
typePtr
==
NULL
)
{
return
unicodeFromTclStringAndSize
(
value
->
bytes
,
value
->
length
);
return
unicodeFromTclStringAndSize
(
value
->
bytes
,
value
->
length
);
}
}
if
(
value
->
typePtr
==
app
->
BooleanType
)
{
if
(
value
->
typePtr
==
app
->
BooleanType
||
result
=
value
->
internalRep
.
longValue
?
Py_True
:
Py_False
;
value
->
typePtr
==
app
->
OldBooleanType
)
{
Py_INCREF
(
result
);
int
boolValue
;
return
result
;
if
(
Tcl_GetBooleanFromObj
(
interp
,
value
,
&
boolValue
)
==
TCL_ERROR
)
return
Tkinter_Error
(
tkapp
);
return
PyBool_FromLong
(
boolValue
);
}
}
if
(
value
->
typePtr
==
app
->
ByteArrayType
)
{
if
(
value
->
typePtr
==
app
->
ByteArrayType
)
{
...
@@ -1032,15 +1037,14 @@ FromObj(PyObject* tkapp, Tcl_Obj *value)
...
@@ -1032,15 +1037,14 @@ FromObj(PyObject* tkapp, Tcl_Obj *value)
PyObject
*
elem
;
PyObject
*
elem
;
Tcl_Obj
*
tcl_elem
;
Tcl_Obj
*
tcl_elem
;
status
=
Tcl_ListObjLength
(
Tkapp_Interp
(
tkapp
)
,
value
,
&
size
);
status
=
Tcl_ListObjLength
(
interp
,
value
,
&
size
);
if
(
status
==
TCL_ERROR
)
if
(
status
==
TCL_ERROR
)
return
Tkinter_Error
(
tkapp
);
return
Tkinter_Error
(
tkapp
);
result
=
PyTuple_New
(
size
);
result
=
PyTuple_New
(
size
);
if
(
!
result
)
if
(
!
result
)
return
NULL
;
return
NULL
;
for
(
i
=
0
;
i
<
size
;
i
++
)
{
for
(
i
=
0
;
i
<
size
;
i
++
)
{
status
=
Tcl_ListObjIndex
(
Tkapp_Interp
(
tkapp
),
status
=
Tcl_ListObjIndex
(
interp
,
value
,
i
,
&
tcl_elem
);
value
,
i
,
&
tcl_elem
);
if
(
status
==
TCL_ERROR
)
{
if
(
status
==
TCL_ERROR
)
{
Py_DECREF
(
result
);
Py_DECREF
(
result
);
return
Tkinter_Error
(
tkapp
);
return
Tkinter_Error
(
tkapp
);
...
...
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