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
51028956
Commit
51028956
authored
Jul 16, 2013
by
Victor Stinner
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Cleanup dictobject.c
parent
212922a0
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
19 additions
and
17 deletions
+19
-17
Objects/dictobject.c
Objects/dictobject.c
+19
-17
No files found.
Objects/dictobject.c
View file @
51028956
...
@@ -2589,11 +2589,14 @@ static PyObject *
...
@@ -2589,11 +2589,14 @@ static PyObject *
dict_new
(
PyTypeObject
*
type
,
PyObject
*
args
,
PyObject
*
kwds
)
dict_new
(
PyTypeObject
*
type
,
PyObject
*
args
,
PyObject
*
kwds
)
{
{
PyObject
*
self
;
PyObject
*
self
;
PyDictObject
*
d
;
assert
(
type
!=
NULL
&&
type
->
tp_alloc
!=
NULL
);
assert
(
type
!=
NULL
&&
type
->
tp_alloc
!=
NULL
);
self
=
type
->
tp_alloc
(
type
,
0
);
self
=
type
->
tp_alloc
(
type
,
0
);
if
(
self
!=
NULL
)
{
if
(
self
==
NULL
)
PyDictObject
*
d
=
(
PyDictObject
*
)
self
;
return
NULL
;
d
=
(
PyDictObject
*
)
self
;
d
->
ma_keys
=
new_keys_object
(
PyDict_MINSIZE_COMBINED
);
d
->
ma_keys
=
new_keys_object
(
PyDict_MINSIZE_COMBINED
);
/* XXX - Should we raise a no-memory error? */
/* XXX - Should we raise a no-memory error? */
if
(
d
->
ma_keys
==
NULL
)
{
if
(
d
->
ma_keys
==
NULL
)
{
...
@@ -2605,7 +2608,6 @@ dict_new(PyTypeObject *type, PyObject *args, PyObject *kwds)
...
@@ -2605,7 +2608,6 @@ dict_new(PyTypeObject *type, PyObject *args, PyObject *kwds)
/* The object has been implicitly tracked by tp_alloc */
/* The object has been implicitly tracked by tp_alloc */
if
(
type
==
&
PyDict_Type
)
if
(
type
==
&
PyDict_Type
)
_PyObject_GC_UNTRACK
(
d
);
_PyObject_GC_UNTRACK
(
d
);
}
return
self
;
return
self
;
}
}
...
...
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