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
d1302c01
Kaydet (Commit)
d1302c01
authored
Ock 23, 2017
tarafından
Serhiy Storchaka
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
Issue #28999: Use Py_RETURN_NONE, Py_RETURN_TRUE and Py_RETURN_FALSE wherever
possible but Coccinelle couldn't find opportunity.
üst
228b12ed
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
10 additions
and
19 deletions
+10
-19
py_curses.h
Include/py_curses.h
+3
-6
cfield.c
Modules/_ctypes/cfield.c
+1
-1
_json.c
Modules/_json.c
+3
-6
_testcapimodule.c
Modules/_testcapimodule.c
+1
-2
unicode_format.h
Objects/stringlib/unicode_format.h
+2
-4
No files found.
Include/py_curses.h
Dosyayı görüntüle @
d1302c01
...
...
@@ -154,19 +154,16 @@ static PyObject *PyCurses_ ## X (PyObject *self) \
{ \
PyCursesInitialised \
if (X () == FALSE) { \
Py_INCREF(Py_False); \
return Py_False; \
Py_RETURN_FALSE; \
} \
Py_INCREF(Py_True); \
return Py_True; }
Py_RETURN_TRUE; }
#define NoArgNoReturnVoidFunction(X) \
static PyObject *PyCurses_ ## X (PyObject *self) \
{ \
PyCursesInitialised \
X(); \
Py_INCREF(Py_None); \
return Py_None; }
Py_RETURN_NONE; }
#ifdef __cplusplus
}
...
...
Modules/_ctypes/cfield.c
Dosyayı görüntüle @
d1302c01
...
...
@@ -498,7 +498,7 @@ get_ulonglong(PyObject *v, unsigned long long *p)
#ifdef _CTYPES_DEBUG_KEEP
#define _RET(x) Py_INCREF(x); return x
#else
#define _RET(X) Py_
INCREF(Py_None); return Py_None
#define _RET(X) Py_
RETURN_NONE
#endif
/*****************************************************************
...
...
Modules/_json.c
Dosyayı görüntüle @
d1302c01
...
...
@@ -1108,17 +1108,15 @@ scan_once_unicode(PyScannerObject *s, PyObject *pystr, Py_ssize_t idx, Py_ssize_
case
'n'
:
/* null */
if
((
idx
+
3
<
length
)
&&
PyUnicode_READ
(
kind
,
str
,
idx
+
1
)
==
'u'
&&
PyUnicode_READ
(
kind
,
str
,
idx
+
2
)
==
'l'
&&
PyUnicode_READ
(
kind
,
str
,
idx
+
3
)
==
'l'
)
{
Py_INCREF
(
Py_None
);
*
next_idx_ptr
=
idx
+
4
;
return
Py_None
;
Py_RETURN_NONE
;
}
break
;
case
't'
:
/* true */
if
((
idx
+
3
<
length
)
&&
PyUnicode_READ
(
kind
,
str
,
idx
+
1
)
==
'r'
&&
PyUnicode_READ
(
kind
,
str
,
idx
+
2
)
==
'u'
&&
PyUnicode_READ
(
kind
,
str
,
idx
+
3
)
==
'e'
)
{
Py_INCREF
(
Py_True
);
*
next_idx_ptr
=
idx
+
4
;
return
Py_True
;
Py_RETURN_TRUE
;
}
break
;
case
'f'
:
...
...
@@ -1127,9 +1125,8 @@ scan_once_unicode(PyScannerObject *s, PyObject *pystr, Py_ssize_t idx, Py_ssize_
PyUnicode_READ
(
kind
,
str
,
idx
+
2
)
==
'l'
&&
PyUnicode_READ
(
kind
,
str
,
idx
+
3
)
==
's'
&&
PyUnicode_READ
(
kind
,
str
,
idx
+
4
)
==
'e'
)
{
Py_INCREF
(
Py_False
);
*
next_idx_ptr
=
idx
+
5
;
return
Py_False
;
Py_RETURN_FALSE
;
}
break
;
case
'N'
:
...
...
Modules/_testcapimodule.c
Dosyayı görüntüle @
d1302c01
...
...
@@ -117,8 +117,7 @@ test_sizeof_c_types(PyObject *self)
CHECK_SIZEOF
(
intptr_t
,
sizeof
(
void
*
));
CHECK_SIGNNESS
(
intptr_t
,
1
);
Py_INCREF
(
Py_None
);
return
Py_None
;
Py_RETURN_NONE
;
#undef IS_SIGNED
#undef CHECK_SIGNESS
...
...
Objects/stringlib/unicode_format.h
Dosyayı görüntüle @
d1302c01
...
...
@@ -60,10 +60,8 @@ SubString_init(SubString *str, PyObject *s, Py_ssize_t start, Py_ssize_t end)
Py_LOCAL_INLINE
(
PyObject
*
)
SubString_new_object
(
SubString
*
str
)
{
if
(
str
->
str
==
NULL
)
{
Py_INCREF
(
Py_None
);
return
Py_None
;
}
if
(
str
->
str
==
NULL
)
Py_RETURN_NONE
;
return
PyUnicode_Substring
(
str
->
str
,
str
->
start
,
str
->
end
);
}
...
...
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