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
60a1e7fc
Kaydet (Commit)
60a1e7fc
authored
Ara 01, 2000
tarafından
Guido van Rossum
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
Clarified some of the error messages, esp. "read-only character
buffer" replaced by "string or read-only character buffer".
üst
9940b800
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
16 additions
and
17 deletions
+16
-17
getargs.c
Python/getargs.c
+16
-17
No files found.
Python/getargs.c
Dosyayı görüntüle @
60a1e7fc
...
...
@@ -565,7 +565,7 @@ convertsimple1(PyObject *arg, char **p_format, va_list *p_va)
arg
=
_PyUnicode_AsDefaultEncodedString
(
arg
,
NULL
);
if
(
arg
==
NULL
)
return
"
unicode conversion error
"
;
return
"
(unicode conversion error)
"
;
*
p
=
PyString_AS_STRING
(
arg
);
*
q
=
PyString_GET_SIZE
(
arg
);
}
...
...
@@ -575,9 +575,9 @@ convertsimple1(PyObject *arg, char **p_format, va_list *p_va)
if
(
pb
==
NULL
||
pb
->
bf_getreadbuffer
==
NULL
||
pb
->
bf_getsegcount
==
NULL
)
return
"read-only buffer"
;
return
"
string or
read-only buffer"
;
if
(
(
*
pb
->
bf_getsegcount
)(
arg
,
NULL
)
!=
1
)
return
"single-segment read-only buffer"
;
return
"s
tring or s
ingle-segment read-only buffer"
;
if
(
(
count
=
(
*
pb
->
bf_getreadbuffer
)(
arg
,
0
,
p
))
<
0
)
return
"(unspecified)"
;
...
...
@@ -593,7 +593,7 @@ convertsimple1(PyObject *arg, char **p_format, va_list *p_va)
arg
=
_PyUnicode_AsDefaultEncodedString
(
arg
,
NULL
);
if
(
arg
==
NULL
)
return
"
unicode conversion error
"
;
return
"
(unicode conversion error)
"
;
*
p
=
PyString_AS_STRING
(
arg
);
}
else
...
...
@@ -622,7 +622,7 @@ convertsimple1(PyObject *arg, char **p_format, va_list *p_va)
arg
=
_PyUnicode_AsDefaultEncodedString
(
arg
,
NULL
);
if
(
arg
==
NULL
)
return
"
unicode conversion error
"
;
return
"
(unicode conversion error)
"
;
*
p
=
PyString_AS_STRING
(
arg
);
*
q
=
PyString_GET_SIZE
(
arg
);
}
...
...
@@ -632,9 +632,9 @@ convertsimple1(PyObject *arg, char **p_format, va_list *p_va)
if
(
pb
==
NULL
||
pb
->
bf_getreadbuffer
==
NULL
||
pb
->
bf_getsegcount
==
NULL
)
return
"read-only buffer"
;
return
"
string or
read-only buffer"
;
if
(
(
*
pb
->
bf_getsegcount
)(
arg
,
NULL
)
!=
1
)
return
"single-segment read-only buffer"
;
return
"s
tring or s
ingle-segment read-only buffer"
;
if
(
(
count
=
(
*
pb
->
bf_getreadbuffer
)(
arg
,
0
,
p
))
<
0
)
return
"(unspecified)"
;
...
...
@@ -652,11 +652,11 @@ convertsimple1(PyObject *arg, char **p_format, va_list *p_va)
arg
=
_PyUnicode_AsDefaultEncodedString
(
arg
,
NULL
);
if
(
arg
==
NULL
)
return
"
unicode conversion error
"
;
return
"
(unicode conversion error)
"
;
*
p
=
PyString_AS_STRING
(
arg
);
}
else
return
"
None or string
"
;
return
"
string or None
"
;
if
(
*
format
==
'#'
)
{
int
*
q
=
va_arg
(
*
p_va
,
int
*
);
if
(
arg
==
Py_None
)
...
...
@@ -667,7 +667,7 @@ convertsimple1(PyObject *arg, char **p_format, va_list *p_va)
}
else
if
(
*
p
!=
NULL
&&
(
int
)
strlen
(
*
p
)
!=
PyString_Size
(
arg
))
return
"
None or string without null bytes
"
;
return
"
string without null bytes or None
"
;
}
break
;
}
...
...
@@ -695,7 +695,7 @@ convertsimple1(PyObject *arg, char **p_format, va_list *p_va)
/* Convert object to Unicode */
u
=
PyUnicode_FromObject
(
arg
);
if
(
u
==
NULL
)
return
"string
,
unicode or text buffer"
;
return
"string
or
unicode or text buffer"
;
/* Encode object; use default error handling */
s
=
PyUnicode_AsEncodedString
(
u
,
...
...
@@ -773,8 +773,7 @@ convertsimple1(PyObject *arg, char **p_format, va_list *p_va)
*/
if
((
int
)
strlen
(
PyString_AS_STRING
(
s
))
!=
size
)
return
"(encoded string without "
\
"NULL bytes)"
;
return
"(encoded string without NULL bytes)"
;
*
buffer
=
PyMem_NEW
(
char
,
size
+
1
);
if
(
*
buffer
==
NULL
)
{
Py_DECREF
(
s
);
...
...
@@ -799,9 +798,9 @@ convertsimple1(PyObject *arg, char **p_format, va_list *p_va)
if
(
pb
==
NULL
||
pb
->
bf_getreadbuffer
==
NULL
||
pb
->
bf_getsegcount
==
NULL
)
return
"read-only buffer"
;
return
"
unicode or
read-only buffer"
;
if
(
(
*
pb
->
bf_getsegcount
)(
arg
,
NULL
)
!=
1
)
return
"single-segment read-only buffer"
;
return
"
unicode or
single-segment read-only buffer"
;
if
(
(
count
=
(
*
pb
->
bf_getreadbuffer
)(
arg
,
0
,
p
))
<
0
)
return
"(unspecified)"
;
...
...
@@ -916,9 +915,9 @@ convertsimple1(PyObject *arg, char **p_format, va_list *p_va)
pb
==
NULL
||
pb
->
bf_getcharbuffer
==
NULL
||
pb
->
bf_getsegcount
==
NULL
)
return
"read-only character buffer"
;
return
"
string or
read-only character buffer"
;
if
(
(
*
pb
->
bf_getsegcount
)(
arg
,
NULL
)
!=
1
)
return
"single-segment read-only buffer"
;
return
"s
tring or s
ingle-segment read-only buffer"
;
if
(
(
count
=
pb
->
bf_getcharbuffer
(
arg
,
0
,
p
))
<
0
)
return
"(unspecified)"
;
...
...
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