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
c40bc099
Kaydet (Commit)
c40bc099
authored
Haz 17, 2012
tarafından
Nick Coghlan
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
Issue #13783: the PEP 380 implementation no longer expands the public C API
üst
8d5c0b8c
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
12 additions
and
14 deletions
+12
-14
genobject.h
Include/genobject.h
+1
-1
pyerrors.h
Include/pyerrors.h
+0
-3
NEWS
Misc/NEWS
+6
-0
exceptions.c
Objects/exceptions.c
+0
-6
genobject.c
Objects/genobject.c
+4
-3
ceval.c
Python/ceval.c
+1
-1
No files found.
Include/genobject.h
Dosyayı görüntüle @
c40bc099
...
...
@@ -34,7 +34,7 @@ PyAPI_DATA(PyTypeObject) PyGen_Type;
PyAPI_FUNC
(
PyObject
*
)
PyGen_New
(
struct
_frame
*
);
PyAPI_FUNC
(
int
)
PyGen_NeedsFinalizing
(
PyGenObject
*
);
PyAPI_FUNC
(
int
)
PyGen_FetchStopIterationValue
(
PyObject
**
);
PyAPI_FUNC
(
int
)
_
PyGen_FetchStopIterationValue
(
PyObject
**
);
PyObject
*
_PyGen_Send
(
PyGenObject
*
,
PyObject
*
);
#ifdef __cplusplus
...
...
Include/pyerrors.h
Dosyayı görüntüle @
c40bc099
...
...
@@ -400,9 +400,6 @@ PyAPI_FUNC(int) PyUnicodeTranslateError_SetReason(
const
char
*
reason
/* UTF-8 encoded string */
);
/* create a StopIteration exception with the given value */
PyAPI_FUNC
(
PyObject
*
)
PyStopIteration_Create
(
PyObject
*
);
/* These APIs aren't really part of the error implementation, but
often needed to format error messages; the native C lib APIs are
not available on all platforms, which is why we provide emulations
...
...
Misc/NEWS
Dosyayı görüntüle @
c40bc099
...
...
@@ -111,6 +111,12 @@ Library
-
Issue
#
14963
:
Convert
contextlib
.
ExitStack
.
__exit__
to
use
an
iterative
algorithm
(
Patch
by
Alon
Horev
)
C
-
API
-----
-
Issue
#
13783
:
Inadvertent
additions
to
the
public
C
API
in
the
PEP
380
implementation
have
either
been
removed
or
marked
as
private
interfaces
.
Extension
Modules
-----------------
...
...
Objects/exceptions.c
Dosyayı görüntüle @
c40bc099
...
...
@@ -516,12 +516,6 @@ StopIteration_traverse(PyStopIterationObject *self, visitproc visit, void *arg)
return
BaseException_traverse
((
PyBaseExceptionObject
*
)
self
,
visit
,
arg
);
}
PyObject
*
PyStopIteration_Create
(
PyObject
*
value
)
{
return
PyObject_CallFunctionObjArgs
(
PyExc_StopIteration
,
value
,
NULL
);
}
ComplexExtendsException
(
PyExc_Exception
,
/* base */
StopIteration
,
/* name */
...
...
Objects/genobject.c
Dosyayı görüntüle @
c40bc099
...
...
@@ -97,7 +97,8 @@ gen_send_ex(PyGenObject *gen, PyObject *arg, int exc)
/* Delay exception instantiation if we can */
PyErr_SetNone
(
PyExc_StopIteration
);
}
else
{
PyObject
*
e
=
PyStopIteration_Create
(
result
);
PyObject
*
e
=
PyObject_CallFunctionObjArgs
(
PyExc_StopIteration
,
result
,
NULL
);
if
(
e
!=
NULL
)
{
PyErr_SetObject
(
PyExc_StopIteration
,
e
);
Py_DECREF
(
e
);
...
...
@@ -339,7 +340,7 @@ gen_throw(PyGenObject *gen, PyObject *args)
Py_DECREF
(
ret
);
/* Termination repetition of YIELD_FROM */
gen
->
gi_frame
->
f_lasti
++
;
if
(
PyGen_FetchStopIterationValue
(
&
val
)
==
0
)
{
if
(
_
PyGen_FetchStopIterationValue
(
&
val
)
==
0
)
{
ret
=
gen_send_ex
(
gen
,
val
,
0
);
Py_DECREF
(
val
);
}
else
{
...
...
@@ -428,7 +429,7 @@ gen_iternext(PyGenObject *gen)
*/
int
PyGen_FetchStopIterationValue
(
PyObject
**
pvalue
)
{
_
PyGen_FetchStopIterationValue
(
PyObject
**
pvalue
)
{
PyObject
*
et
,
*
ev
,
*
tb
;
PyObject
*
value
=
NULL
;
...
...
Python/ceval.c
Dosyayı görüntüle @
c40bc099
...
...
@@ -1852,7 +1852,7 @@ PyEval_EvalFrameEx(PyFrameObject *f, int throwflag)
PyObject
*
val
;
x
=
POP
();
/* Remove iter from stack */
Py_DECREF
(
x
);
err
=
PyGen_FetchStopIterationValue
(
&
val
);
err
=
_
PyGen_FetchStopIterationValue
(
&
val
);
if
(
err
<
0
)
{
x
=
NULL
;
break
;
...
...
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