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
09bde041
Commit
09bde041
authored
Feb 24, 2008
by
Christian Heimes
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Use PY_FORMAT_SIZE_T instead of z for string formatting. Thanks Neal.
parent
114dd944
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
8 additions
and
4 deletions
+8
-4
Objects/dictobject.c
Objects/dictobject.c
+4
-2
Objects/listobject.c
Objects/listobject.c
+4
-2
No files found.
Objects/dictobject.c
View file @
09bde041
...
...
@@ -171,8 +171,10 @@ static size_t count_reuse = 0;
static
void
show_alloc
(
void
)
{
fprintf
(
stderr
,
"Dict allocations: %zd
\n
"
,
count_alloc
);
fprintf
(
stderr
,
"Dict reuse through freelist: %zd
\n
"
,
count_reuse
);
fprintf
(
stderr
,
"Dict allocations: %"
PY_FORMAT_SIZE_T
"d
\n
"
,
count_alloc
);
fprintf
(
stderr
,
"Dict reuse through freelist: %"
PY_FORMAT_SIZE_T
"d
\n
"
,
count_reuse
);
fprintf
(
stderr
,
"%.2f%% reuse rate
\n\n
"
,
(
100
.
0
*
count_reuse
/
(
count_alloc
+
count_reuse
)));
}
...
...
Objects/listobject.c
View file @
09bde041
...
...
@@ -72,8 +72,10 @@ static size_t count_reuse = 0;
static
void
show_alloc
(
void
)
{
fprintf
(
stderr
,
"List allocations: %zd
\n
"
,
count_alloc
);
fprintf
(
stderr
,
"List reuse through freelist: %zd
\n
"
,
count_reuse
);
fprintf
(
stderr
,
"List allocations: %"
PY_FORMAT_SIZE_T
"d
\n
"
,
count_alloc
);
fprintf
(
stderr
,
"List reuse through freelist: %"
PY_FORMAT_SIZE_T
"d
\n
"
,
count_reuse
);
fprintf
(
stderr
,
"%.2f%% reuse rate
\n\n
"
,
(
100
.
0
*
count_reuse
/
(
count_alloc
+
count_reuse
)));
}
...
...
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