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
b3a9843c
Unverified
Kaydet (Commit)
b3a9843c
authored
May 24, 2019
tarafından
Victor Stinner
Kaydeden (comit)
GitHub
May 24, 2019
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
Support Py_UNUSED() on clang (GH-13544)
üst
b4bdecd0
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
9 additions
and
4 deletions
+9
-4
intro.rst
Doc/c-api/intro.rst
+1
-1
pymacro.h
Include/pymacro.h
+8
-3
No files found.
Doc/c-api/intro.rst
Dosyayı görüntüle @
b3a9843c
...
...
@@ -156,7 +156,7 @@ complete listing.
.. c:macro:: Py_UNUSED(arg)
Use this for unused arguments in a function definition to silence compiler
warnings
, e.g. ``PyObject* func(PyObject *Py_UNUSED(ignored))
``.
warnings
. Example: ``int func(int a, int Py_UNUSED(b)) { return a; }
``.
.. versionadded:: 3.4
...
...
Include/pymacro.h
Dosyayı görüntüle @
b3a9843c
...
...
@@ -89,10 +89,15 @@
/* Check if pointer "p" is aligned to "a"-bytes boundary. */
#define _Py_IS_ALIGNED(p, a) (!((uintptr_t)(p) & (uintptr_t)((a) - 1)))
#ifdef __GNUC__
#define Py_UNUSED(name) _unused_ ## name __attribute__((unused))
/* Use this for unused arguments in a function definition to silence compiler
* warnings. Example:
*
* int func(int a, int Py_UNUSED(b)) { return a; }
*/
#if defined(__GNUC__) || defined(__clang__)
# define Py_UNUSED(name) _unused_ ## name __attribute__((unused))
#else
#define Py_UNUSED(name) _unused_ ## name
#
define Py_UNUSED(name) _unused_ ## name
#endif
#define Py_UNREACHABLE() abort()
...
...
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