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
e5662aed
Kaydet (Commit)
e5662aed
authored
Mar 24, 2004
tarafından
Nicholas Bastin
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
Changed random calls to PyThreadState_Get() to use the macro
üst
c69ebe8d
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
26 additions
and
26 deletions
+26
-26
threadmodule.c
Modules/threadmodule.c
+1
-1
ceval.c
Python/ceval.c
+5
-5
codecs.c
Python/codecs.c
+5
-5
errors.c
Python/errors.c
+1
-1
import.c
Python/import.c
+2
-2
pystate.c
Python/pystate.c
+1
-1
pythonrun.c
Python/pythonrun.c
+3
-3
sysmodule.c
Python/sysmodule.c
+8
-8
No files found.
Modules/threadmodule.c
Dosyayı görüntüle @
e5662aed
...
...
@@ -233,7 +233,7 @@ thread_PyThread_start_new_thread(PyObject *self, PyObject *fargs)
boot
=
PyMem_NEW
(
struct
bootstate
,
1
);
if
(
boot
==
NULL
)
return
PyErr_NoMemory
();
boot
->
interp
=
PyThreadState_G
et
()
->
interp
;
boot
->
interp
=
PyThreadState_G
ET
()
->
interp
;
boot
->
func
=
func
;
boot
->
args
=
args
;
boot
->
keyw
=
keyw
;
...
...
Python/ceval.c
Dosyayı görüntüle @
e5662aed
...
...
@@ -2843,7 +2843,7 @@ do_raise(PyObject *type, PyObject *value, PyObject *tb)
{
if
(
type
==
NULL
)
{
/* Reraise */
PyThreadState
*
tstate
=
PyThreadState_G
et
();
PyThreadState
*
tstate
=
PyThreadState_G
ET
();
type
=
tstate
->
exc_type
==
NULL
?
Py_None
:
tstate
->
exc_type
;
value
=
tstate
->
exc_value
;
tb
=
tstate
->
exc_traceback
;
...
...
@@ -3221,7 +3221,7 @@ maybe_call_line_trace(Py_tracefunc func, PyObject *obj,
void
PyEval_SetProfile
(
Py_tracefunc
func
,
PyObject
*
arg
)
{
PyThreadState
*
tstate
=
PyThreadState_G
et
();
PyThreadState
*
tstate
=
PyThreadState_G
ET
();
PyObject
*
temp
=
tstate
->
c_profileobj
;
Py_XINCREF
(
arg
);
tstate
->
c_profilefunc
=
NULL
;
...
...
@@ -3236,7 +3236,7 @@ PyEval_SetProfile(Py_tracefunc func, PyObject *arg)
void
PyEval_SetTrace
(
Py_tracefunc
func
,
PyObject
*
arg
)
{
PyThreadState
*
tstate
=
PyThreadState_G
et
();
PyThreadState
*
tstate
=
PyThreadState_G
ET
();
PyObject
*
temp
=
tstate
->
c_traceobj
;
Py_XINCREF
(
arg
);
tstate
->
c_tracefunc
=
NULL
;
...
...
@@ -3254,7 +3254,7 @@ PyEval_GetBuiltins(void)
{
PyFrameObject
*
current_frame
=
PyEval_GetFrame
();
if
(
current_frame
==
NULL
)
return
PyThreadState_G
et
()
->
interp
->
builtins
;
return
PyThreadState_G
ET
()
->
interp
->
builtins
;
else
return
current_frame
->
f_builtins
;
}
...
...
@@ -3282,7 +3282,7 @@ PyEval_GetGlobals(void)
PyFrameObject
*
PyEval_GetFrame
(
void
)
{
PyThreadState
*
tstate
=
PyThreadState_G
et
();
PyThreadState
*
tstate
=
PyThreadState_G
ET
();
return
_PyThreadState_GetFrame
(
tstate
);
}
...
...
Python/codecs.c
Dosyayı görüntüle @
e5662aed
...
...
@@ -28,7 +28,7 @@ static int _PyCodecRegistry_Init(void); /* Forward */
int
PyCodec_Register
(
PyObject
*
search_function
)
{
PyInterpreterState
*
interp
=
PyThreadState_G
et
()
->
interp
;
PyInterpreterState
*
interp
=
PyThreadState_G
ET
()
->
interp
;
if
(
interp
->
codec_search_path
==
NULL
&&
_PyCodecRegistry_Init
())
goto
onError
;
if
(
search_function
==
NULL
)
{
...
...
@@ -103,7 +103,7 @@ PyObject *_PyCodec_Lookup(const char *encoding)
goto
onError
;
}
interp
=
PyThreadState_G
et
()
->
interp
;
interp
=
PyThreadState_G
ET
()
->
interp
;
if
(
interp
->
codec_search_path
==
NULL
&&
_PyCodecRegistry_Init
())
goto
onError
;
...
...
@@ -395,7 +395,7 @@ PyObject *PyCodec_Decode(PyObject *object,
Return 0 on success, -1 on error */
int
PyCodec_RegisterError
(
const
char
*
name
,
PyObject
*
error
)
{
PyInterpreterState
*
interp
=
PyThreadState_G
et
()
->
interp
;
PyInterpreterState
*
interp
=
PyThreadState_G
ET
()
->
interp
;
if
(
interp
->
codec_search_path
==
NULL
&&
_PyCodecRegistry_Init
())
return
-
1
;
if
(
!
PyCallable_Check
(
error
))
{
...
...
@@ -413,7 +413,7 @@ PyObject *PyCodec_LookupError(const char *name)
{
PyObject
*
handler
=
NULL
;
PyInterpreterState
*
interp
=
PyThreadState_G
et
()
->
interp
;
PyInterpreterState
*
interp
=
PyThreadState_G
ET
()
->
interp
;
if
(
interp
->
codec_search_path
==
NULL
&&
_PyCodecRegistry_Init
())
return
NULL
;
...
...
@@ -802,7 +802,7 @@ static int _PyCodecRegistry_Init(void)
#endif
};
PyInterpreterState
*
interp
=
PyThreadState_G
et
()
->
interp
;
PyInterpreterState
*
interp
=
PyThreadState_G
ET
()
->
interp
;
PyObject
*
mod
;
int
i
;
...
...
Python/errors.c
Dosyayı görüntüle @
e5662aed
...
...
@@ -205,7 +205,7 @@ finally:
void
PyErr_Fetch
(
PyObject
**
p_type
,
PyObject
**
p_value
,
PyObject
**
p_traceback
)
{
PyThreadState
*
tstate
=
PyThreadState_G
et
();
PyThreadState
*
tstate
=
PyThreadState_G
ET
();
*
p_type
=
tstate
->
curexc_type
;
*
p_value
=
tstate
->
curexc_value
;
...
...
Python/import.c
Dosyayı görüntüle @
e5662aed
...
...
@@ -321,7 +321,7 @@ imp_release_lock(PyObject *self, PyObject *noargs)
PyObject
*
PyImport_GetModuleDict
(
void
)
{
PyInterpreterState
*
interp
=
PyThreadState_G
et
()
->
interp
;
PyInterpreterState
*
interp
=
PyThreadState_G
ET
()
->
interp
;
if
(
interp
->
modules
==
NULL
)
Py_FatalError
(
"PyImport_GetModuleDict: no module dictionary!"
);
return
interp
->
modules
;
...
...
@@ -353,7 +353,7 @@ PyImport_Cleanup(void)
int
pos
,
ndone
;
char
*
name
;
PyObject
*
key
,
*
value
,
*
dict
;
PyInterpreterState
*
interp
=
PyThreadState_G
et
()
->
interp
;
PyInterpreterState
*
interp
=
PyThreadState_G
ET
()
->
interp
;
PyObject
*
modules
=
interp
->
modules
;
if
(
modules
==
NULL
)
...
...
Python/pystate.c
Dosyayı görüntüle @
e5662aed
...
...
@@ -313,7 +313,7 @@ PyThreadState_GetDict(void)
int
PyThreadState_SetAsyncExc
(
long
id
,
PyObject
*
exc
)
{
PyThreadState
*
tstate
=
PyThreadState_G
et
();
PyThreadState
*
tstate
=
PyThreadState_G
ET
();
PyInterpreterState
*
interp
=
tstate
->
interp
;
PyThreadState
*
p
;
int
count
=
0
;
...
...
Python/pythonrun.c
Dosyayı görüntüle @
e5662aed
...
...
@@ -316,7 +316,7 @@ Py_Finalize(void)
initialized
=
0
;
/* Get current thread state and interpreter pointer */
tstate
=
PyThreadState_G
et
();
tstate
=
PyThreadState_G
ET
();
interp
=
tstate
->
interp
;
/* Disable signal handling */
...
...
@@ -529,7 +529,7 @@ Py_EndInterpreter(PyThreadState *tstate)
{
PyInterpreterState
*
interp
=
tstate
->
interp
;
if
(
tstate
!=
PyThreadState_G
et
())
if
(
tstate
!=
PyThreadState_G
ET
())
Py_FatalError
(
"Py_EndInterpreter: thread is not current"
);
if
(
tstate
->
frame
!=
NULL
)
Py_FatalError
(
"Py_EndInterpreter: thread still has a frame"
);
...
...
@@ -1461,7 +1461,7 @@ err_input(perrdetail *err)
msg
=
"too many levels of indentation"
;
break
;
case
E_DECODE
:
{
/* XXX */
PyThreadState
*
tstate
=
PyThreadState_G
et
();
PyThreadState
*
tstate
=
PyThreadState_G
ET
();
PyObject
*
value
=
tstate
->
curexc_value
;
if
(
value
!=
NULL
)
{
u
=
PyObject_Repr
(
value
);
...
...
Python/sysmodule.c
Dosyayı görüntüle @
e5662aed
...
...
@@ -48,7 +48,7 @@ extern const char *PyWin_DLLVersionString;
PyObject
*
PySys_GetObject
(
char
*
name
)
{
PyThreadState
*
tstate
=
PyThreadState_G
et
();
PyThreadState
*
tstate
=
PyThreadState_G
ET
();
PyObject
*
sd
=
tstate
->
interp
->
sysdict
;
if
(
sd
==
NULL
)
return
NULL
;
...
...
@@ -70,7 +70,7 @@ PySys_GetFile(char *name, FILE *def)
int
PySys_SetObject
(
char
*
name
,
PyObject
*
v
)
{
PyThreadState
*
tstate
=
PyThreadState_G
et
();
PyThreadState
*
tstate
=
PyThreadState_G
ET
();
PyObject
*
sd
=
tstate
->
interp
->
sysdict
;
if
(
v
==
NULL
)
{
if
(
PyDict_GetItemString
(
sd
,
name
)
==
NULL
)
...
...
@@ -86,7 +86,7 @@ static PyObject *
sys_displayhook
(
PyObject
*
self
,
PyObject
*
o
)
{
PyObject
*
outf
;
PyInterpreterState
*
interp
=
PyThreadState_G
et
()
->
interp
;
PyInterpreterState
*
interp
=
PyThreadState_G
ET
()
->
interp
;
PyObject
*
modules
=
interp
->
modules
;
PyObject
*
builtins
=
PyDict_GetItemString
(
modules
,
"__builtin__"
);
...
...
@@ -149,7 +149,7 @@ static PyObject *
sys_exc_info
(
PyObject
*
self
,
PyObject
*
noargs
)
{
PyThreadState
*
tstate
;
tstate
=
PyThreadState_G
et
();
tstate
=
PyThreadState_G
ET
();
return
Py_BuildValue
(
"(OOO)"
,
tstate
->
exc_type
!=
NULL
?
tstate
->
exc_type
:
Py_None
,
...
...
@@ -168,7 +168,7 @@ clause in the current stack frame or in an older stack frame."
static
PyObject
*
sys_exc_clear
(
PyObject
*
self
,
PyObject
*
noargs
)
{
PyThreadState
*
tstate
=
PyThreadState_G
et
();
PyThreadState
*
tstate
=
PyThreadState_G
ET
();
PyObject
*
tmp_type
,
*
tmp_value
,
*
tmp_tb
;
tmp_type
=
tstate
->
exc_type
;
tmp_value
=
tstate
->
exc_value
;
...
...
@@ -514,7 +514,7 @@ static PyObject *
sys_setdlopenflags
(
PyObject
*
self
,
PyObject
*
args
)
{
int
new_val
;
PyThreadState
*
tstate
=
PyThreadState_G
et
();
PyThreadState
*
tstate
=
PyThreadState_G
ET
();
if
(
!
PyArg_ParseTuple
(
args
,
"i:setdlopenflags"
,
&
new_val
))
return
NULL
;
if
(
!
tstate
)
...
...
@@ -537,7 +537,7 @@ sys.setdlopenflags(dl.RTLD_NOW|dl.RTLD_GLOBAL)"
static
PyObject
*
sys_getdlopenflags
(
PyObject
*
self
,
PyObject
*
args
)
{
PyThreadState
*
tstate
=
PyThreadState_G
et
();
PyThreadState
*
tstate
=
PyThreadState_G
ET
();
if
(
!
tstate
)
return
NULL
;
return
PyInt_FromLong
(
tstate
->
interp
->
dlopenflags
);
...
...
@@ -615,7 +615,7 @@ purposes only."
static
PyObject
*
sys_getframe
(
PyObject
*
self
,
PyObject
*
args
)
{
PyFrameObject
*
f
=
PyThreadState_G
et
()
->
frame
;
PyFrameObject
*
f
=
PyThreadState_G
ET
()
->
frame
;
int
depth
=
-
1
;
if
(
!
PyArg_ParseTuple
(
args
,
"|i:_getframe"
,
&
depth
))
...
...
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