Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
C
cython
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
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
cython
Commits
1ef6ad6e
Commit
1ef6ad6e
authored
Jan 21, 2021
by
Daniele Varrazzo
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Expose "long and overflow" cpython functions
These functions are available since Python 2.7. Close #3980
parent
30fc4748
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
2 deletions
+2
-2
Cython/Includes/cpython/long.pxd
Cython/Includes/cpython/long.pxd
+2
-2
No files found.
Cython/Includes/cpython/long.pxd
View file @
1ef6ad6e
...
...
@@ -89,7 +89,7 @@ cdef extern from "Python.h":
# Return a C long representation of the contents of pylong. If
# pylong is greater than LONG_MAX, an OverflowError is raised.
#
long PyLong_AsLongAndOverflow(object pylong, int *overflow) except? -1
long
PyLong_AsLongAndOverflow
(
object
pylong
,
int
*
overflow
)
except
?
-
1
# Return a C long representation of the contents of pylong. If pylong is
# greater than LONG_MAX or less than LONG_MIN, set *overflow to 1 or -1,
# respectively, and return -1; otherwise, set *overflow to 0. If any other
...
...
@@ -97,7 +97,7 @@ cdef extern from "Python.h":
# be returned and *overflow will be 0.
# New in version 2.7.
#
PY_LONG_LONG PyLong_AsLongLongAndOverflow(object pylong, int *overflow) except? -1
PY_LONG_LONG
PyLong_AsLongLongAndOverflow
(
object
pylong
,
int
*
overflow
)
except
?
-
1
# Return a C long long representation of the contents of pylong. If pylong
# is greater than PY_LLONG_MAX or less than PY_LLONG_MIN, set *overflow to
# 1 or -1, respectively, and return -1; otherwise, set *overflow to 0. If
...
...
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