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
ed02b3f3
Commit
ed02b3f3
authored
Dec 21, 2009
by
Mark Dickinson
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix reference counts for test_long_and_overflow.
parent
e31d3006
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
0 deletions
+6
-0
Modules/_testcapimodule.c
Modules/_testcapimodule.c
+6
-0
No files found.
Modules/_testcapimodule.c
View file @
ed02b3f3
...
...
@@ -388,6 +388,8 @@ test_long_and_overflow(PyObject *self)
return
raiseTestError
(
"test_long_and_overflow"
,
"overflow was not set to 0"
);
Py_DECREF
(
num
);
/* a number smaller than LONG_MIN even on 64-bit platforms */
num
=
PyLong_FromString
(
"-FFFFFFFFFFFFFFFFFFFFFFFF"
,
NULL
,
16
);
if
(
num
==
NULL
)
...
...
@@ -406,6 +408,8 @@ test_long_and_overflow(PyObject *self)
return
raiseTestError
(
"test_long_and_overflow"
,
"overflow was not set to 0"
);
Py_DECREF
(
num
);
num
=
PyLong_FromString
(
"FF"
,
NULL
,
16
);
if
(
num
==
NULL
)
return
NULL
;
...
...
@@ -423,6 +427,8 @@ test_long_and_overflow(PyObject *self)
return
raiseTestError
(
"test_long_and_overflow"
,
"overflow was set incorrectly"
);
Py_DECREF
(
num
);
Py_INCREF
(
Py_None
);
return
Py_None
;
}
...
...
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