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
c98afb7a
Kaydet (Commit)
c98afb7a
authored
Agu 22, 2016
tarafından
Berker Peksag
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Sade Fark
Issue #27587: Merge from 3.5
üst
ad7b6c37
4b7b565c
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
8 additions
and
2 deletions
+8
-2
NEWS
Misc/NEWS
+4
-0
pystate.c
Python/pystate.c
+4
-2
No files found.
Misc/NEWS
Dosyayı görüntüle @
c98afb7a
...
@@ -10,6 +10,10 @@ What's New in Python 3.6.0 beta 1
...
@@ -10,6 +10,10 @@ What's New in Python 3.6.0 beta 1
Core and Builtins
Core and Builtins
-----------------
-----------------
- Issue #27587: Fix another issue found by PVS-Studio: Null pointer check
after use of '
def
' in _PyState_AddModule().
Initial patch by Christian Heimes.
- Issue #27792: The modulo operation applied to ``bool`` and other
- Issue #27792: The modulo operation applied to ``bool`` and other
``int`` subclasses now always returns an ``int``. Previously
``int`` subclasses now always returns an ``int``. Previously
the return type depended on the input values. Patch by Xiang Zhang.
the return type depended on the input values. Patch by Xiang Zhang.
...
...
Python/pystate.c
Dosyayı görüntüle @
c98afb7a
...
@@ -285,14 +285,16 @@ int
...
@@ -285,14 +285,16 @@ int
_PyState_AddModule
(
PyObject
*
module
,
struct
PyModuleDef
*
def
)
_PyState_AddModule
(
PyObject
*
module
,
struct
PyModuleDef
*
def
)
{
{
PyInterpreterState
*
state
;
PyInterpreterState
*
state
;
if
(
!
def
)
{
assert
(
PyErr_Occurred
());
return
-
1
;
}
if
(
def
->
m_slots
)
{
if
(
def
->
m_slots
)
{
PyErr_SetString
(
PyExc_SystemError
,
PyErr_SetString
(
PyExc_SystemError
,
"PyState_AddModule called on module with slots"
);
"PyState_AddModule called on module with slots"
);
return
-
1
;
return
-
1
;
}
}
state
=
GET_INTERP_STATE
();
state
=
GET_INTERP_STATE
();
if
(
!
def
)
return
-
1
;
if
(
!
state
->
modules_by_index
)
{
if
(
!
state
->
modules_by_index
)
{
state
->
modules_by_index
=
PyList_New
(
0
);
state
->
modules_by_index
=
PyList_New
(
0
);
if
(
!
state
->
modules_by_index
)
if
(
!
state
->
modules_by_index
)
...
...
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