Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
C
cpython
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
cpython
Commits
452728f8
Commit
452728f8
authored
Feb 16, 2006
by
Martin v. Löwis
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Use Py_ssize_t for counts and sizes.
parent
c1b0566f
Changes
12
Hide whitespace changes
Inline
Side-by-side
Showing
12 changed files
with
67 additions
and
66 deletions
+67
-66
Modules/_bisectmodule.c
Modules/_bisectmodule.c
+2
-2
Modules/_heapqmodule.c
Modules/_heapqmodule.c
+13
-11
Modules/arraymodule.c
Modules/arraymodule.c
+13
-16
Modules/cStringIO.c
Modules/cStringIO.c
+3
-3
Modules/collectionsmodule.c
Modules/collectionsmodule.c
+1
-1
Modules/itertoolsmodule.c
Modules/itertoolsmodule.c
+8
-8
Modules/mmapmodule.c
Modules/mmapmodule.c
+8
-8
Modules/operator.c
Modules/operator.c
+6
-6
Modules/parsermodule.c
Modules/parsermodule.c
+1
-1
Modules/stropmodule.c
Modules/stropmodule.c
+5
-4
Modules/structmodule.c
Modules/structmodule.c
+5
-4
Modules/zipimport.c
Modules/zipimport.c
+2
-2
No files found.
Modules/_bisectmodule.c
View file @
452728f8
...
...
@@ -6,10 +6,10 @@ Converted to C by Dmitry Vasiliev (dima at hlabs.spb.ru).
#include "Python.h"
static
int
internal_bisect_right
(
PyObject
*
list
,
PyObject
*
item
,
int
lo
,
in
t
hi
)
internal_bisect_right
(
PyObject
*
list
,
PyObject
*
item
,
Py_ssize_t
lo
,
Py_ssize_
t
hi
)
{
PyObject
*
litem
;
in
t
mid
,
res
;
Py_ssize_
t
mid
,
res
;
if
(
hi
==
-
1
)
{
hi
=
PySequence_Size
(
list
);
...
...
Modules/_heapqmodule.c
View file @
452728f8
...
...
@@ -9,10 +9,11 @@ annotated by Fran
#include "Python.h"
static
int
_siftdown
(
PyListObject
*
heap
,
int
startpos
,
in
t
pos
)
_siftdown
(
PyListObject
*
heap
,
Py_ssize_t
startpos
,
Py_ssize_
t
pos
)
{
PyObject
*
newitem
,
*
parent
;
int
cmp
,
parentpos
;
int
cmp
;
Py_ssize_t
parentpos
;
assert
(
PyList_Check
(
heap
));
if
(
pos
>=
PyList_GET_SIZE
(
heap
))
{
...
...
@@ -45,9 +46,9 @@ _siftdown(PyListObject *heap, int startpos, int pos)
}
static
int
_siftup
(
PyListObject
*
heap
,
in
t
pos
)
_siftup
(
PyListObject
*
heap
,
Py_ssize_
t
pos
)
{
in
t
startpos
,
endpos
,
childpos
,
rightpos
;
Py_ssize_
t
startpos
,
endpos
,
childpos
,
rightpos
;
int
cmp
;
PyObject
*
newitem
,
*
tmp
;
...
...
@@ -123,7 +124,7 @@ static PyObject *
heappop
(
PyObject
*
self
,
PyObject
*
heap
)
{
PyObject
*
lastelt
,
*
returnitem
;
in
t
n
;
Py_ssize_
t
n
;
if
(
!
PyList_Check
(
heap
))
{
PyErr_SetString
(
PyExc_TypeError
,
"heap argument must be a list"
);
...
...
@@ -197,7 +198,7 @@ this routine unless written as part of a conditional replacement:\n\n\
static
PyObject
*
heapify
(
PyObject
*
self
,
PyObject
*
heap
)
{
in
t
i
,
n
;
Py_ssize_
t
i
,
n
;
if
(
!
PyList_Check
(
heap
))
{
PyErr_SetString
(
PyExc_TypeError
,
"heap argument must be a list"
);
...
...
@@ -300,10 +301,11 @@ PyDoc_STRVAR(nlargest_doc,
Equivalent to: sorted(iterable, reverse=True)[:n]
\n
"
);
static
int
_siftdownmax
(
PyListObject
*
heap
,
int
startpos
,
in
t
pos
)
_siftdownmax
(
PyListObject
*
heap
,
Py_ssize_t
startpos
,
Py_ssize_
t
pos
)
{
PyObject
*
newitem
,
*
parent
;
int
cmp
,
parentpos
;
int
cmp
;
Py_ssize_t
parentpos
;
assert
(
PyList_Check
(
heap
));
if
(
pos
>=
PyList_GET_SIZE
(
heap
))
{
...
...
@@ -336,9 +338,9 @@ _siftdownmax(PyListObject *heap, int startpos, int pos)
}
static
int
_siftupmax
(
PyListObject
*
heap
,
in
t
pos
)
_siftupmax
(
PyListObject
*
heap
,
Py_ssize_
t
pos
)
{
in
t
startpos
,
endpos
,
childpos
,
rightpos
;
Py_ssize_
t
startpos
,
endpos
,
childpos
,
rightpos
;
int
cmp
;
PyObject
*
newitem
,
*
tmp
;
...
...
@@ -389,7 +391,7 @@ static PyObject *
nsmallest
(
PyObject
*
self
,
PyObject
*
args
)
{
PyObject
*
heap
=
NULL
,
*
elem
,
*
iterable
,
*
los
,
*
it
,
*
oldelem
;
in
t
i
,
n
;
Py_ssize_
t
i
,
n
;
if
(
!
PyArg_ParseTuple
(
args
,
"iO:nsmallest"
,
&
n
,
&
iterable
))
return
NULL
;
...
...
Modules/arraymodule.c
View file @
452728f8
...
...
@@ -688,11 +688,11 @@ array_repeat(arrayobject *a, Py_ssize_t n)
}
static
int
array_ass_slice
(
arrayobject
*
a
,
int
ilow
,
in
t
ihigh
,
PyObject
*
v
)
array_ass_slice
(
arrayobject
*
a
,
Py_ssize_t
ilow
,
Py_ssize_
t
ihigh
,
PyObject
*
v
)
{
char
*
item
;
in
t
n
;
/* Size of replacement array */
in
t
d
;
/* Change in size */
Py_ssize_
t
n
;
/* Size of replacement array */
Py_ssize_
t
d
;
/* Change in size */
#define b ((arrayobject *)v)
if
(
v
==
NULL
)
n
=
0
;
...
...
@@ -907,10 +907,7 @@ array_count(arrayobject *self, PyObject *v)
else
if
(
cmp
<
0
)
return
NULL
;
}
if
(
i
<
LONG_MAX
)
return
PyInt_FromLong
((
long
)
count
);
else
return
PyLong_FromLong
(
count
);
return
PyInt_FromSsize_t
(
count
);
}
PyDoc_STRVAR
(
count_doc
,
...
...
@@ -987,9 +984,9 @@ Remove the first occurence of x in the array.");
static
PyObject
*
array_pop
(
arrayobject
*
self
,
PyObject
*
args
)
{
in
t
i
=
-
1
;
Py_ssize_
t
i
=
-
1
;
PyObject
*
v
;
if
(
!
PyArg_ParseTuple
(
args
,
"|
i
:pop"
,
&
i
))
if
(
!
PyArg_ParseTuple
(
args
,
"|
n
:pop"
,
&
i
))
return
NULL
;
if
(
self
->
ob_size
==
0
)
{
/* Special-case most common failure cause */
...
...
@@ -1196,7 +1193,7 @@ static PyObject *
array_fromfile
(
arrayobject
*
self
,
PyObject
*
args
)
{
PyObject
*
f
;
in
t
n
;
Py_ssize_
t
n
;
FILE
*
fp
;
if
(
!
PyArg_ParseTuple
(
args
,
"Oi:fromfile"
,
&
f
,
&
n
))
return
NULL
;
...
...
@@ -1207,9 +1204,9 @@ array_fromfile(arrayobject *self, PyObject *args)
}
if
(
n
>
0
)
{
char
*
item
=
self
->
ob_item
;
in
t
itemsize
=
self
->
ob_descr
->
itemsize
;
Py_ssize_
t
itemsize
=
self
->
ob_descr
->
itemsize
;
size_t
nread
;
in
t
newlength
;
Py_ssize_
t
newlength
;
size_t
newbytes
;
/* Be careful here about overflow */
if
((
newlength
=
self
->
ob_size
+
n
)
<=
0
||
...
...
@@ -1577,13 +1574,13 @@ static PyObject*
array_subscr
(
arrayobject
*
self
,
PyObject
*
item
)
{
if
(
PyInt_Check
(
item
))
{
long
i
=
PyInt_AS_LONG
(
item
);
Py_ssize_t
i
=
PyInt_AS_LONG
(
item
);
if
(
i
<
0
)
i
+=
self
->
ob_size
;
return
array_item
(
self
,
i
);
}
else
if
(
PyLong_Check
(
item
))
{
long
i
=
PyLong_AsLong
(
item
);
Py_ssize_t
i
=
PyInt_AsSsize_t
(
item
);
if
(
i
==
-
1
&&
PyErr_Occurred
())
return
NULL
;
if
(
i
<
0
)
...
...
@@ -1631,13 +1628,13 @@ static int
array_ass_subscr
(
arrayobject
*
self
,
PyObject
*
item
,
PyObject
*
value
)
{
if
(
PyInt_Check
(
item
))
{
long
i
=
PyInt_AS_LONG
(
item
);
Py_ssize_t
i
=
PyInt_AS_LONG
(
item
);
if
(
i
<
0
)
i
+=
self
->
ob_size
;
return
array_ass_item
(
self
,
i
,
value
);
}
else
if
(
PyLong_Check
(
item
))
{
long
i
=
PyLong_AsLong
(
item
);
Py_ssize_t
i
=
PyInt_AsSsize_t
(
item
);
if
(
i
==
-
1
&&
PyErr_Occurred
())
return
-
1
;
if
(
i
<
0
)
...
...
Modules/cStringIO.c
View file @
452728f8
...
...
@@ -129,7 +129,7 @@ IO_cgetval(PyObject *self) {
static
PyObject
*
IO_getval
(
IOobject
*
self
,
PyObject
*
args
)
{
PyObject
*
use_pos
=
Py_None
;
in
t
s
;
Py_ssize_
t
s
;
UNLESS
(
IO__opencheck
(
self
))
return
NULL
;
UNLESS
(
PyArg_UnpackTuple
(
args
,
"getval"
,
0
,
1
,
&
use_pos
))
return
NULL
;
...
...
@@ -156,7 +156,7 @@ PyDoc_STRVAR(IO_read__doc__,
static
int
IO_cread
(
PyObject
*
self
,
char
**
output
,
Py_ssize_t
n
)
{
in
t
l
;
Py_ssize_
t
l
;
UNLESS
(
IO__opencheck
(
IOOOBJECT
(
self
)))
return
-
1
;
l
=
((
IOobject
*
)
self
)
->
string_size
-
((
IOobject
*
)
self
)
->
pos
;
...
...
@@ -279,7 +279,7 @@ IO_tell(IOobject *self, PyObject *unused) {
UNLESS
(
IO__opencheck
(
self
))
return
NULL
;
return
PyInt_From
Long
(
self
->
pos
);
return
PyInt_From
Ssize_t
(
self
->
pos
);
}
PyDoc_STRVAR
(
IO_truncate__doc__
,
...
...
Modules/collectionsmodule.c
View file @
452728f8
...
...
@@ -489,7 +489,7 @@ deque_ass_item(dequeobject *deque, Py_ssize_t i, PyObject *v)
{
PyObject
*
old_value
;
block
*
b
;
in
t
n
,
len
=
deque
->
len
,
halflen
=
(
len
+
1
)
>>
1
,
index
=
i
;
Py_ssize_
t
n
,
len
=
deque
->
len
,
halflen
=
(
len
+
1
)
>>
1
,
index
=
i
;
if
(
i
<
0
||
i
>=
len
)
{
PyErr_SetString
(
PyExc_IndexError
,
...
...
Modules/itertoolsmodule.c
View file @
452728f8
...
...
@@ -1054,7 +1054,7 @@ islice_new(PyTypeObject *type, PyObject *args, PyObject *kwds)
PyObject
*
seq
;
long
start
=
0
,
stop
=-
1
,
step
=
1
;
PyObject
*
it
,
*
a1
=
NULL
,
*
a2
=
NULL
,
*
a3
=
NULL
;
in
t
numargs
;
Py_ssize_
t
numargs
;
isliceobject
*
lz
;
if
(
!
_PyArg_NoKeywords
(
"islice()"
,
kwds
))
...
...
@@ -1378,7 +1378,7 @@ imap_new(PyTypeObject *type, PyObject *args, PyObject *kwds)
{
PyObject
*
it
,
*
iters
,
*
func
;
imapobject
*
lz
;
in
t
numargs
,
i
;
Py_ssize_
t
numargs
,
i
;
if
(
!
_PyArg_NoKeywords
(
"imap()"
,
kwds
))
return
NULL
;
...
...
@@ -1466,7 +1466,7 @@ imap_next(imapobject *lz)
PyObject
*
val
;
PyObject
*
argtuple
;
PyObject
*
result
;
in
t
numargs
,
i
;
Py_ssize_
t
numargs
,
i
;
numargs
=
PyTuple_Size
(
lz
->
iters
);
argtuple
=
PyTuple_New
(
numargs
);
...
...
@@ -1547,7 +1547,7 @@ static PyTypeObject imap_type = {
typedef
struct
{
PyObject_HEAD
long
tuplesize
;
Py_ssize_t
tuplesize
;
long
iternum
;
/* which iterator is active */
PyObject
*
ittuple
;
/* tuple of iterators */
}
chainobject
;
...
...
@@ -1558,7 +1558,7 @@ static PyObject *
chain_new
(
PyTypeObject
*
type
,
PyObject
*
args
,
PyObject
*
kwds
)
{
chainobject
*
lz
;
in
t
tuplesize
=
PySequence_Length
(
args
);
Py_ssize_
t
tuplesize
=
PySequence_Length
(
args
);
int
i
;
PyObject
*
ittuple
;
...
...
@@ -2074,7 +2074,7 @@ static PyTypeObject count_type = {
typedef
struct
{
PyObject_HEAD
long
tuplesize
;
Py_ssize_t
tuplesize
;
PyObject
*
ittuple
;
/* tuple of iterators */
PyObject
*
result
;
}
izipobject
;
...
...
@@ -2088,7 +2088,7 @@ izip_new(PyTypeObject *type, PyObject *args, PyObject *kwds)
int
i
;
PyObject
*
ittuple
;
/* tuple of iterators */
PyObject
*
result
;
in
t
tuplesize
=
PySequence_Length
(
args
);
Py_ssize_
t
tuplesize
=
PySequence_Length
(
args
);
if
(
!
_PyArg_NoKeywords
(
"izip()"
,
kwds
))
return
NULL
;
...
...
@@ -2160,7 +2160,7 @@ static PyObject *
izip_next
(
izipobject
*
lz
)
{
int
i
;
long
tuplesize
=
lz
->
tuplesize
;
Py_ssize_t
tuplesize
=
lz
->
tuplesize
;
PyObject
*
result
=
lz
->
result
;
PyObject
*
it
;
PyObject
*
item
;
...
...
Modules/mmapmodule.c
View file @
452728f8
...
...
@@ -220,11 +220,11 @@ static PyObject *
mmap_read_method
(
mmap_object
*
self
,
PyObject
*
args
)
{
long
num_bytes
;
Py_ssize_t
num_bytes
;
PyObject
*
result
;
CHECK_VALID
(
NULL
);
if
(
!
PyArg_ParseTuple
(
args
,
"
l
:read"
,
&
num_bytes
))
if
(
!
PyArg_ParseTuple
(
args
,
"
n
:read"
,
&
num_bytes
))
return
(
NULL
);
/* silently 'adjust' out-of-range requests */
...
...
@@ -240,7 +240,7 @@ static PyObject *
mmap_find_method
(
mmap_object
*
self
,
PyObject
*
args
)
{
long
start
=
self
->
pos
;
Py_ssize_t
start
=
self
->
pos
;
char
*
needle
;
int
len
;
...
...
@@ -468,10 +468,10 @@ mmap_tell_method(mmap_object *self, PyObject *args)
static
PyObject
*
mmap_flush_method
(
mmap_object
*
self
,
PyObject
*
args
)
{
unsigned
long
offset
=
0
;
unsigned
long
size
=
self
->
size
;
Py_ssize_t
offset
=
0
;
Py_ssize_t
size
=
self
->
size
;
CHECK_VALID
(
NULL
);
if
(
!
PyArg_ParseTuple
(
args
,
"|
kk
:flush"
,
&
offset
,
&
size
))
{
if
(
!
PyArg_ParseTuple
(
args
,
"|
nn
:flush"
,
&
offset
,
&
size
))
{
return
NULL
;
}
else
if
((
offset
+
size
)
>
self
->
size
)
{
PyErr_SetString
(
PyExc_ValueError
,
...
...
@@ -1092,8 +1092,8 @@ new_mmap_object(PyObject *self, PyObject *args, PyObject *kwdict)
m_obj
->
map_handle
=
CreateFileMapping
(
m_obj
->
file_handle
,
NULL
,
flProtect
,
0
,
m_obj
->
size
,
(
DWORD
)(
m_obj
->
size
>>
32
)
,
(
DWORD
)(
m_obj
->
size
&
0xFFFFFFFF
)
,
m_obj
->
tagname
);
if
(
m_obj
->
map_handle
!=
NULL
)
{
m_obj
->
data
=
(
char
*
)
MapViewOfFile
(
m_obj
->
map_handle
,
...
...
Modules/operator.c
View file @
452728f8
...
...
@@ -296,7 +296,7 @@ spam2(ge,__ge__, "ge(a, b) -- Same as a>=b.")
typedef
struct
{
PyObject_HEAD
in
t
nitems
;
Py_ssize_
t
nitems
;
PyObject
*
item
;
}
itemgetterobject
;
...
...
@@ -307,7 +307,7 @@ itemgetter_new(PyTypeObject *type, PyObject *args, PyObject *kwds)
{
itemgetterobject
*
ig
;
PyObject
*
item
;
in
t
nitems
;
Py_ssize_
t
nitems
;
if
(
!
_PyArg_NoKeywords
(
"itemgetter()"
,
kwds
))
return
NULL
;
...
...
@@ -352,7 +352,7 @@ static PyObject *
itemgetter_call
(
itemgetterobject
*
ig
,
PyObject
*
args
,
PyObject
*
kw
)
{
PyObject
*
obj
,
*
result
;
in
t
i
,
nitems
=
ig
->
nitems
;
Py_ssize_
t
i
,
nitems
=
ig
->
nitems
;
if
(
!
PyArg_UnpackTuple
(
args
,
"itemgetter"
,
1
,
1
,
&
obj
))
return
NULL
;
...
...
@@ -435,7 +435,7 @@ static PyTypeObject itemgetter_type = {
typedef
struct
{
PyObject_HEAD
in
t
nattrs
;
Py_ssize_
t
nattrs
;
PyObject
*
attr
;
}
attrgetterobject
;
...
...
@@ -446,7 +446,7 @@ attrgetter_new(PyTypeObject *type, PyObject *args, PyObject *kwds)
{
attrgetterobject
*
ag
;
PyObject
*
attr
;
in
t
nattrs
;
Py_ssize_
t
nattrs
;
if
(
!
_PyArg_NoKeywords
(
"attrgetter()"
,
kwds
))
return
NULL
;
...
...
@@ -491,7 +491,7 @@ static PyObject *
attrgetter_call
(
attrgetterobject
*
ag
,
PyObject
*
args
,
PyObject
*
kw
)
{
PyObject
*
obj
,
*
result
;
in
t
i
,
nattrs
=
ag
->
nattrs
;
Py_ssize_
t
i
,
nattrs
=
ag
->
nattrs
;
if
(
!
PyArg_UnpackTuple
(
args
,
"attrgetter"
,
1
,
1
,
&
obj
))
return
NULL
;
...
...
Modules/parsermodule.c
View file @
452728f8
...
...
@@ -782,7 +782,7 @@ build_node_tree(PyObject *tuple)
res
=
NULL
;
}
if
(
res
&&
encoding
)
{
in
t
len
;
Py_ssize_
t
len
;
len
=
PyString_GET_SIZE
(
encoding
)
+
1
;
res
->
n_str
=
(
char
*
)
PyMem_MALLOC
(
len
);
if
(
res
->
n_str
!=
NULL
)
...
...
Modules/stropmodule.c
View file @
452728f8
...
...
@@ -166,8 +166,8 @@ strop_joinfields(PyObject *self, PyObject *args)
{
PyObject
*
seq
;
char
*
sep
=
NULL
;
in
t
seqlen
,
seplen
=
0
;
in
t
i
,
reslen
=
0
,
slen
=
0
,
sz
=
100
;
Py_ssize_
t
seqlen
,
seplen
=
0
;
Py_ssize_
t
i
,
reslen
=
0
,
slen
=
0
,
sz
=
100
;
PyObject
*
res
=
NULL
;
char
*
p
=
NULL
;
ssizeargfunc
getitemfunc
;
...
...
@@ -921,10 +921,11 @@ static PyObject *
strop_translate
(
PyObject
*
self
,
PyObject
*
args
)
{
register
char
*
input
,
*
table
,
*
output
;
register
int
i
,
c
,
changed
=
0
;
Py_ssize_t
i
;
int
c
,
changed
=
0
;
PyObject
*
input_obj
;
char
*
table1
,
*
output_start
,
*
del_table
=
NULL
;
in
t
inlen
,
tablen
,
dellen
=
0
;
Py_ssize_
t
inlen
,
tablen
,
dellen
=
0
;
PyObject
*
result
;
int
trans_table
[
256
];
...
...
Modules/structmodule.c
View file @
452728f8
...
...
@@ -1031,7 +1031,7 @@ struct_pack(PyObject *self, PyObject *args)
PyObject
*
format
,
*
result
,
*
v
;
char
*
fmt
;
int
size
,
num
;
in
t
i
,
n
;
Py_ssize_
t
i
,
n
;
char
*
s
,
*
res
,
*
restart
,
*
nres
;
char
c
;
...
...
@@ -1097,7 +1097,7 @@ struct_pack(PyObject *self, PyObject *args)
goto
fail
;
if
(
c
==
's'
)
{
/* num is string size, not repeat count */
in
t
n
;
Py_ssize_
t
n
;
if
(
!
PyString_Check
(
v
))
{
PyErr_SetString
(
StructError
,
"argument for 's' must be a string"
);
...
...
@@ -1116,7 +1116,7 @@ struct_pack(PyObject *self, PyObject *args)
else
if
(
c
==
'p'
)
{
/* num is string size + 1,
to fit in the count byte */
in
t
n
;
Py_ssize_
t
n
;
num
--
;
/* now num is max string size */
if
(
!
PyString_Check
(
v
))
{
PyErr_SetString
(
StructError
,
...
...
@@ -1133,7 +1133,8 @@ struct_pack(PyObject *self, PyObject *args)
memset
(
res
+
1
+
n
,
'\0'
,
num
-
n
);
if
(
n
>
255
)
n
=
255
;
*
res
++
=
n
;
/* store the length byte */
/* store the length byte */
*
res
++
=
Py_SAFE_DOWNCAST
(
n
,
Py_ssize_t
,
char
);
res
+=
num
;
break
;
}
...
...
Modules/zipimport.c
View file @
452728f8
...
...
@@ -408,7 +408,7 @@ zipimporter_get_data(PyObject *obj, PyObject *args)
char
*
p
,
buf
[
MAXPATHLEN
+
1
];
#endif
PyObject
*
toc_entry
;
in
t
len
;
Py_ssize_
t
len
;
if
(
!
PyArg_ParseTuple
(
args
,
"s:zipimporter.get_data"
,
&
path
))
return
NULL
;
...
...
@@ -910,7 +910,7 @@ unmarshal_code(char *pathname, PyObject *data, time_t mtime)
{
PyObject
*
code
;
char
*
buf
=
PyString_AsString
(
data
);
in
t
size
=
PyString_Size
(
data
);
Py_ssize_
t
size
=
PyString_Size
(
data
);
if
(
size
<=
9
)
{
PyErr_SetString
(
ZipImportError
,
...
...
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