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
e20aef57
Kaydet (Commit)
e20aef57
authored
Agu 26, 1997
tarafından
Guido van Rossum
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
Ignore whitespace between formats (not internal to a count+format).
üst
ab0abdce
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
13 additions
and
0 deletions
+13
-0
libstruct.tex
Doc/lib/libstruct.tex
+3
-0
libstruct.tex
Doc/libstruct.tex
+3
-0
structmodule.c
Modules/structmodule.c
+7
-0
No files found.
Doc/lib/libstruct.tex
Dosyayı görüntüle @
e20aef57
...
...
@@ -61,6 +61,9 @@ and Python values should be obvious given their types:
A format character may be preceded by an integral repeat count; e.g.
\
the format string
\code
{
'4h'
}
means exactly the same as
\code
{
'hhhh'
}
.
Whitespace characters between formats are ignored; a count and its
format must not contain whitespace though.
For the
\code
{
's'
}
format character, the count is interpreted as the
size of the string, not a repeat count like for the other format
characters; e.g.
\code
{
'10s'
}
means a single 10-byte string, while
...
...
Doc/libstruct.tex
Dosyayı görüntüle @
e20aef57
...
...
@@ -61,6 +61,9 @@ and Python values should be obvious given their types:
A format character may be preceded by an integral repeat count; e.g.
\
the format string
\code
{
'4h'
}
means exactly the same as
\code
{
'hhhh'
}
.
Whitespace characters between formats are ignored; a count and its
format must not contain whitespace though.
For the
\code
{
's'
}
format character, the count is interpreted as the
size of the string, not a repeat count like for the other format
characters; e.g.
\code
{
'10s'
}
means a single 10-byte string, while
...
...
Modules/structmodule.c
Dosyayı görüntüle @
e20aef57
...
...
@@ -38,6 +38,7 @@ PERFORMANCE OF THIS SOFTWARE.
#include "mymath.h"
#include <limits.h>
#include <ctype.h>
/* Exception */
...
...
@@ -981,6 +982,8 @@ calcsize(fmt, f)
s
=
fmt
;
size
=
0
;
while
((
c
=
*
s
++
)
!=
'\0'
)
{
if
(
isspace
(
c
))
continue
;
if
(
'0'
<=
c
&&
c
<=
'9'
)
{
num
=
c
-
'0'
;
while
(
'0'
<=
(
c
=
*
s
++
)
&&
c
<=
'9'
)
{
...
...
@@ -1075,6 +1078,8 @@ struct_pack(self, args)
res
=
restart
=
PyString_AsString
(
result
);
while
((
c
=
*
s
++
)
!=
'\0'
)
{
if
(
isspace
(
c
))
continue
;
if
(
'0'
<=
c
&&
c
<=
'9'
)
{
num
=
c
-
'0'
;
while
(
'0'
<=
(
c
=
*
s
++
)
&&
c
<=
'9'
)
...
...
@@ -1179,6 +1184,8 @@ struct_unpack(self, args)
str
=
start
;
s
=
fmt
;
while
((
c
=
*
s
++
)
!=
'\0'
)
{
if
(
isspace
(
c
))
continue
;
if
(
'0'
<=
c
&&
c
<=
'9'
)
{
num
=
c
-
'0'
;
while
(
'0'
<=
(
c
=
*
s
++
)
&&
c
<=
'9'
)
...
...
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