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
4f185228
Kaydet (Commit)
4f185228
authored
Nis 04, 2010
tarafından
Mark Dickinson
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
A handful of whitespace fixes in Modules/_struct.c.
üst
a551f31d
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
20 additions
and
20 deletions
+20
-20
_struct.c
Modules/_struct.c
+20
-20
No files found.
Modules/_struct.c
Dosyayı görüntüle @
4f185228
...
...
@@ -273,7 +273,7 @@ get_ulonglong(PyObject *v, unsigned PY_LONG_LONG *p)
static
PyObject
*
unpack_float
(
const
char
*
p
,
/* start of 4-byte string */
int
le
)
/* true for little-endian, false for big-endian */
int
le
)
/* true for little-endian, false for big-endian */
{
double
x
;
...
...
@@ -285,7 +285,7 @@ unpack_float(const char *p, /* start of 4-byte string */
static
PyObject
*
unpack_double
(
const
char
*
p
,
/* start of 8-byte string */
int
le
)
/* true for little-endian, false for big-endian */
int
le
)
/* true for little-endian, false for big-endian */
{
double
x
;
...
...
@@ -636,7 +636,7 @@ np_ulonglong(char *p, PyObject *v, const formatdef *f)
static
int
np_bool
(
char
*
p
,
PyObject
*
v
,
const
formatdef
*
f
)
{
BOOL_TYPE
y
;
BOOL_TYPE
y
;
y
=
PyObject_IsTrue
(
v
);
memcpy
(
p
,
(
char
*
)
&
y
,
sizeof
y
);
return
0
;
...
...
@@ -857,7 +857,7 @@ bp_longlong(char *p, PyObject *v, const formatdef *f)
if
(
v
==
NULL
)
return
-
1
;
res
=
_PyLong_AsByteArray
((
PyLongObject
*
)
v
,
(
unsigned
char
*
)
p
,
(
unsigned
char
*
)
p
,
8
,
0
,
/* little_endian */
1
/* signed */
);
...
...
@@ -873,7 +873,7 @@ bp_ulonglong(char *p, PyObject *v, const formatdef *f)
if
(
v
==
NULL
)
return
-
1
;
res
=
_PyLong_AsByteArray
((
PyLongObject
*
)
v
,
(
unsigned
char
*
)
p
,
(
unsigned
char
*
)
p
,
8
,
0
,
/* little_endian */
0
/* signed */
);
...
...
@@ -908,7 +908,7 @@ bp_double(char *p, PyObject *v, const formatdef *f)
static
int
bp_bool
(
char
*
p
,
PyObject
*
v
,
const
formatdef
*
f
)
{
char
y
;
char
y
;
y
=
PyObject_IsTrue
(
v
);
memcpy
(
p
,
(
char
*
)
&
y
,
sizeof
y
);
return
0
;
...
...
@@ -1075,7 +1075,7 @@ lp_longlong(char *p, PyObject *v, const formatdef *f)
if
(
v
==
NULL
)
return
-
1
;
res
=
_PyLong_AsByteArray
((
PyLongObject
*
)
v
,
(
unsigned
char
*
)
p
,
(
unsigned
char
*
)
p
,
8
,
1
,
/* little_endian */
1
/* signed */
);
...
...
@@ -1091,7 +1091,7 @@ lp_ulonglong(char *p, PyObject *v, const formatdef *f)
if
(
v
==
NULL
)
return
-
1
;
res
=
_PyLong_AsByteArray
((
PyLongObject
*
)
v
,
(
unsigned
char
*
)
p
,
(
unsigned
char
*
)
p
,
8
,
1
,
/* little_endian */
0
/* signed */
);
...
...
@@ -1797,7 +1797,7 @@ calcsize(PyObject *self, PyObject *fmt)
return
NULL
;
n
=
((
PyStructObject
*
)
s_object
)
->
s_size
;
Py_DECREF
(
s_object
);
return
PyInt_FromSsize_t
(
n
);
return
PyInt_FromSsize_t
(
n
);
}
PyDoc_STRVAR
(
pack_doc
,
...
...
@@ -1823,7 +1823,7 @@ pack(PyObject *self, PyObject *args)
Py_DECREF
(
newargs
);
return
NULL
;
}
result
=
s_pack
(
s_object
,
newargs
);
result
=
s_pack
(
s_object
,
newargs
);
Py_DECREF
(
newargs
);
Py_DECREF
(
s_object
);
return
result
;
...
...
@@ -1853,7 +1853,7 @@ pack_into(PyObject *self, PyObject *args)
Py_DECREF
(
newargs
);
return
NULL
;
}
result
=
s_pack_into
(
s_object
,
newargs
);
result
=
s_pack_into
(
s_object
,
newargs
);
Py_DECREF
(
newargs
);
Py_DECREF
(
s_object
);
return
result
;
...
...
@@ -1874,7 +1874,7 @@ unpack(PyObject *self, PyObject *args)
s_object
=
cache_struct
(
fmt
);
if
(
s_object
==
NULL
)
return
NULL
;
result
=
s_unpack
(
s_object
,
inputstr
);
result
=
s_unpack
(
s_object
,
inputstr
);
Py_DECREF
(
s_object
);
return
result
;
}
...
...
@@ -1903,20 +1903,20 @@ unpack_from(PyObject *self, PyObject *args, PyObject *kwds)
Py_DECREF
(
newargs
);
return
NULL
;
}
result
=
s_unpack_from
(
s_object
,
newargs
,
kwds
);
result
=
s_unpack_from
(
s_object
,
newargs
,
kwds
);
Py_DECREF
(
newargs
);
Py_DECREF
(
s_object
);
return
result
;
}
static
struct
PyMethodDef
module_functions
[]
=
{
{
"_clearcache"
,
(
PyCFunction
)
clearcache
,
METH_NOARGS
,
clearcache_doc
},
{
"calcsize"
,
calcsize
,
METH_O
,
calcsize_doc
},
{
"pack"
,
pack
,
METH_VARARGS
,
pack_doc
},
{
"pack_into"
,
pack_into
,
METH_VARARGS
,
pack_into_doc
},
{
"unpack"
,
unpack
,
METH_VARARGS
,
unpack_doc
},
{
"unpack_from"
,
(
PyCFunction
)
unpack_from
,
METH_VARARGS
|
METH_KEYWORDS
,
unpack_from_doc
},
{
"_clearcache"
,
(
PyCFunction
)
clearcache
,
METH_NOARGS
,
clearcache_doc
},
{
"calcsize"
,
calcsize
,
METH_O
,
calcsize_doc
},
{
"pack"
,
pack
,
METH_VARARGS
,
pack_doc
},
{
"pack_into"
,
pack_into
,
METH_VARARGS
,
pack_into_doc
},
{
"unpack"
,
unpack
,
METH_VARARGS
,
unpack_doc
},
{
"unpack_from"
,
(
PyCFunction
)
unpack_from
,
METH_VARARGS
|
METH_KEYWORDS
,
unpack_from_doc
},
{
NULL
,
NULL
}
/* sentinel */
};
...
...
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