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
92ca5455
Commit
92ca5455
authored
Jul 30, 2004
by
Armin Rigo
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
What if you call lst.__init__() while it is being sorted? :-)
The invariant checks would break.
parent
258fa1b5
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
2 deletions
+4
-2
Objects/listobject.c
Objects/listobject.c
+4
-2
No files found.
Objects/listobject.c
View file @
92ca5455
...
@@ -2315,8 +2315,10 @@ list_init(PyListObject *self, PyObject *args, PyObject *kw)
...
@@ -2315,8 +2315,10 @@ list_init(PyListObject *self, PyObject *args, PyObject *kw)
return
-
1
;
return
-
1
;
/* Verify list invariants established by PyType_GenericAlloc() */
/* Verify list invariants established by PyType_GenericAlloc() */
assert
(
0
<=
self
->
ob_size
&&
self
->
ob_size
<=
self
->
allocated
);
assert
(
0
<=
self
->
ob_size
);
assert
(
self
->
ob_item
!=
NULL
||
self
->
allocated
==
0
);
assert
(
self
->
ob_size
<=
self
->
allocated
||
self
->
allocated
==
-
1
);
assert
(
self
->
ob_item
!=
NULL
||
self
->
allocated
==
0
||
self
->
allocated
==
-
1
);
/* Empty previous contents */
/* Empty previous contents */
if
(
self
->
ob_item
!=
NULL
)
{
if
(
self
->
ob_item
!=
NULL
)
{
...
...
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