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
a9c895d4
Kaydet (Commit)
a9c895d4
authored
Şub 14, 2012
tarafından
Victor Stinner
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
PyUnicode_DecodeLocale() second argument is now a char*, no more an int
üst
dba5317e
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
10 deletions
+10
-10
_localemodule.c
Modules/_localemodule.c
+10
-10
No files found.
Modules/_localemodule.c
Dosyayı görüntüle @
a9c895d4
...
@@ -112,7 +112,7 @@ PyLocale_setlocale(PyObject* self, PyObject* args)
...
@@ -112,7 +112,7 @@ PyLocale_setlocale(PyObject* self, PyObject* args)
PyErr_SetString
(
Error
,
"unsupported locale setting"
);
PyErr_SetString
(
Error
,
"unsupported locale setting"
);
return
NULL
;
return
NULL
;
}
}
result_object
=
PyUnicode_DecodeLocale
(
result
,
0
);
result_object
=
PyUnicode_DecodeLocale
(
result
,
NULL
);
if
(
!
result_object
)
if
(
!
result_object
)
return
NULL
;
return
NULL
;
}
else
{
}
else
{
...
@@ -122,7 +122,7 @@ PyLocale_setlocale(PyObject* self, PyObject* args)
...
@@ -122,7 +122,7 @@ PyLocale_setlocale(PyObject* self, PyObject* args)
PyErr_SetString
(
Error
,
"locale query failed"
);
PyErr_SetString
(
Error
,
"locale query failed"
);
return
NULL
;
return
NULL
;
}
}
result_object
=
PyUnicode_DecodeLocale
(
result
,
0
);
result_object
=
PyUnicode_DecodeLocale
(
result
,
NULL
);
}
}
return
result_object
;
return
result_object
;
}
}
...
@@ -148,7 +148,7 @@ PyLocale_localeconv(PyObject* self)
...
@@ -148,7 +148,7 @@ PyLocale_localeconv(PyObject* self)
involved herein */
involved herein */
#define RESULT_STRING(s)\
#define RESULT_STRING(s)\
x = PyUnicode_DecodeLocale(l->s,
0
); \
x = PyUnicode_DecodeLocale(l->s,
NULL
); \
if (!x) goto failed;\
if (!x) goto failed;\
PyDict_SetItemString(result, #s, x);\
PyDict_SetItemString(result, #s, x);\
Py_XDECREF(x)
Py_XDECREF(x)
...
@@ -439,7 +439,7 @@ PyLocale_nl_langinfo(PyObject* self, PyObject* args)
...
@@ -439,7 +439,7 @@ PyLocale_nl_langinfo(PyObject* self, PyObject* args)
instead of an empty string for nl_langinfo(ERA). */
instead of an empty string for nl_langinfo(ERA). */
const
char
*
result
=
nl_langinfo
(
item
);
const
char
*
result
=
nl_langinfo
(
item
);
result
=
result
!=
NULL
?
result
:
""
;
result
=
result
!=
NULL
?
result
:
""
;
return
PyUnicode_DecodeLocale
(
result
,
0
);
return
PyUnicode_DecodeLocale
(
result
,
NULL
);
}
}
PyErr_SetString
(
PyExc_ValueError
,
"unsupported langinfo constant"
);
PyErr_SetString
(
PyExc_ValueError
,
"unsupported langinfo constant"
);
return
NULL
;
return
NULL
;
...
@@ -458,7 +458,7 @@ PyIntl_gettext(PyObject* self, PyObject *args)
...
@@ -458,7 +458,7 @@ PyIntl_gettext(PyObject* self, PyObject *args)
char
*
in
;
char
*
in
;
if
(
!
PyArg_ParseTuple
(
args
,
"s"
,
&
in
))
if
(
!
PyArg_ParseTuple
(
args
,
"s"
,
&
in
))
return
0
;
return
0
;
return
PyUnicode_DecodeLocale
(
gettext
(
in
),
0
);
return
PyUnicode_DecodeLocale
(
gettext
(
in
),
NULL
);
}
}
PyDoc_STRVAR
(
dgettext__doc__
,
PyDoc_STRVAR
(
dgettext__doc__
,
...
@@ -471,7 +471,7 @@ PyIntl_dgettext(PyObject* self, PyObject *args)
...
@@ -471,7 +471,7 @@ PyIntl_dgettext(PyObject* self, PyObject *args)
char
*
domain
,
*
in
;
char
*
domain
,
*
in
;
if
(
!
PyArg_ParseTuple
(
args
,
"zs"
,
&
domain
,
&
in
))
if
(
!
PyArg_ParseTuple
(
args
,
"zs"
,
&
domain
,
&
in
))
return
0
;
return
0
;
return
PyUnicode_DecodeLocale
(
dgettext
(
domain
,
in
),
0
);
return
PyUnicode_DecodeLocale
(
dgettext
(
domain
,
in
),
NULL
);
}
}
PyDoc_STRVAR
(
dcgettext__doc__
,
PyDoc_STRVAR
(
dcgettext__doc__
,
...
@@ -485,7 +485,7 @@ PyIntl_dcgettext(PyObject *self, PyObject *args)
...
@@ -485,7 +485,7 @@ PyIntl_dcgettext(PyObject *self, PyObject *args)
int
category
;
int
category
;
if
(
!
PyArg_ParseTuple
(
args
,
"zsi"
,
&
domain
,
&
msgid
,
&
category
))
if
(
!
PyArg_ParseTuple
(
args
,
"zsi"
,
&
domain
,
&
msgid
,
&
category
))
return
0
;
return
0
;
return
PyUnicode_DecodeLocale
(
dcgettext
(
domain
,
msgid
,
category
),
0
);
return
PyUnicode_DecodeLocale
(
dcgettext
(
domain
,
msgid
,
category
),
NULL
);
}
}
PyDoc_STRVAR
(
textdomain__doc__
,
PyDoc_STRVAR
(
textdomain__doc__
,
...
@@ -503,7 +503,7 @@ PyIntl_textdomain(PyObject* self, PyObject* args)
...
@@ -503,7 +503,7 @@ PyIntl_textdomain(PyObject* self, PyObject* args)
PyErr_SetFromErrno
(
PyExc_OSError
);
PyErr_SetFromErrno
(
PyExc_OSError
);
return
NULL
;
return
NULL
;
}
}
return
PyUnicode_DecodeLocale
(
domain
,
0
);
return
PyUnicode_DecodeLocale
(
domain
,
NULL
);
}
}
PyDoc_STRVAR
(
bindtextdomain__doc__
,
PyDoc_STRVAR
(
bindtextdomain__doc__
,
...
@@ -535,7 +535,7 @@ PyIntl_bindtextdomain(PyObject* self,PyObject*args)
...
@@ -535,7 +535,7 @@ PyIntl_bindtextdomain(PyObject* self,PyObject*args)
PyErr_SetFromErrno
(
PyExc_OSError
);
PyErr_SetFromErrno
(
PyExc_OSError
);
return
NULL
;
return
NULL
;
}
}
result
=
PyUnicode_DecodeLocale
(
current_dirname
,
0
);
result
=
PyUnicode_DecodeLocale
(
current_dirname
,
NULL
);
Py_XDECREF
(
dirname_bytes
);
Py_XDECREF
(
dirname_bytes
);
return
result
;
return
result
;
}
}
...
@@ -553,7 +553,7 @@ PyIntl_bind_textdomain_codeset(PyObject* self,PyObject*args)
...
@@ -553,7 +553,7 @@ PyIntl_bind_textdomain_codeset(PyObject* self,PyObject*args)
return
NULL
;
return
NULL
;
codeset
=
bind_textdomain_codeset
(
domain
,
codeset
);
codeset
=
bind_textdomain_codeset
(
domain
,
codeset
);
if
(
codeset
)
if
(
codeset
)
return
PyUnicode_DecodeLocale
(
codeset
,
0
);
return
PyUnicode_DecodeLocale
(
codeset
,
NULL
);
Py_RETURN_NONE
;
Py_RETURN_NONE
;
}
}
#endif
#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