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
a4b8d1de
Kaydet (Commit)
a4b8d1de
authored
Agu 27, 2007
tarafından
Guido van Rossum
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
Some changes in preparation of stricter rules about mixing str and bytes.
üst
ddd25825
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
14 additions
and
9 deletions
+14
-9
bltinmodule.c
Python/bltinmodule.c
+5
-7
import.c
Python/import.c
+9
-2
No files found.
Python/bltinmodule.c
Dosyayı görüntüle @
a4b8d1de
...
@@ -403,18 +403,16 @@ source_as_string(PyObject *cmd)
...
@@ -403,18 +403,16 @@ source_as_string(PyObject *cmd)
char
*
str
;
char
*
str
;
Py_ssize_t
size
;
Py_ssize_t
size
;
if
(
!
PyObject_CheckReadBuffer
(
cmd
)
&&
!
PyUnicode_Check
(
cmd
))
{
PyErr_SetString
(
PyExc_TypeError
,
"eval()/exec() arg 1 must be a string, bytes or code object"
);
return
NULL
;
}
if
(
PyUnicode_Check
(
cmd
))
{
if
(
PyUnicode_Check
(
cmd
))
{
cmd
=
_PyUnicode_AsDefaultEncodedString
(
cmd
,
NULL
);
cmd
=
_PyUnicode_AsDefaultEncodedString
(
cmd
,
NULL
);
if
(
cmd
==
NULL
)
if
(
cmd
==
NULL
)
return
NULL
;
return
NULL
;
}
}
else
if
(
!
PyObject_CheckReadBuffer
(
cmd
))
{
PyErr_SetString
(
PyExc_TypeError
,
"eval()/exec() arg 1 must be a string, bytes or code object"
);
return
NULL
;
}
if
(
PyObject_AsReadBuffer
(
cmd
,
(
const
void
**
)
&
str
,
&
size
)
<
0
)
{
if
(
PyObject_AsReadBuffer
(
cmd
,
(
const
void
**
)
&
str
,
&
size
)
<
0
)
{
return
NULL
;
return
NULL
;
}
}
...
...
Python/import.c
Dosyayı görüntüle @
a4b8d1de
...
@@ -1247,8 +1247,15 @@ find_module(char *fullname, char *subname, PyObject *path, char *buf,
...
@@ -1247,8 +1247,15 @@ find_module(char *fullname, char *subname, PyObject *path, char *buf,
Py_ssize_t
size
;
Py_ssize_t
size
;
if
(
!
v
)
if
(
!
v
)
return
NULL
;
return
NULL
;
if
(
PyObject_AsCharBuffer
(
v
,
&
base
,
&
size
)
<
0
)
if
(
PyUnicode_Check
(
v
))
{
return
NULL
;
v
=
_PyUnicode_AsDefaultEncodedString
(
v
,
NULL
);
if
(
v
==
NULL
)
return
NULL
;
}
if
(
!
PyString_Check
(
v
))
continue
;
base
=
PyString_AS_STRING
(
v
);
size
=
PyString_GET_SIZE
(
v
);
len
=
size
;
len
=
size
;
if
(
len
+
2
+
namelen
+
MAXSUFFIXSIZE
>=
buflen
)
{
if
(
len
+
2
+
namelen
+
MAXSUFFIXSIZE
>=
buflen
)
{
continue
;
/* Too long */
continue
;
/* Too long */
...
...
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