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
6bfa2e68
Kaydet (Commit)
6bfa2e68
authored
Eki 01, 2002
tarafından
Martin v. Löwis
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
Drop support for Tk 8.0 and 8.1.
üst
70e1d9b5
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
137 deletions
+2
-137
_tkinter.c
Modules/_tkinter.c
+2
-137
No files found.
Modules/_tkinter.c
Dosyayı görüntüle @
6bfa2e68
...
...
@@ -51,8 +51,8 @@ Copyright (C) 1994 Steen Lumholt.
#define TKMAJORMINOR (TK_MAJOR_VERSION*1000 + TK_MINOR_VERSION)
#if TKMAJORMINOR < 800
0
#error "Tk older than 8.
0
not supported"
#if TKMAJORMINOR < 800
2
#error "Tk older than 8.
2
not supported"
#endif
#if defined(macintosh)
...
...
@@ -498,12 +498,6 @@ Tkapp_New(char *screenName, char *baseName, char *className, int interactive)
/** Tcl Eval **/
#if TKMAJORMINOR >= 8001
#define USING_OBJECTS
#endif
#ifdef USING_OBJECTS
static
Tcl_Obj
*
AsObj
(
PyObject
*
value
)
{
...
...
@@ -530,16 +524,6 @@ AsObj(PyObject *value)
}
#ifdef Py_USING_UNICODE
else
if
(
PyUnicode_Check
(
value
))
{
#if TKMAJORMINOR <= 8001
/* In Tcl 8.1 we must use UTF-8 */
PyObject
*
utf8
=
PyUnicode_AsUTF8String
(
value
);
if
(
!
utf8
)
return
0
;
result
=
Tcl_NewStringObj
(
PyString_AS_STRING
(
utf8
),
PyString_GET_SIZE
(
utf8
));
Py_DECREF
(
utf8
);
return
result
;
#else
/* TKMAJORMINOR > 8001 */
/* In Tcl 8.2 and later, use Tcl_NewUnicodeObj() */
if
(
sizeof
(
Py_UNICODE
)
!=
sizeof
(
Tcl_UniChar
))
{
/* XXX Should really test this at compile time */
...
...
@@ -549,7 +533,6 @@ AsObj(PyObject *value)
}
return
Tcl_NewUnicodeObj
(
PyUnicode_AS_UNICODE
(
value
),
PyUnicode_GET_SIZE
(
value
));
#endif
/* TKMAJORMINOR > 8001 */
}
#endif
else
{
...
...
@@ -663,124 +646,6 @@ Tkapp_Call(PyObject *self, PyObject *args)
return
res
;
}
#else
/* !USING_OBJECTS */
static
PyObject
*
Tkapp_Call
(
PyObject
*
self
,
PyObject
*
args
)
{
/* This is copied from Merge() */
PyObject
*
tmp
=
NULL
;
char
*
argvStore
[
ARGSZ
];
char
**
argv
=
NULL
;
int
fvStore
[
ARGSZ
];
int
*
fv
=
NULL
;
int
argc
=
0
,
fvc
=
0
,
i
;
PyObject
*
res
=
NULL
;
/* except this has a different type */
Tcl_CmdInfo
info
;
/* and this is added */
Tcl_Interp
*
interp
=
Tkapp_Interp
(
self
);
/* and this too */
if
(
!
(
tmp
=
PyList_New
(
0
)))
return
NULL
;
argv
=
argvStore
;
fv
=
fvStore
;
if
(
args
==
NULL
)
argc
=
0
;
else
if
(
!
PyTuple_Check
(
args
))
{
argc
=
1
;
fv
[
0
]
=
0
;
if
(
!
(
argv
[
0
]
=
AsString
(
args
,
tmp
)))
goto
finally
;
}
else
{
argc
=
PyTuple_Size
(
args
);
if
(
argc
>
ARGSZ
)
{
argv
=
(
char
**
)
ckalloc
(
argc
*
sizeof
(
char
*
));
fv
=
(
int
*
)
ckalloc
(
argc
*
sizeof
(
int
));
if
(
argv
==
NULL
||
fv
==
NULL
)
{
PyErr_NoMemory
();
goto
finally
;
}
}
for
(
i
=
0
;
i
<
argc
;
i
++
)
{
PyObject
*
v
=
PyTuple_GetItem
(
args
,
i
);
if
(
PyTuple_Check
(
v
))
{
fv
[
i
]
=
1
;
if
(
!
(
argv
[
i
]
=
Merge
(
v
)))
goto
finally
;
fvc
++
;
}
else
if
(
v
==
Py_None
)
{
argc
=
i
;
break
;
}
else
{
fv
[
i
]
=
0
;
if
(
!
(
argv
[
i
]
=
AsString
(
v
,
tmp
)))
goto
finally
;
fvc
++
;
}
}
}
/* End code copied from Merge() */
/* All this to avoid a call to Tcl_Merge() and the corresponding call
to Tcl_SplitList() inside Tcl_Eval()... It can save a bundle! */
if
(
Py_VerboseFlag
>=
2
)
{
for
(
i
=
0
;
i
<
argc
;
i
++
)
PySys_WriteStderr
(
"%s "
,
argv
[
i
]);
}
ENTER_TCL
info
.
proc
=
NULL
;
if
(
argc
<
1
||
!
Tcl_GetCommandInfo
(
interp
,
argv
[
0
],
&
info
)
||
info
.
proc
==
NULL
)
{
char
*
cmd
;
cmd
=
Tcl_Merge
(
argc
,
argv
);
i
=
Tcl_Eval
(
interp
,
cmd
);
ckfree
(
cmd
);
}
else
{
Tcl_ResetResult
(
interp
);
i
=
(
*
info
.
proc
)(
info
.
clientData
,
interp
,
argc
,
argv
);
}
ENTER_OVERLAP
if
(
info
.
proc
==
NULL
&&
Py_VerboseFlag
>=
2
)
PySys_WriteStderr
(
"... use TclEval "
);
if
(
i
==
TCL_ERROR
)
{
if
(
Py_VerboseFlag
>=
2
)
PySys_WriteStderr
(
"... error: '%s'
\n
"
,
Tcl_GetStringResult
(
interp
));
Tkinter_Error
(
self
);
}
else
{
if
(
Py_VerboseFlag
>=
2
)
PySys_WriteStderr
(
"-> '%s'
\n
"
,
Tcl_GetStringResult
(
interp
));
res
=
PyString_FromString
(
Tcl_GetStringResult
(
interp
));
}
LEAVE_OVERLAP_TCL
/* Copied from Merge() again */
finally
:
for
(
i
=
0
;
i
<
fvc
;
i
++
)
if
(
fv
[
i
])
{
ckfree
(
argv
[
i
]);
}
if
(
argv
!=
argvStore
)
ckfree
(
FREECAST
argv
);
if
(
fv
!=
fvStore
)
ckfree
(
FREECAST
fv
);
Py_DECREF
(
tmp
);
return
res
;
}
#endif
/* !USING_OBJECTS */
static
PyObject
*
Tkapp_GlobalCall
(
PyObject
*
self
,
PyObject
*
args
)
...
...
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