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
c4e335b6
Kaydet (Commit)
c4e335b6
authored
Nis 30, 2015
tarafından
Raymond Hettinger
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
Issue #23910: Optimize property() getter calls. Patch by Joe Jevnik
üst
dd2693fc
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
11 additions
and
1 deletion
+11
-1
NEWS
Misc/NEWS
+2
-0
descrobject.c
Objects/descrobject.c
+9
-1
No files found.
Misc/NEWS
Dosyayı görüntüle @
c4e335b6
...
@@ -13,6 +13,8 @@ Core and Builtins
...
@@ -13,6 +13,8 @@ Core and Builtins
- Issue #23996: Avoid a crash when a delegated generator raises an
- Issue #23996: Avoid a crash when a delegated generator raises an
unnormalized StopIteration exception. Patch by Stefan Behnel.
unnormalized StopIteration exception. Patch by Stefan Behnel.
- Issue #23910: Optimize property() getter calls. Patch by Joe Jevnik.
- Issue #24022: Fix tokenizer crash when processing undecodable source code.
- Issue #24022: Fix tokenizer crash when processing undecodable source code.
- Issue #9951: Added a hex() method to bytes, bytearray, and memoryview.
- Issue #9951: Added a hex() method to bytes, bytearray, and memoryview.
...
...
Objects/descrobject.c
Dosyayı görüntüle @
c4e335b6
...
@@ -1372,6 +1372,8 @@ property_dealloc(PyObject *self)
...
@@ -1372,6 +1372,8 @@ property_dealloc(PyObject *self)
static
PyObject
*
static
PyObject
*
property_descr_get
(
PyObject
*
self
,
PyObject
*
obj
,
PyObject
*
type
)
property_descr_get
(
PyObject
*
self
,
PyObject
*
obj
,
PyObject
*
type
)
{
{
static
PyObject
*
args
=
NULL
;
PyObject
*
ret
;
propertyobject
*
gs
=
(
propertyobject
*
)
self
;
propertyobject
*
gs
=
(
propertyobject
*
)
self
;
if
(
obj
==
NULL
||
obj
==
Py_None
)
{
if
(
obj
==
NULL
||
obj
==
Py_None
)
{
...
@@ -1382,7 +1384,13 @@ property_descr_get(PyObject *self, PyObject *obj, PyObject *type)
...
@@ -1382,7 +1384,13 @@ property_descr_get(PyObject *self, PyObject *obj, PyObject *type)
PyErr_SetString
(
PyExc_AttributeError
,
"unreadable attribute"
);
PyErr_SetString
(
PyExc_AttributeError
,
"unreadable attribute"
);
return
NULL
;
return
NULL
;
}
}
return
PyObject_CallFunctionObjArgs
(
gs
->
prop_get
,
obj
,
NULL
);
if
(
!
args
&&
!
(
args
=
PyTuple_New
(
1
)))
{
return
NULL
;
}
PyTuple_SET_ITEM
(
args
,
0
,
obj
);
ret
=
PyObject_Call
(
gs
->
prop_get
,
args
,
NULL
);
PyTuple_SET_ITEM
(
args
,
0
,
NULL
);
return
ret
;
}
}
static
int
static
int
...
...
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