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
a921fb0f
Kaydet (Commit)
a921fb0f
authored
Nis 03, 2009
tarafından
Benjamin Peterson
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
Py_BuildValue's 'c' code should use byte strings #5666
üst
a3b1ac8d
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
11 additions
and
7 deletions
+11
-7
arg.rst
Doc/c-api/arg.rst
+7
-3
_cursesmodule.c
Modules/_cursesmodule.c
+1
-1
arraymodule.c
Modules/arraymodule.c
+2
-2
modsupport.c
Python/modsupport.c
+1
-1
No files found.
Doc/c-api/arg.rst
Dosyayı görüntüle @
a921fb0f
...
...
@@ -212,7 +212,7 @@ variable(s) whose address should be passed.
:ctype:`char`.
``C`` (string of length 1) [int]
Covert a Python character, represented as a unicode string of length 1, to a
Co
n
vert a Python character, represented as a unicode string of length 1, to a
C :ctype:`int`.
``f`` (float) [float]
...
...
@@ -511,8 +511,12 @@ and the following format units are left untouched.
Convert a C :ctype:`Py_ssize_t` to a Python integer.
``c`` (string of length 1) [char]
Convert a C :ctype:`int` representing a character to a Python string of length
1.
Convert a C :ctype:`int` representing a byte to a Python byte string of
length 1.
``C`` (string of length 1) [int]
Convert a C :ctype:`int` representing a character to Python unicode
string of length 1.
``d`` (float) [double]
Convert a C :ctype:`double` to a Python floating point number.
...
...
Modules/_cursesmodule.c
Dosyayı görüntüle @
a921fb0f
...
...
@@ -890,7 +890,7 @@ PyCursesWindow_GetKey(PyCursesWindowObject *self, PyObject *args)
PyErr_SetString
(
PyCursesError
,
"no input"
);
return
NULL
;
}
else
if
(
rtn
<=
255
)
return
Py_BuildValue
(
"
c
"
,
rtn
);
return
Py_BuildValue
(
"
C
"
,
rtn
);
else
#if defined(__NetBSD__)
return
PyUnicode_FromString
(
unctrl
(
rtn
));
...
...
Modules/arraymodule.c
Dosyayı görüntüle @
a921fb0f
...
...
@@ -1141,14 +1141,14 @@ array_reduce(arrayobject *array)
>
PY_SSIZE_T_MAX
/
Py_SIZE
(
array
))
{
return
PyErr_NoMemory
();
}
result
=
Py_BuildValue
(
"O(
cy#)O"
,
result
=
Py_BuildValue
(
"O(
Cy#)O"
,
Py_TYPE
(
array
),
array
->
ob_descr
->
typecode
,
array
->
ob_item
,
Py_SIZE
(
array
)
*
array
->
ob_descr
->
itemsize
,
dict
);
}
else
{
result
=
Py_BuildValue
(
"O(
c)O"
,
result
=
Py_BuildValue
(
"O(
C)O"
,
Py_TYPE
(
array
),
array
->
ob_descr
->
typecode
,
dict
);
...
...
Python/modsupport.c
Dosyayı görüntüle @
a921fb0f
...
...
@@ -289,7 +289,7 @@ do_mkvalue(const char **p_format, va_list *p_va, int flags)
{
char
p
[
1
];
p
[
0
]
=
(
char
)
va_arg
(
*
p_va
,
int
);
return
Py
Unicode
_FromStringAndSize
(
p
,
1
);
return
Py
Bytes
_FromStringAndSize
(
p
,
1
);
}
case
'C'
:
{
...
...
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