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
25095b2b
Kaydet (Commit)
25095b2b
authored
May 26, 2011
tarafından
Victor Stinner
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
Remove useless assignments
Warnings found by the the Clang Static Analyzer.
üst
58bc7a13
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
4 additions
and
9 deletions
+4
-9
faulthandler.c
Modules/faulthandler.c
+4
-5
import.c
Python/import.c
+0
-4
No files found.
Modules/faulthandler.c
Dosyayı görüntüle @
25095b2b
...
@@ -1005,9 +1005,10 @@ static int
...
@@ -1005,9 +1005,10 @@ static int
faulthandler_env_options
(
void
)
faulthandler_env_options
(
void
)
{
{
PyObject
*
xoptions
,
*
key
,
*
module
,
*
res
;
PyObject
*
xoptions
,
*
key
,
*
module
,
*
res
;
int
enable
;
if
(
!
Py_GETENV
(
"PYTHONFAULTHANDLER"
))
{
if
(
!
Py_GETENV
(
"PYTHONFAULTHANDLER"
))
{
int
has_key
;
xoptions
=
PySys_GetXOptions
();
xoptions
=
PySys_GetXOptions
();
if
(
xoptions
==
NULL
)
if
(
xoptions
==
NULL
)
return
-
1
;
return
-
1
;
...
@@ -1016,13 +1017,11 @@ faulthandler_env_options(void)
...
@@ -1016,13 +1017,11 @@ faulthandler_env_options(void)
if
(
key
==
NULL
)
if
(
key
==
NULL
)
return
-
1
;
return
-
1
;
enable
=
PyDict_Contains
(
xoptions
,
key
);
has_key
=
PyDict_Contains
(
xoptions
,
key
);
Py_DECREF
(
key
);
Py_DECREF
(
key
);
if
(
!
enable
)
if
(
!
has_key
)
return
0
;
return
0
;
}
}
else
enable
=
1
;
module
=
PyImport_ImportModule
(
"faulthandler"
);
module
=
PyImport_ImportModule
(
"faulthandler"
);
if
(
module
==
NULL
)
{
if
(
module
==
NULL
)
{
...
...
Python/import.c
Dosyayı görüntüle @
25095b2b
...
@@ -1733,7 +1733,6 @@ find_module_path(PyObject *fullname, PyObject *name, PyObject *path,
...
@@ -1733,7 +1733,6 @@ find_module_path(PyObject *fullname, PyObject *name, PyObject *path,
Py_UNICODE
buf
[
MAXPATHLEN
+
1
];
Py_UNICODE
buf
[
MAXPATHLEN
+
1
];
Py_ssize_t
buflen
=
MAXPATHLEN
+
1
;
Py_ssize_t
buflen
=
MAXPATHLEN
+
1
;
PyObject
*
path_unicode
,
*
filename
;
PyObject
*
path_unicode
,
*
filename
;
const
Py_UNICODE
*
base
;
Py_ssize_t
len
;
Py_ssize_t
len
;
struct
stat
statbuf
;
struct
stat
statbuf
;
static
struct
filedescr
fd_package
=
{
""
,
""
,
PKG_DIRECTORY
};
static
struct
filedescr
fd_package
=
{
""
,
""
,
PKG_DIRECTORY
};
...
@@ -1751,7 +1750,6 @@ find_module_path(PyObject *fullname, PyObject *name, PyObject *path,
...
@@ -1751,7 +1750,6 @@ find_module_path(PyObject *fullname, PyObject *name, PyObject *path,
else
else
return
0
;
return
0
;
base
=
PyUnicode_AS_UNICODE
(
path_unicode
);
len
=
PyUnicode_GET_SIZE
(
path_unicode
);
len
=
PyUnicode_GET_SIZE
(
path_unicode
);
if
(
len
+
2
+
PyUnicode_GET_SIZE
(
name
)
+
MAXSUFFIXSIZE
>=
buflen
)
{
if
(
len
+
2
+
PyUnicode_GET_SIZE
(
name
)
+
MAXSUFFIXSIZE
>=
buflen
)
{
Py_DECREF
(
path_unicode
);
Py_DECREF
(
path_unicode
);
...
@@ -2275,12 +2273,10 @@ case_ok(PyObject *filename, Py_ssize_t prefix_delta, PyObject *name)
...
@@ -2275,12 +2273,10 @@ case_ok(PyObject *filename, Py_ssize_t prefix_delta, PyObject *name)
static
int
static
int
find_init_module
(
PyObject
*
directory
)
find_init_module
(
PyObject
*
directory
)
{
{
size_t
len
;
struct
stat
statbuf
;
struct
stat
statbuf
;
PyObject
*
filename
;
PyObject
*
filename
;
int
match
;
int
match
;
len
=
PyUnicode_GET_SIZE
(
directory
);
filename
=
PyUnicode_FromFormat
(
"%U%c__init__.py"
,
directory
,
SEP
);
filename
=
PyUnicode_FromFormat
(
"%U%c__init__.py"
,
directory
,
SEP
);
if
(
filename
==
NULL
)
if
(
filename
==
NULL
)
return
-
1
;
return
-
1
;
...
...
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