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
6673decf
Kaydet (Commit)
6673decf
authored
Şub 25, 2019
tarafından
Zackery Spytz
Kaydeden (comit)
Steve Dower
Şub 25, 2019
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
bpo-24643: Fix "#define timezone _timezone" clashes on Windows (GH-12019)
üst
aadef2b4
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
16 additions
and
12 deletions
+16
-12
2019-02-24-07-52-39.bpo-24643.PofyiS.rst
...S.d/next/Windows/2019-02-24-07-52-39.bpo-24643.PofyiS.rst
+1
-0
timemodule.c
Modules/timemodule.c
+15
-5
pyconfig.h
PC/pyconfig.h
+0
-7
No files found.
Misc/NEWS.d/next/Windows/2019-02-24-07-52-39.bpo-24643.PofyiS.rst
0 → 100644
Dosyayı görüntüle @
6673decf
Fix name collisions due to ``#define timezone _timezone`` in PC/pyconfig.h.
Modules/timemodule.c
Dosyayı görüntüle @
6673decf
...
...
@@ -38,6 +38,16 @@
# include <sanitizer/msan_interface.h>
#endif
#ifdef _MSC_VER
#define _Py_timezone _timezone
#define _Py_daylight _daylight
#define _Py_tzname _tzname
#else
#define _Py_timezone timezone
#define _Py_daylight daylight
#define _Py_tzname tzname
#endif
#define SEC_TO_NS (1000 * 1000 * 1000)
/* Forward declarations */
...
...
@@ -1600,18 +1610,18 @@ init_timezone(PyObject *m)
#ifdef HAVE_DECL_TZNAME
PyObject
*
otz0
,
*
otz1
;
tzset
();
PyModule_AddIntConstant
(
m
,
"timezone"
,
timezone
);
PyModule_AddIntConstant
(
m
,
"timezone"
,
_Py_
timezone
);
#ifdef HAVE_ALTZONE
PyModule_AddIntConstant
(
m
,
"altzone"
,
altzone
);
#else
PyModule_AddIntConstant
(
m
,
"altzone"
,
timezone
-
3600
);
PyModule_AddIntConstant
(
m
,
"altzone"
,
_Py_
timezone
-
3600
);
#endif
PyModule_AddIntConstant
(
m
,
"daylight"
,
daylight
);
otz0
=
PyUnicode_DecodeLocale
(
tzname
[
0
],
"surrogateescape"
);
PyModule_AddIntConstant
(
m
,
"daylight"
,
_Py_
daylight
);
otz0
=
PyUnicode_DecodeLocale
(
_Py_
tzname
[
0
],
"surrogateescape"
);
if
(
otz0
==
NULL
)
{
return
-
1
;
}
otz1
=
PyUnicode_DecodeLocale
(
tzname
[
1
],
"surrogateescape"
);
otz1
=
PyUnicode_DecodeLocale
(
_Py_
tzname
[
1
],
"surrogateescape"
);
if
(
otz1
==
NULL
)
{
Py_DECREF
(
otz0
);
return
-
1
;
...
...
PC/pyconfig.h
Dosyayı görüntüle @
6673decf
...
...
@@ -192,13 +192,6 @@ typedef int pid_t;
#define Py_IS_FINITE(X) _finite(X)
#define copysign _copysign
/* VS 2015 defines these names with a leading underscore */
#if _MSC_VER >= 1900
#define timezone _timezone
#define daylight _daylight
#define tzname _tzname
#endif
/* Side by Side assemblies supported in VS 2005 and VS 2008 but not 2010*/
#if _MSC_VER >= 1400 && _MSC_VER < 1600
#define HAVE_SXS 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