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
55fa66dd
Kaydet (Commit)
55fa66dd
authored
Haz 25, 2005
tarafından
Brett Cannon
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
Add comments about PyThreadState and the usage of its fields.
üst
527c4699
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
9 additions
and
1 deletion
+9
-1
pystate.h
Include/pystate.h
+5
-1
ceval.c
Python/ceval.c
+4
-0
No files found.
Include/pystate.h
Dosyayı görüntüle @
55fa66dd
...
...
@@ -53,12 +53,16 @@ typedef int (*Py_tracefunc)(PyObject *, struct _frame *, int, PyObject *);
#define PyTrace_C_RETURN 6
typedef
struct
_ts
{
/* See Python/ceval.c for comments explaining most fields */
struct
_ts
*
next
;
PyInterpreterState
*
interp
;
struct
_frame
*
frame
;
int
recursion_depth
;
/* 'tracing' keeps track of the execution depth when tracing/profiling.
This is to prevent the actual trace/profile code from being recorded in
the trace/profile. */
int
tracing
;
int
use_tracing
;
...
...
@@ -75,7 +79,7 @@ typedef struct _ts {
PyObject
*
exc_value
;
PyObject
*
exc_traceback
;
PyObject
*
dict
;
PyObject
*
dict
;
/* Stores per-thread state */
/* tick_counter is incremented whenever the check_interval ticker
* reaches zero. The purpose is to give a useful measure of the number
...
...
Python/ceval.c
Dosyayı görüntüle @
55fa66dd
...
...
@@ -3284,10 +3284,12 @@ PyEval_SetProfile(Py_tracefunc func, PyObject *arg)
Py_XINCREF
(
arg
);
tstate
->
c_profilefunc
=
NULL
;
tstate
->
c_profileobj
=
NULL
;
/* Must make sure that tracing is not ignored if 'temp' is freed */
tstate
->
use_tracing
=
tstate
->
c_tracefunc
!=
NULL
;
Py_XDECREF
(
temp
);
tstate
->
c_profilefunc
=
func
;
tstate
->
c_profileobj
=
arg
;
/* Flag that tracing or profiling is turned on */
tstate
->
use_tracing
=
(
func
!=
NULL
)
||
(
tstate
->
c_tracefunc
!=
NULL
);
}
...
...
@@ -3299,10 +3301,12 @@ PyEval_SetTrace(Py_tracefunc func, PyObject *arg)
Py_XINCREF
(
arg
);
tstate
->
c_tracefunc
=
NULL
;
tstate
->
c_traceobj
=
NULL
;
/* Must make sure that profiling is not ignored if 'temp' is freed */
tstate
->
use_tracing
=
tstate
->
c_profilefunc
!=
NULL
;
Py_XDECREF
(
temp
);
tstate
->
c_tracefunc
=
func
;
tstate
->
c_traceobj
=
arg
;
/* Flag that tracing or profiling is turned on */
tstate
->
use_tracing
=
((
func
!=
NULL
)
||
(
tstate
->
c_profilefunc
!=
NULL
));
}
...
...
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