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
b399ab2c
Kaydet (Commit)
b399ab2c
authored
May 04, 2012
tarafından
Benjamin Peterson
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
clean up converted path on error
üst
3e2e368f
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
20 additions
and
11 deletions
+20
-11
posixmodule.c
Modules/posixmodule.c
+20
-11
No files found.
Modules/posixmodule.c
Dosyayı görüntüle @
b399ab2c
...
@@ -3695,7 +3695,7 @@ utime_read_time_arguments(utime_arguments *ua)
...
@@ -3695,7 +3695,7 @@ utime_read_time_arguments(utime_arguments *ua)
"%s: you may specify either 'times'"
"%s: you may specify either 'times'"
" or 'ns' but not both",
" or 'ns' but not both",
ua->function_name);
ua->function_name);
return 0
;
goto fail
;
}
}
if (times && (times != Py_None)) {
if (times && (times != Py_None)) {
...
@@ -3704,13 +3704,15 @@ utime_read_time_arguments(utime_arguments *ua)
...
@@ -3704,13 +3704,15 @@ utime_read_time_arguments(utime_arguments *ua)
"%s: 'time' must be either"
"%s: 'time' must be either"
" a valid tuple of two ints or None",
" a valid tuple of two ints or None",
ua->function_name);
ua->function_name);
return 0
;
goto fail
;
}
}
ua->now = 0;
ua->now = 0;
return (_PyTime_ObjectToTimespec(PyTuple_GET_ITEM(times, 0),
if (_PyTime_ObjectToTimespec(PyTuple_GET_ITEM(times, 0),
&(ua->atime_s), &(ua->atime_ns)) != -1)
&ua->atime_s, &ua->atime_ns) == -1 ||
&& (_PyTime_ObjectToTimespec(PyTuple_GET_ITEM(times, 1),
_PyTime_ObjectToTimespec(PyTuple_GET_ITEM(times, 1),
&(ua->mtime_s), &(ua->mtime_ns)) != -1);
&ua->mtime_s, &ua->mtime_ns) == -1)
goto fail;
return 1;
}
}
if (ns) {
if (ns) {
...
@@ -3718,18 +3720,25 @@ utime_read_time_arguments(utime_arguments *ua)
...
@@ -3718,18 +3720,25 @@ utime_read_time_arguments(utime_arguments *ua)
PyErr_Format(PyExc_TypeError,
PyErr_Format(PyExc_TypeError,
"%s: 'ns' must be a valid tuple of two ints",
"%s: 'ns' must be a valid tuple of two ints",
ua->function_name);
ua->function_name);
return 0
;
goto fail
;
}
}
ua->now = 0;
ua->now = 0;
return (split_py_long_to_s_and_ns(PyTuple_GET_ITEM(ns, 0),
if (!split_py_long_to_s_and_ns(PyTuple_GET_ITEM(ns, 0),
&(ua->atime_s), &(ua->atime_ns)))
&ua->atime_s, &ua->atime_ns) ||
&& (split_py_long_to_s_and_ns(PyTuple_GET_ITEM(ns, 1),
!split_py_long_to_s_and_ns(PyTuple_GET_ITEM(ns, 1),
&(ua->mtime_s), &(ua->mtime_ns)));
&ua->mtime_s, &ua->mtime_ns))
goto fail;
return 1;
}
}
/* either times=None, or neither times nor ns was specified. use "now". */
/* either times=None, or neither times nor ns was specified. use "now". */
ua->now = 1;
ua->now = 1;
return 1;
return 1;
fail:
if (ua->converter)
Py_DECREF(ua->path);
return 0;
}
}
...
...
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