@@ -4575,26 +4575,25 @@ _pickle_Pickler_dump(PicklerObject *self, PyObject *obj)
4575
4575
4576
4576
/*[clinic input]
4577
4577
4578
- _pickle.Pickler.__sizeof__ -> Py_ssize_t
4578
+ _pickle.Pickler.__sizeof__ -> size_t
4579
4579
4580
4580
Returns size in memory, in bytes.
4581
4581
[clinic start generated code]*/
4582
4582
4583
- static Py_ssize_t
4583
+ static size_t
4584
4584
_pickle_Pickler___sizeof___impl (PicklerObject * self )
4585
- /*[clinic end generated code: output=106edb3123f332e1 input=8cbbec9bd5540d42 ]*/
4585
+ /*[clinic end generated code: output=23ad75658d3b59ff input=d8127c8e7012ebd7 ]*/
4586
4586
{
4587
- Py_ssize_t res , s ;
4588
-
4589
- res = _PyObject_SIZE (Py_TYPE (self ));
4587
+ size_t res = _PyObject_SIZE (Py_TYPE (self ));
4590
4588
if (self -> memo != NULL ) {
4591
4589
res += sizeof (PyMemoTable );
4592
4590
res += self -> memo -> mt_allocated * sizeof (PyMemoEntry );
4593
4591
}
4594
4592
if (self -> output_buffer != NULL ) {
4595
- s = _PySys_GetSizeOf (self -> output_buffer );
4596
- if (s == -1 )
4593
+ size_t s = _PySys_GetSizeOf (self -> output_buffer );
4594
+ if (s == ( size_t ) -1 ) {
4597
4595
return -1 ;
4596
+ }
4598
4597
res += s ;
4599
4598
}
4600
4599
return res ;
@@ -7079,22 +7078,20 @@ _pickle_Unpickler_find_class_impl(UnpicklerObject *self,
7079
7078
7080
7079
/*[clinic input]
7081
7080
7082
- _pickle.Unpickler.__sizeof__ -> Py_ssize_t
7081
+ _pickle.Unpickler.__sizeof__ -> size_t
7083
7082
7084
7083
Returns size in memory, in bytes.
7085
7084
[clinic start generated code]*/
7086
7085
7087
- static Py_ssize_t
7086
+ static size_t
7088
7087
_pickle_Unpickler___sizeof___impl (UnpicklerObject * self )
7089
- /*[clinic end generated code: output=119d9d03ad4c7651 input=13333471fdeedf5e ]*/
7088
+ /*[clinic end generated code: output=4648d84c228196df input=27180b2b6b524012 ]*/
7090
7089
{
7091
- Py_ssize_t res ;
7092
-
7093
- res = _PyObject_SIZE (Py_TYPE (self ));
7090
+ size_t res = _PyObject_SIZE (Py_TYPE (self ));
7094
7091
if (self -> memo != NULL )
7095
7092
res += self -> memo_size * sizeof (PyObject * );
7096
7093
if (self -> marks != NULL )
7097
- res += self -> marks_size * sizeof (Py_ssize_t );
7094
+ res += ( size_t ) self -> marks_size * sizeof (Py_ssize_t );
7098
7095
if (self -> input_line != NULL )
7099
7096
res += strlen (self -> input_line ) + 1 ;
7100
7097
if (self -> encoding != NULL )
0 commit comments