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
015f4d87
Kaydet (Commit)
015f4d87
authored
Eki 07, 2010
tarafından
Victor Stinner
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
_Py_wrealpath() requires the size of the output buffer
üst
a4a75951
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
6 additions
and
4 deletions
+6
-4
fileutils.h
Include/fileutils.h
+2
-1
fileutils.c
Python/fileutils.c
+3
-2
sysmodule.c
Python/sysmodule.c
+1
-1
No files found.
Include/fileutils.h
Dosyayı görüntüle @
015f4d87
...
...
@@ -41,7 +41,8 @@ PyAPI_FUNC(int) _Py_wreadlink(
#ifdef HAVE_REALPATH
PyAPI_FUNC
(
wchar_t
*
)
_Py_wrealpath
(
const
wchar_t
*
path
,
wchar_t
*
resolved_path
);
wchar_t
*
resolved_path
,
size_t
resolved_path_size
);
#endif
PyAPI_FUNC
(
wchar_t
*
)
_Py_wgetcwd
(
...
...
Python/fileutils.c
Dosyayı görüntüle @
015f4d87
...
...
@@ -321,7 +321,8 @@ _Py_wreadlink(const wchar_t *path, wchar_t *buf, size_t bufsiz)
#ifdef HAVE_REALPATH
wchar_t
*
_Py_wrealpath
(
const
wchar_t
*
path
,
wchar_t
*
resolved_path
)
_Py_wrealpath
(
const
wchar_t
*
path
,
wchar_t
*
resolved_path
,
size_t
resolved_path_size
)
{
char
*
cpath
;
char
cresolved_path
[
PATH_MAX
];
...
...
@@ -336,7 +337,7 @@ _Py_wrealpath(const wchar_t *path, wchar_t *resolved_path)
PyMem_Free
(
cpath
);
if
(
res
==
NULL
)
return
NULL
;
r
=
mbstowcs
(
resolved_path
,
cresolved_path
,
PATH_MAX
);
r
=
mbstowcs
(
resolved_path
,
cresolved_path
,
resolved_path_size
);
if
(
r
==
(
size_t
)
-
1
||
r
>=
PATH_MAX
)
{
errno
=
EINVAL
;
return
NULL
;
...
...
Python/sysmodule.c
Dosyayı görüntüle @
015f4d87
...
...
@@ -1742,7 +1742,7 @@ sys_update_path(int argc, wchar_t **argv)
#else
/* All other filename syntaxes */
if
(
_HAVE_SCRIPT_ARGUMENT
(
argc
,
argv
))
{
#if defined(HAVE_REALPATH)
if
(
_Py_wrealpath
(
argv0
,
fullpath
))
{
if
(
_Py_wrealpath
(
argv0
,
fullpath
,
PATH_MAX
))
{
argv0
=
fullpath
;
}
#endif
...
...
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