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
12a6d942
Kaydet (Commit)
12a6d942
authored
Mar 22, 2002
tarafından
Neil Schemenauer
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
Undo last commit. It's causing the tests to file.
üst
c155dd4c
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
0 additions
and
28 deletions
+0
-28
fileobject.c
Objects/fileobject.c
+0
-28
No files found.
Objects/fileobject.c
Dosyayı görüntüle @
12a6d942
...
@@ -56,32 +56,6 @@ PyFile_Name(PyObject *f)
...
@@ -56,32 +56,6 @@ PyFile_Name(PyObject *f)
return
((
PyFileObject
*
)
f
)
->
f_name
;
return
((
PyFileObject
*
)
f
)
->
f_name
;
}
}
/* On Unix, fopen will succeed for directories.
In Python, there should be no file objects referring to
directories, so we need a check. */
static
PyFileObject
*
dircheck
(
PyFileObject
*
f
)
{
#if defined(HAVE_FSTAT) && defined(S_IFDIR) && defined(EISDIR)
struct
stat
buf
;
if
(
f
->
f_fp
==
NULL
)
return
f
;
if
(
fstat
(
fileno
(
f
->
f_fp
),
&
buf
)
==
0
&&
S_ISDIR
(
buf
.
st_mode
))
{
#ifdef HAVE_STRERROR
char
*
msg
=
strerror
(
EISDIR
);
#else
char
*
msg
=
"Is a directory"
;
#endif
PyObject
*
exc
=
PyObject_CallFunction
(
PyExc_IOError
,
"(is)"
,
EISDIR
,
msg
);
PyErr_SetObject
(
PyExc_IOError
,
exc
);
return
NULL
;
}
#endif
return
f
;
}
static
PyObject
*
static
PyObject
*
fill_file_fields
(
PyFileObject
*
f
,
FILE
*
fp
,
char
*
name
,
char
*
mode
,
fill_file_fields
(
PyFileObject
*
f
,
FILE
*
fp
,
char
*
name
,
char
*
mode
,
...
@@ -103,7 +77,6 @@ fill_file_fields(PyFileObject *f, FILE *fp, char *name, char *mode,
...
@@ -103,7 +77,6 @@ fill_file_fields(PyFileObject *f, FILE *fp, char *name, char *mode,
if
(
f
->
f_name
==
NULL
||
f
->
f_mode
==
NULL
)
if
(
f
->
f_name
==
NULL
||
f
->
f_mode
==
NULL
)
return
NULL
;
return
NULL
;
f
->
f_fp
=
fp
;
f
->
f_fp
=
fp
;
f
=
dircheck
(
f
);
return
(
PyObject
*
)
f
;
return
(
PyObject
*
)
f
;
}
}
...
@@ -157,7 +130,6 @@ open_the_file(PyFileObject *f, char *name, char *mode)
...
@@ -157,7 +130,6 @@ open_the_file(PyFileObject *f, char *name, char *mode)
PyErr_SetFromErrnoWithFilename
(
PyExc_IOError
,
name
);
PyErr_SetFromErrnoWithFilename
(
PyExc_IOError
,
name
);
f
=
NULL
;
f
=
NULL
;
}
}
f
=
dircheck
(
f
);
return
(
PyObject
*
)
f
;
return
(
PyObject
*
)
f
;
}
}
...
...
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