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
738236db
Kaydet (Commit)
738236db
authored
Şub 05, 2011
tarafından
Martin v. Löwis
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
Issue #11067: Add PyType_GetFlags, to support PyUnicode_Check
in the limited ABI
üst
9b142aaa
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
32 additions
and
1 deletion
+32
-1
type.rst
Doc/c-api/type.rst
+8
-0
object.h
Include/object.h
+6
-0
NEWS
Misc/NEWS
+3
-0
xxlimited.c
Modules/xxlimited.c
+7
-1
typeobject.c
Objects/typeobject.c
+6
-0
python3.def
PC/python3.def
+1
-0
python32stub.def
PC/python32stub.def
+1
-0
No files found.
Doc/c-api/type.rst
Dosyayı görüntüle @
738236db
...
...
@@ -35,6 +35,14 @@ Type Objects
Clear the internal lookup cache. Return the current version tag.
.. c:function:: long PyType_GetFlags(PyTypeObject* type)
Return the :attr:`tp_flags` member of *type*. This function is primarily
meant for use with `Py_LIMITED_API`; the individual flag bits are
guaranteed to be stable across Python releases, but access to
:attr:`tp_flags` itself is not part of the limited API.
.. versionadded:: 3.2
.. c:function:: void PyType_Modified(PyTypeObject *type)
...
...
Include/object.h
Dosyayı görüntüle @
738236db
...
...
@@ -437,6 +437,8 @@ PyAPI_DATA(PyTypeObject) PyType_Type; /* built-in 'type' */
PyAPI_DATA
(
PyTypeObject
)
PyBaseObject_Type
;
/* built-in 'object' */
PyAPI_DATA
(
PyTypeObject
)
PySuper_Type
;
/* built-in 'super' */
PyAPI_FUNC
(
long
)
PyType_GetFlags
(
PyTypeObject
*
);
#define PyType_Check(op) \
PyType_FastSubclass(Py_TYPE(op), Py_TPFLAGS_TYPE_SUBCLASS)
#define PyType_CheckExact(op) (Py_TYPE(op) == &PyType_Type)
...
...
@@ -589,7 +591,11 @@ given type object has a specified feature.
Py_TPFLAGS_HAVE_VERSION_TAG | \
0)
#ifdef Py_LIMITED_API
#define PyType_HasFeature(t,f) ((PyType_GetFlags(t) & (f)) != 0)
#else
#define PyType_HasFeature(t,f) (((t)->tp_flags & (f)) != 0)
#endif
#define PyType_FastSubclass(t,f) PyType_HasFeature(t,f)
...
...
Misc/NEWS
Dosyayı görüntüle @
738236db
...
...
@@ -10,6 +10,9 @@ What's New in Python 3.2?
Core and Builtins
-----------------
- Issue #11067: Add PyType_GetFlags, to support PyUnicode_Check
in the limited ABI.
- Issue #11118: Fix bogus export of None in python3.dll.
Library
...
...
Modules/xxlimited.c
Dosyayı görüntüle @
738236db
...
...
@@ -50,8 +50,14 @@ Xxo_dealloc(XxoObject *self)
static
PyObject
*
Xxo_demo
(
XxoObject
*
self
,
PyObject
*
args
)
{
if
(
!
PyArg_ParseTuple
(
args
,
":demo"
))
PyObject
*
o
=
NULL
;
if
(
!
PyArg_ParseTuple
(
args
,
"|O:demo"
,
&
o
))
return
NULL
;
/* Test availability of fast type checks */
if
(
o
!=
NULL
&&
PyUnicode_Check
(
o
))
{
Py_INCREF
(
o
);
return
o
;
}
Py_INCREF
(
Py_None
);
return
Py_None
;
}
...
...
Objects/typeobject.c
Dosyayı görüntüle @
738236db
...
...
@@ -1904,6 +1904,12 @@ type_init(PyObject *cls, PyObject *args, PyObject *kwds)
return
res
;
}
long
PyType_GetFlags
(
PyTypeObject
*
type
)
{
return
type
->
tp_flags
;
}
static
PyObject
*
type_new
(
PyTypeObject
*
metatype
,
PyObject
*
args
,
PyObject
*
kwds
)
{
...
...
PC/python3.def
Dosyayı görüntüle @
738236db
...
...
@@ -513,6 +513,7 @@ EXPORTS
PyType_FromSpec=python32.PyType_FromSpec
PyType_GenericAlloc=python32.PyType_GenericAlloc
PyType_GenericNew=python32.PyType_GenericNew
PyType_GetFlags=python32.PyType_GetFlags
PyType_IsSubtype=python32.PyType_IsSubtype
PyType_Modified=python32.PyType_Modified
PyType_Ready=python32.PyType_Ready
...
...
PC/python32stub.def
Dosyayı görüntüle @
738236db
...
...
@@ -513,6 +513,7 @@ PyType_ClearCache
PyType_FromSpec
PyType_GenericAlloc
PyType_GenericNew
PyType_GetFlags
PyType_IsSubtype
PyType_Modified
PyType_Ready
...
...
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