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
5263c138
Kaydet (Commit)
5263c138
authored
Nis 21, 2013
tarafından
Ezio Melotti
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Sade Fark
Merge removal of trailing whitespace from 3.3.
üst
38bae2d7
6b02772c
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
7 deletions
+7
-7
transmogrify.h
Objects/stringlib/transmogrify.h
+7
-7
No files found.
Objects/stringlib/transmogrify.h
Dosyayı görüntüle @
5263c138
...
...
@@ -18,10 +18,10 @@ stringlib_expandtabs(PyObject *self, PyObject *args)
size_t
i
,
j
;
PyObject
*
u
;
int
tabsize
=
8
;
if
(
!
PyArg_ParseTuple
(
args
,
"|i:expandtabs"
,
&
tabsize
))
return
NULL
;
/* First pass: determine size of output string */
i
=
j
=
0
;
e
=
STRINGLIB_STR
(
self
)
+
STRINGLIB_LEN
(
self
);
...
...
@@ -48,20 +48,20 @@ stringlib_expandtabs(PyObject *self, PyObject *args)
}
}
}
if
((
i
+
j
)
>
PY_SSIZE_T_MAX
)
{
PyErr_SetString
(
PyExc_OverflowError
,
"result is too long"
);
return
NULL
;
}
/* Second pass: create output string and fill it */
u
=
STRINGLIB_NEW
(
NULL
,
i
+
j
);
if
(
!
u
)
return
NULL
;
j
=
0
;
q
=
STRINGLIB_STR
(
u
);
for
(
p
=
STRINGLIB_STR
(
self
);
p
<
e
;
p
++
)
if
(
*
p
==
'\t'
)
{
if
(
tabsize
>
0
)
{
...
...
@@ -77,7 +77,7 @@ stringlib_expandtabs(PyObject *self, PyObject *args)
if
(
*
p
==
'\n'
||
*
p
==
'\r'
)
j
=
0
;
}
return
u
;
}
...
...
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