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
ad587f96
Commit
ad587f96
authored
Dec 12, 2015
by
Martin Panter
Browse files
Options
Browse Files
Download
Plain Diff
Issue #25845: Merge PyLong_Check() cleanup from 3.5
parents
58ea9104
f0c0318c
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
2 deletions
+2
-2
Modules/_ctypes/cfield.c
Modules/_ctypes/cfield.c
+2
-2
No files found.
Modules/_ctypes/cfield.c
View file @
ad587f96
...
...
@@ -1375,7 +1375,7 @@ Z_set(void *ptr, PyObject *value, Py_ssize_t size)
Py_INCREF
(
value
);
return
value
;
}
if
(
PyLong_Check
(
value
)
||
PyLong_Check
(
value
)
)
{
if
(
PyLong_Check
(
value
))
{
#if SIZEOF_VOID_P == SIZEOF_LONG_LONG
*
(
wchar_t
**
)
ptr
=
(
wchar_t
*
)
PyLong_AsUnsignedLongLongMask
(
value
);
#else
...
...
@@ -1491,7 +1491,7 @@ P_set(void *ptr, PyObject *value, Py_ssize_t size)
_RET
(
value
);
}
if
(
!
PyLong_Check
(
value
)
&&
!
PyLong_Check
(
value
)
)
{
if
(
!
PyLong_Check
(
value
))
{
PyErr_SetString
(
PyExc_TypeError
,
"cannot be converted to pointer"
);
return
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