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
ceeef10c
Unverified
Kaydet (Commit)
ceeef10c
authored
Haz 15, 2018
tarafından
Serhiy Storchaka
Kaydeden (comit)
GitHub
Haz 15, 2018
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
bpo-33818: PyExceptionClass_Name() will now return "const char *". (GH-7581)
üst
08f127a3
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
14 additions
and
9 deletions
+14
-9
3.8.rst
Doc/whatsnew/3.8.rst
+4
-0
pyerrors.h
Include/pyerrors.h
+2
-3
2018-06-10-09-42-31.bpo-33818.50nlf3.rst
...EWS.d/next/C API/2018-06-10-09-42-31.bpo-33818.50nlf3.rst
+2
-0
exceptions.c
Objects/exceptions.c
+2
-2
errors.c
Python/errors.c
+2
-2
pythonrun.c
Python/pythonrun.c
+2
-2
No files found.
Doc/whatsnew/3.8.rst
Dosyayı görüntüle @
ceeef10c
...
@@ -115,9 +115,13 @@ Optimizations
...
@@ -115,9 +115,13 @@ Optimizations
first introduced in Python 3.4. It offers better performance and smaller
first introduced in Python 3.4. It offers better performance and smaller
size compared to Protocol 3 available since Python 3.0.
size compared to Protocol 3 available since Python 3.0.
Build and C API Changes
Build and C API Changes
=======================
=======================
* The result of :c:func:`PyExceptionClass_Name` is now of type
``const char *`` rather of ``char *``.
(Contributed by Serhiy Storchaka in :issue:`33818`.)
Deprecated
Deprecated
...
...
Include/pyerrors.h
Dosyayı görüntüle @
ceeef10c
...
@@ -140,10 +140,9 @@ PyAPI_FUNC(void) _PyErr_ChainExceptions(PyObject *, PyObject *, PyObject *);
...
@@ -140,10 +140,9 @@ PyAPI_FUNC(void) _PyErr_ChainExceptions(PyObject *, PyObject *, PyObject *);
#define PyExceptionInstance_Check(x) \
#define PyExceptionInstance_Check(x) \
PyType_FastSubclass((x)->ob_type, Py_TPFLAGS_BASE_EXC_SUBCLASS)
PyType_FastSubclass((x)->ob_type, Py_TPFLAGS_BASE_EXC_SUBCLASS)
PyAPI_FUNC
(
char
*
)
PyExceptionClass_Name
(
PyObject
*
);
PyAPI_FUNC
(
c
onst
c
har
*
)
PyExceptionClass_Name
(
PyObject
*
);
#ifndef Py_LIMITED_API
#ifndef Py_LIMITED_API
#define PyExceptionClass_Name(x) \
#define PyExceptionClass_Name(x) (((PyTypeObject*)(x))->tp_name)
((char *)(((PyTypeObject *)(x))->tp_name))
#endif
#endif
#define PyExceptionInstance_Class(x) ((PyObject*)((x)->ob_type))
#define PyExceptionInstance_Class(x) ((PyObject*)((x)->ob_type))
...
...
Misc/NEWS.d/next/C API/2018-06-10-09-42-31.bpo-33818.50nlf3.rst
0 → 100644
Dosyayı görüntüle @
ceeef10c
:c:func:`PyExceptionClass_Name` will now return ``const char *`` instead of
``char *``.
Objects/exceptions.c
Dosyayı görüntüle @
ceeef10c
...
@@ -344,10 +344,10 @@ PyException_SetContext(PyObject *self, PyObject *context)
...
@@ -344,10 +344,10 @@ PyException_SetContext(PyObject *self, PyObject *context)
#undef PyExceptionClass_Name
#undef PyExceptionClass_Name
char
*
c
onst
c
har
*
PyExceptionClass_Name
(
PyObject
*
ob
)
PyExceptionClass_Name
(
PyObject
*
ob
)
{
{
return
(
char
*
)(
(
PyTypeObject
*
)
ob
)
->
tp_name
;
return
((
PyTypeObject
*
)
ob
)
->
tp_name
;
}
}
static
struct
PyMemberDef
BaseException_members
[]
=
{
static
struct
PyMemberDef
BaseException_members
[]
=
{
...
...
Python/errors.c
Dosyayı görüntüle @
ceeef10c
...
@@ -947,7 +947,7 @@ PyErr_WriteUnraisable(PyObject *obj)
...
@@ -947,7 +947,7 @@ PyErr_WriteUnraisable(PyObject *obj)
_Py_IDENTIFIER
(
__module__
);
_Py_IDENTIFIER
(
__module__
);
PyObject
*
f
,
*
t
,
*
v
,
*
tb
;
PyObject
*
f
,
*
t
,
*
v
,
*
tb
;
PyObject
*
moduleName
=
NULL
;
PyObject
*
moduleName
=
NULL
;
c
har
*
className
;
c
onst
char
*
className
;
PyErr_Fetch
(
&
t
,
&
v
,
&
tb
);
PyErr_Fetch
(
&
t
,
&
v
,
&
tb
);
...
@@ -977,7 +977,7 @@ PyErr_WriteUnraisable(PyObject *obj)
...
@@ -977,7 +977,7 @@ PyErr_WriteUnraisable(PyObject *obj)
assert
(
PyExceptionClass_Check
(
t
));
assert
(
PyExceptionClass_Check
(
t
));
className
=
PyExceptionClass_Name
(
t
);
className
=
PyExceptionClass_Name
(
t
);
if
(
className
!=
NULL
)
{
if
(
className
!=
NULL
)
{
char
*
dot
=
strrchr
(
className
,
'.'
);
c
onst
c
har
*
dot
=
strrchr
(
className
,
'.'
);
if
(
dot
!=
NULL
)
if
(
dot
!=
NULL
)
className
=
dot
+
1
;
className
=
dot
+
1
;
}
}
...
...
Python/pythonrun.c
Dosyayı görüntüle @
ceeef10c
...
@@ -774,12 +774,12 @@ print_exception(PyObject *f, PyObject *value)
...
@@ -774,12 +774,12 @@ print_exception(PyObject *f, PyObject *value)
}
}
else
{
else
{
PyObject
*
moduleName
;
PyObject
*
moduleName
;
c
har
*
className
;
c
onst
char
*
className
;
_Py_IDENTIFIER
(
__module__
);
_Py_IDENTIFIER
(
__module__
);
assert
(
PyExceptionClass_Check
(
type
));
assert
(
PyExceptionClass_Check
(
type
));
className
=
PyExceptionClass_Name
(
type
);
className
=
PyExceptionClass_Name
(
type
);
if
(
className
!=
NULL
)
{
if
(
className
!=
NULL
)
{
char
*
dot
=
strrchr
(
className
,
'.'
);
c
onst
c
har
*
dot
=
strrchr
(
className
,
'.'
);
if
(
dot
!=
NULL
)
if
(
dot
!=
NULL
)
className
=
dot
+
1
;
className
=
dot
+
1
;
}
}
...
...
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