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
0db23977
Commit
0db23977
authored
Oct 18, 2012
by
Mark Dickinson
Browse files
Options
Browse Files
Download
Plain Diff
Issue #16277: merge fix from 3.3
parents
5fa8816e
5966b2db
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
0 deletions
+8
-0
Objects/longobject.c
Objects/longobject.c
+8
-0
No files found.
Objects/longobject.c
View file @
0db23977
...
...
@@ -935,6 +935,13 @@ _PyLong_AsByteArray(PyLongObject* v,
PyObject
*
PyLong_FromVoidPtr
(
void
*
p
)
{
#if SIZEOF_VOID_P <= SIZEOF_LONG
/* special-case null pointer */
if
(
!
p
)
return
PyLong_FromLong
(
0
);
return
PyLong_FromUnsignedLong
((
unsigned
long
)(
Py_uintptr_t
)
p
);
#else
#ifndef HAVE_LONG_LONG
# error "PyLong_FromVoidPtr: sizeof(void*) > sizeof(long), but no long long"
#endif
...
...
@@ -945,6 +952,7 @@ PyLong_FromVoidPtr(void *p)
if
(
!
p
)
return
PyLong_FromLong
(
0
);
return
PyLong_FromUnsignedLongLong
((
unsigned
PY_LONG_LONG
)(
Py_uintptr_t
)
p
);
#endif
/* SIZEOF_VOID_P <= SIZEOF_LONG */
}
...
...
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