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
a9cab519
Commit
a9cab519
authored
Feb 11, 2009
by
Mark Dickinson
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Issue #4910: PyNumber_Int is deprecated in 3.0.1; will be removed in 3.1.
parent
b3ce9160
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
15 additions
and
4 deletions
+15
-4
Doc/c-api/number.rst
Doc/c-api/number.rst
+6
-0
Include/abstract.h
Include/abstract.h
+5
-1
Include/intobject.h
Include/intobject.h
+4
-3
No files found.
Doc/c-api/number.rst
View file @
a9cab519
...
...
@@ -233,6 +233,12 @@ Number Protocol
Returns the *o* converted to an integer object on success, or *NULL* on
failure. This is the equivalent of the Python expression ``int(o)``.
.. note::
This function is defined in the transitional :file:`intobject.h`
header file. It will be removed completely in Python 3.1. Use
the :cfunc:`PyNumber_Long` function instead.
.. cfunction:: PyObject* PyNumber_Long(PyObject *o)
...
...
Include/abstract.h
View file @
a9cab519
...
...
@@ -784,7 +784,11 @@ xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx*/
is cleared and the value is clipped.
*/
#define PyNumber_Int PyNumber_Long
/*
PyNumber_Int used to be found here. It's now in Include/intobject.h,
where it is defined to be an alias for PyNumber_Long. New code
should use PyNumber_Long instead.
*/
PyAPI_FUNC
(
PyObject
*
)
PyNumber_Long
(
PyObject
*
o
);
...
...
Include/intobject.h
View file @
a9cab519
/* Integer object interface
This header file
s
exists to make porting code to Python 3.0 easier. It
defines aliases from PyInt_* to PyLong_*
. Only PyInt_GetMax() and
Py
Int_CheckExact() remain in longobject.h
.
This header file exists to make porting code to Python 3.0 easier. It
defines aliases from PyInt_* to PyLong_*
and an alias from
Py
Number_Int to PyNumber_Long
.
*/
#ifndef Py_INTOBJECT_H
...
...
@@ -28,6 +28,7 @@ extern "C" {
#define PyInt_AsUnsignedLongMask PyLong_AsUnsignedLongMask
#define PyInt_AsUnsignedLongLongMask PyLong_AsUnsignedLongLongMask
#define PyInt_AS_LONG PyLong_AS_LONG
#define PyNumber_Int PyNumber_Long
#ifdef __cplusplus
}
...
...
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