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
18bc7c22
Kaydet (Commit)
18bc7c22
authored
Ara 21, 1998
tarafından
Guido van Rossum
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
Make current_tstate a global, _PyThreadState_Current. This is to
support a macro in pystate.h.
üst
dfaac4df
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
10 deletions
+10
-10
pystate.c
Python/pystate.c
+10
-10
No files found.
Python/pystate.c
Dosyayı görüntüle @
18bc7c22
...
@@ -42,7 +42,7 @@ PERFORMANCE OF THIS SOFTWARE.
...
@@ -42,7 +42,7 @@ PERFORMANCE OF THIS SOFTWARE.
static
PyInterpreterState
*
interp_head
=
NULL
;
static
PyInterpreterState
*
interp_head
=
NULL
;
static
PyThreadState
*
current_tstate
=
NULL
;
PyThreadState
*
_PyThreadState_Current
=
NULL
;
PyInterpreterState
*
PyInterpreterState
*
...
@@ -180,7 +180,7 @@ PyThreadState_Delete(tstate)
...
@@ -180,7 +180,7 @@ PyThreadState_Delete(tstate)
PyThreadState
**
p
;
PyThreadState
**
p
;
if
(
tstate
==
NULL
)
if
(
tstate
==
NULL
)
Py_FatalError
(
"PyThreadState_Delete: NULL tstate"
);
Py_FatalError
(
"PyThreadState_Delete: NULL tstate"
);
if
(
tstate
==
current_tstate
)
if
(
tstate
==
_PyThreadState_Current
)
Py_FatalError
(
"PyThreadState_Delete: tstate is still current"
);
Py_FatalError
(
"PyThreadState_Delete: tstate is still current"
);
interp
=
tstate
->
interp
;
interp
=
tstate
->
interp
;
if
(
interp
==
NULL
)
if
(
interp
==
NULL
)
...
@@ -200,10 +200,10 @@ PyThreadState_Delete(tstate)
...
@@ -200,10 +200,10 @@ PyThreadState_Delete(tstate)
PyThreadState
*
PyThreadState
*
PyThreadState_Get
()
PyThreadState_Get
()
{
{
if
(
current_tstate
==
NULL
)
if
(
_PyThreadState_Current
==
NULL
)
Py_FatalError
(
"PyThreadState_Get: no current thread"
);
Py_FatalError
(
"PyThreadState_Get: no current thread"
);
return
current_tstate
;
return
_PyThreadState_Current
;
}
}
...
@@ -211,9 +211,9 @@ PyThreadState *
...
@@ -211,9 +211,9 @@ PyThreadState *
PyThreadState_Swap
(
new
)
PyThreadState_Swap
(
new
)
PyThreadState
*
new
;
PyThreadState
*
new
;
{
{
PyThreadState
*
old
=
current_tstate
;
PyThreadState
*
old
=
_PyThreadState_Current
;
current_tstate
=
new
;
_PyThreadState_Current
=
new
;
return
old
;
return
old
;
}
}
...
@@ -227,10 +227,10 @@ PyThreadState_Swap(new)
...
@@ -227,10 +227,10 @@ PyThreadState_Swap(new)
PyObject
*
PyObject
*
PyThreadState_GetDict
()
PyThreadState_GetDict
()
{
{
if
(
current_tstate
==
NULL
)
if
(
_PyThreadState_Current
==
NULL
)
Py_FatalError
(
"PyThreadState_GetDict: no current thread"
);
Py_FatalError
(
"PyThreadState_GetDict: no current thread"
);
if
(
current_tstate
->
dict
==
NULL
)
if
(
_PyThreadState_Current
->
dict
==
NULL
)
current_tstate
->
dict
=
PyDict_New
();
_PyThreadState_Current
->
dict
=
PyDict_New
();
return
current_tstate
->
dict
;
return
_PyThreadState_Current
->
dict
;
}
}
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