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
24729f36
Kaydet (Commit)
24729f36
authored
Kas 10, 2011
tarafından
Victor Stinner
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
Prefer Py_UCS4 or wchar_t over Py_UNICODE
üst
ebf3ba80
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
8 deletions
+7
-8
unicodeobject.c
Objects/unicodeobject.c
+7
-8
No files found.
Objects/unicodeobject.c
Dosyayı görüntüle @
24729f36
...
...
@@ -3844,7 +3844,7 @@ PyUnicode_DecodeUTF7Stateful(const char *s,
Py_ssize_t shiftOutStart;
unsigned int base64bits = 0;
unsigned long base64buffer = 0;
Py_U
NICODE
surrogate = 0;
Py_U
CS4
surrogate = 0;
PyObject *errorHandler = NULL;
PyObject *exc = NULL;
...
...
@@ -3873,8 +3873,7 @@ PyUnicode_DecodeUTF7Stateful(const char *s,
s++;
if (base64bits >= 16) {
/* we have enough bits for a UTF-16 value */
Py_UNICODE outCh = (Py_UNICODE)
(base64buffer >> (base64bits-16));
Py_UCS4 outCh = (Py_UCS4)(base64buffer >> (base64bits-16));
base64bits -= 16;
base64buffer &= (1 << base64bits) - 1; /* clear high bits */
if (surrogate) {
...
...
@@ -5232,7 +5231,7 @@ PyUnicode_DecodeUTF16Stateful(const char *s,
stream as-is (giving a ZWNBSP character). */
if (bo == 0) {
if (size >= 2) {
const Py_U
NICODE
bom = (q[ihi] << 8) | q[ilo];
const Py_U
CS4
bom = (q[ihi] << 8) | q[ilo];
#ifdef BYTEORDER_IS_LITTLE_ENDIAN
if (bom == 0xFEFF) {
q += 2;
...
...
@@ -5273,7 +5272,7 @@ PyUnicode_DecodeUTF16Stateful(const char *s,
aligned_end = (const unsigned char *) ((size_t) e & ~LONG_PTR_MASK);
while (q < e) {
Py_U
NICODE
ch;
Py_U
CS4
ch;
/* First check for possible aligned read of a C 'long'. Unaligned
reads are more expensive, better to defer to another iteration. */
if (!((size_t) q & LONG_PTR_MASK)) {
...
...
@@ -5663,7 +5662,7 @@ PyUnicode_DecodeUnicodeEscape(const char *s,
while (s < end) {
unsigned char c;
Py_U
NICODE
x;
Py_U
CS4
x;
int digits;
/* The only case in which i == ascii_length is a backslash
...
...
@@ -6863,7 +6862,7 @@ decode_code_page_strict(UINT code_page,
int insize)
{
const DWORD flags = decode_code_page_flags(code_page);
Py_UNICODE
*out;
wchar_t
*out;
DWORD outsize;
/* First get the size of the result */
...
...
@@ -7177,7 +7176,7 @@ encode_code_page_strict(UINT code_page, PyObject **outbytes,
BOOL *pusedDefaultChar = &usedDefaultChar;
int outsize;
PyObject *exc = NULL;
Py_UNICODE
*p;
wchar_t
*p;
Py_ssize_t size;
const DWORD flags = encode_code_page_flags(code_page, NULL);
char *out;
...
...
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