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
7ce29ca4
Kaydet (Commit)
7ce29ca4
authored
Eyl 19, 2007
tarafından
Thomas Wouters
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
Whitespace cleanup.
üst
ce272b6f
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
39 additions
and
38 deletions
+39
-38
ceval.c
Python/ceval.c
+39
-38
No files found.
Python/ceval.c
Dosyayı görüntüle @
7ce29ca4
...
@@ -1467,8 +1467,8 @@ PyEval_EvalFrameEx(PyFrameObject *f, int throwflag)
...
@@ -1467,8 +1467,8 @@ PyEval_EvalFrameEx(PyFrameObject *f, int throwflag)
case
RAISE_VARARGS
:
case
RAISE_VARARGS
:
v
=
w
=
NULL
;
v
=
w
=
NULL
;
switch
(
oparg
)
{
switch
(
oparg
)
{
case
2
:
case
2
:
v
=
POP
();
/* cause */
v
=
POP
();
/* cause */
case
1
:
case
1
:
w
=
POP
();
/* exc */
w
=
POP
();
/* exc */
case
0
:
/* Fallthrough */
case
0
:
/* Fallthrough */
...
@@ -2876,7 +2876,7 @@ set_exc_info(PyThreadState *tstate,
...
@@ -2876,7 +2876,7 @@ set_exc_info(PyThreadState *tstate,
tstate
->
exc_type
=
type
;
tstate
->
exc_type
=
type
;
tstate
->
exc_value
=
value
;
tstate
->
exc_value
=
value
;
tstate
->
exc_traceback
=
tb
;
tstate
->
exc_traceback
=
tb
;
PyException_SetTraceback
(
value
,
tb
);
PyException_SetTraceback
(
value
,
tb
);
Py_XDECREF
(
tmp_type
);
Py_XDECREF
(
tmp_type
);
Py_XDECREF
(
tmp_value
);
Py_XDECREF
(
tmp_value
);
Py_XDECREF
(
tmp_tb
);
Py_XDECREF
(
tmp_tb
);
...
@@ -2927,7 +2927,7 @@ reset_exc_info(PyThreadState *tstate)
...
@@ -2927,7 +2927,7 @@ reset_exc_info(PyThreadState *tstate)
static
enum
why_code
static
enum
why_code
do_raise
(
PyObject
*
exc
,
PyObject
*
cause
)
do_raise
(
PyObject
*
exc
,
PyObject
*
cause
)
{
{
PyObject
*
type
=
NULL
,
*
value
=
NULL
,
*
tb
=
NULL
;
PyObject
*
type
=
NULL
,
*
value
=
NULL
,
*
tb
=
NULL
;
if
(
exc
==
NULL
)
{
if
(
exc
==
NULL
)
{
/* Reraise */
/* Reraise */
...
@@ -2935,16 +2935,16 @@ do_raise(PyObject *exc, PyObject *cause)
...
@@ -2935,16 +2935,16 @@ do_raise(PyObject *exc, PyObject *cause)
type
=
tstate
->
exc_type
;
type
=
tstate
->
exc_type
;
value
=
tstate
->
exc_value
;
value
=
tstate
->
exc_value
;
tb
=
tstate
->
exc_traceback
;
tb
=
tstate
->
exc_traceback
;
if
(
type
==
Py_None
)
{
if
(
type
==
Py_None
)
{
PyErr_SetString
(
PyExc_RuntimeError
,
PyErr_SetString
(
PyExc_RuntimeError
,
"No active exception to reraise"
);
"No active exception to reraise"
);
return
WHY_EXCEPTION
;
return
WHY_EXCEPTION
;
}
}
Py_XINCREF
(
type
);
Py_XINCREF
(
type
);
Py_XINCREF
(
value
);
Py_XINCREF
(
value
);
Py_XINCREF
(
tb
);
Py_XINCREF
(
tb
);
PyErr_Restore
(
type
,
value
,
tb
);
PyErr_Restore
(
type
,
value
,
tb
);
return
WHY_RERAISE
;
return
WHY_RERAISE
;
}
}
/* We support the following forms of raise:
/* We support the following forms of raise:
...
@@ -2953,11 +2953,11 @@ do_raise(PyObject *exc, PyObject *cause)
...
@@ -2953,11 +2953,11 @@ do_raise(PyObject *exc, PyObject *cause)
raise <type> */
raise <type> */
if
(
PyExceptionClass_Check
(
exc
))
{
if
(
PyExceptionClass_Check
(
exc
))
{
type
=
exc
;
type
=
exc
;
value
=
PyObject_CallObject
(
exc
,
NULL
);
value
=
PyObject_CallObject
(
exc
,
NULL
);
if
(
value
==
NULL
)
if
(
value
==
NULL
)
goto
raise_error
;
goto
raise_error
;
}
}
else
if
(
PyExceptionInstance_Check
(
exc
))
{
else
if
(
PyExceptionInstance_Check
(
exc
))
{
value
=
exc
;
value
=
exc
;
type
=
PyExceptionInstance_Class
(
exc
);
type
=
PyExceptionInstance_Class
(
exc
);
...
@@ -2966,31 +2966,32 @@ do_raise(PyObject *exc, PyObject *cause)
...
@@ -2966,31 +2966,32 @@ do_raise(PyObject *exc, PyObject *cause)
else
{
else
{
/* Not something you can raise. You get an exception
/* Not something you can raise. You get an exception
anyway, just not what you specified :-) */
anyway, just not what you specified :-) */
Py_DECREF
(
exc
);
Py_DECREF
(
exc
);
PyErr_SetString
(
PyExc_TypeError
,
PyErr_SetString
(
PyExc_TypeError
,
"exceptions must derive from BaseException"
);
"exceptions must derive from BaseException"
);
goto
raise_error
;
goto
raise_error
;
}
}
tb
=
PyException_GetTraceback
(
value
);
tb
=
PyException_GetTraceback
(
value
);
if
(
cause
)
{
if
(
cause
)
{
PyObject
*
fixed_cause
;
PyObject
*
fixed_cause
;
if
(
PyExceptionClass_Check
(
cause
))
{
if
(
PyExceptionClass_Check
(
cause
))
{
fixed_cause
=
PyObject_CallObject
(
cause
,
NULL
);
fixed_cause
=
PyObject_CallObject
(
cause
,
NULL
);
if
(
fixed_cause
==
NULL
)
if
(
fixed_cause
==
NULL
)
goto
raise_error
;
goto
raise_error
;
Py_DECREF
(
cause
);
Py_DECREF
(
cause
);
}
}
else
if
(
PyExceptionInstance_Check
(
cause
))
{
else
if
(
PyExceptionInstance_Check
(
cause
))
{
fixed_cause
=
cause
;
fixed_cause
=
cause
;
}
}
else
{
else
{
PyErr_SetString
(
PyExc_TypeError
,
PyErr_SetString
(
PyExc_TypeError
,
"exception causes must derive from BaseException"
);
"exception causes must derive from "
goto
raise_error
;
"BaseException"
);
}
goto
raise_error
;
PyException_SetCause
(
value
,
fixed_cause
);
}
}
PyException_SetCause
(
value
,
fixed_cause
);
}
PyErr_Restore
(
type
,
value
,
tb
);
PyErr_Restore
(
type
,
value
,
tb
);
return
WHY_EXCEPTION
;
return
WHY_EXCEPTION
;
...
@@ -3675,7 +3676,7 @@ do_call(PyObject *func, PyObject ***pp_stack, int na, int nk)
...
@@ -3675,7 +3676,7 @@ do_call(PyObject *func, PyObject ***pp_stack, int na, int nk)
PCALL
(
PCALL_OTHER
);
PCALL
(
PCALL_OTHER
);
#endif
#endif
result
=
PyObject_Call
(
func
,
callargs
,
kwdict
);
result
=
PyObject_Call
(
func
,
callargs
,
kwdict
);
call_fail:
call_fail:
Py_XDECREF
(
callargs
);
Py_XDECREF
(
callargs
);
Py_XDECREF
(
kwdict
);
Py_XDECREF
(
kwdict
);
return
result
;
return
result
;
...
...
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