@@ -153,7 +153,7 @@ get_ulong(PyObject *v, unsigned long *p)
153153 return -1 ;
154154 assert (PyLong_Check (v ));
155155 x = PyLong_AsUnsignedLong (v );
156- Py_DECREF (v );
156+ Py_DECREF (v );
157157 if (x == (unsigned long )-1 && PyErr_Occurred ()) {
158158 if (PyErr_ExceptionMatches (PyExc_OverflowError ))
159159 PyErr_SetString (StructError ,
@@ -178,7 +178,7 @@ get_longlong(PyObject *v, PY_LONG_LONG *p)
178178 return -1 ;
179179 assert (PyLong_Check (v ));
180180 x = PyLong_AsLongLong (v );
181- Py_DECREF (v );
181+ Py_DECREF (v );
182182 if (x == (PY_LONG_LONG )- 1 && PyErr_Occurred ()) {
183183 if (PyErr_ExceptionMatches (PyExc_OverflowError ))
184184 PyErr_SetString (StructError ,
@@ -201,7 +201,7 @@ get_ulonglong(PyObject *v, unsigned PY_LONG_LONG *p)
201201 return -1 ;
202202 assert (PyLong_Check (v ));
203203 x = PyLong_AsUnsignedLongLong (v );
204- Py_DECREF (v );
204+ Py_DECREF (v );
205205 if (x == (unsigned PY_LONG_LONG )-1 && PyErr_Occurred ()) {
206206 if (PyErr_ExceptionMatches (PyExc_OverflowError ))
207207 PyErr_SetString (StructError ,
@@ -222,7 +222,7 @@ get_ulonglong(PyObject *v, unsigned PY_LONG_LONG *p)
222222
223223static PyObject *
224224unpack_float (const char * p , /* start of 4-byte string */
225- int le ) /* true for little-endian, false for big-endian */
225+ int le ) /* true for little-endian, false for big-endian */
226226{
227227 double x ;
228228
@@ -234,7 +234,7 @@ unpack_float(const char *p, /* start of 4-byte string */
234234
235235static PyObject *
236236unpack_double (const char * p , /* start of 8-byte string */
237- int le ) /* true for little-endian, false for big-endian */
237+ int le ) /* true for little-endian, false for big-endian */
238238{
239239 double x ;
240240
@@ -591,7 +591,7 @@ np_ulonglong(char *p, PyObject *v, const formatdef *f)
591591static int
592592np_bool (char * p , PyObject * v , const formatdef * f )
593593{
594- BOOL_TYPE y ;
594+ BOOL_TYPE y ;
595595 y = PyObject_IsTrue (v );
596596 memcpy (p , (char * )& y , sizeof y );
597597 return 0 ;
@@ -812,7 +812,7 @@ bp_longlong(char *p, PyObject *v, const formatdef *f)
812812 if (v == NULL )
813813 return -1 ;
814814 res = _PyLong_AsByteArray ((PyLongObject * )v ,
815- (unsigned char * )p ,
815+ (unsigned char * )p ,
816816 8 ,
817817 0 , /* little_endian */
818818 1 /* signed */ );
@@ -828,7 +828,7 @@ bp_ulonglong(char *p, PyObject *v, const formatdef *f)
828828 if (v == NULL )
829829 return -1 ;
830830 res = _PyLong_AsByteArray ((PyLongObject * )v ,
831- (unsigned char * )p ,
831+ (unsigned char * )p ,
832832 8 ,
833833 0 , /* little_endian */
834834 0 /* signed */ );
@@ -863,7 +863,7 @@ bp_double(char *p, PyObject *v, const formatdef *f)
863863static int
864864bp_bool (char * p , PyObject * v , const formatdef * f )
865865{
866- char y ;
866+ char y ;
867867 y = PyObject_IsTrue (v );
868868 memcpy (p , (char * )& y , sizeof y );
869869 return 0 ;
@@ -1030,7 +1030,7 @@ lp_longlong(char *p, PyObject *v, const formatdef *f)
10301030 if (v == NULL )
10311031 return -1 ;
10321032 res = _PyLong_AsByteArray ((PyLongObject * )v ,
1033- (unsigned char * )p ,
1033+ (unsigned char * )p ,
10341034 8 ,
10351035 1 , /* little_endian */
10361036 1 /* signed */ );
@@ -1046,7 +1046,7 @@ lp_ulonglong(char *p, PyObject *v, const formatdef *f)
10461046 if (v == NULL )
10471047 return -1 ;
10481048 res = _PyLong_AsByteArray ((PyLongObject * )v ,
1049- (unsigned char * )p ,
1049+ (unsigned char * )p ,
10501050 8 ,
10511051 1 , /* little_endian */
10521052 0 /* signed */ );
@@ -1407,7 +1407,7 @@ s_unpack(PyObject *self, PyObject *input)
14071407 PyErr_Format (StructError ,
14081408 "unpack requires a bytes argument of length %zd" ,
14091409 soself -> s_size );
1410- PyBuffer_Release (& vbuf );
1410+ PyBuffer_Release (& vbuf );
14111411 return NULL ;
14121412 }
14131413 result = s_unpack_internal (soself , vbuf .buf );
@@ -1449,7 +1449,7 @@ s_unpack_from(PyObject *self, PyObject *args, PyObject *kwds)
14491449 PyErr_Format (StructError ,
14501450 "unpack_from requires a buffer of at least %zd bytes" ,
14511451 soself -> s_size );
1452- PyBuffer_Release (& vbuf );
1452+ PyBuffer_Release (& vbuf );
14531453 return NULL ;
14541454 }
14551455 result = s_unpack_internal (soself , (char * )vbuf .buf + offset );
@@ -1782,7 +1782,7 @@ calcsize(PyObject *self, PyObject *fmt)
17821782 return NULL ;
17831783 n = ((PyStructObject * )s_object )-> s_size ;
17841784 Py_DECREF (s_object );
1785- return PyLong_FromSsize_t (n );
1785+ return PyLong_FromSsize_t (n );
17861786}
17871787
17881788PyDoc_STRVAR (pack_doc ,
@@ -1808,7 +1808,7 @@ pack(PyObject *self, PyObject *args)
18081808 Py_DECREF (newargs );
18091809 return NULL ;
18101810 }
1811- result = s_pack (s_object , newargs );
1811+ result = s_pack (s_object , newargs );
18121812 Py_DECREF (newargs );
18131813 Py_DECREF (s_object );
18141814 return result ;
@@ -1838,7 +1838,7 @@ pack_into(PyObject *self, PyObject *args)
18381838 Py_DECREF (newargs );
18391839 return NULL ;
18401840 }
1841- result = s_pack_into (s_object , newargs );
1841+ result = s_pack_into (s_object , newargs );
18421842 Py_DECREF (newargs );
18431843 Py_DECREF (s_object );
18441844 return result ;
@@ -1859,7 +1859,7 @@ unpack(PyObject *self, PyObject *args)
18591859 s_object = cache_struct (fmt );
18601860 if (s_object == NULL )
18611861 return NULL ;
1862- result = s_unpack (s_object , inputstr );
1862+ result = s_unpack (s_object , inputstr );
18631863 Py_DECREF (s_object );
18641864 return result ;
18651865}
@@ -1888,20 +1888,20 @@ unpack_from(PyObject *self, PyObject *args, PyObject *kwds)
18881888 Py_DECREF (newargs );
18891889 return NULL ;
18901890 }
1891- result = s_unpack_from (s_object , newargs , kwds );
1891+ result = s_unpack_from (s_object , newargs , kwds );
18921892 Py_DECREF (newargs );
18931893 Py_DECREF (s_object );
18941894 return result ;
18951895}
18961896
18971897static struct PyMethodDef module_functions [] = {
1898- {"_clearcache" , (PyCFunction )clearcache , METH_NOARGS , clearcache_doc },
1899- {"calcsize" , calcsize , METH_O , calcsize_doc },
1900- {"pack" , pack , METH_VARARGS , pack_doc },
1901- {"pack_into" , pack_into , METH_VARARGS , pack_into_doc },
1902- {"unpack" , unpack , METH_VARARGS , unpack_doc },
1903- {"unpack_from" , (PyCFunction )unpack_from ,
1904- METH_VARARGS |METH_KEYWORDS , unpack_from_doc },
1898+ {"_clearcache" , (PyCFunction )clearcache , METH_NOARGS , clearcache_doc },
1899+ {"calcsize" , calcsize , METH_O , calcsize_doc },
1900+ {"pack" , pack , METH_VARARGS , pack_doc },
1901+ {"pack_into" , pack_into , METH_VARARGS , pack_into_doc },
1902+ {"unpack" , unpack , METH_VARARGS , unpack_doc },
1903+ {"unpack_from" , (PyCFunction )unpack_from ,
1904+ METH_VARARGS |METH_KEYWORDS , unpack_from_doc },
19051905 {NULL , NULL } /* sentinel */
19061906};
19071907
0 commit comments