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
43f2e08d
Commit
43f2e08d
authored
Jan 10, 2009
by
Mark Dickinson
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Issue #4910: replace "long" with "int" in docstring for __long__ slot and
in documentation for PyNumber_Long.
parent
add43e9a
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
7 additions
and
16 deletions
+7
-16
Doc/c-api/number.rst
Doc/c-api/number.rst
+4
-7
Include/abstract.h
Include/abstract.h
+2
-8
Objects/typeobject.c
Objects/typeobject.c
+1
-1
No files found.
Doc/c-api/number.rst
View file @
43f2e08d
...
...
@@ -230,19 +230,16 @@ Number Protocol
.. cfunction:: PyObject* PyNumber_Int(PyObject *o)
.. index:: builtin: int
Returns the *o* converted to an integer object on success, or *NULL* on failure.
If the argument is outside the integer range a long object will be returned
instead. This is the equivalent of the Python expression ``int(o)``.
Returns the *o* converted to an integer object on success, or *NULL* on
failure. This is the equivalent of the Python expression ``int(o)``.
.. cfunction:: PyObject* PyNumber_Long(PyObject *o)
.. index:: builtin:
long
.. index:: builtin:
int
Returns the *o* converted to an integer object on success, or *NULL* on
failure. This is the equivalent of the Python expression ``
long
(o)``.
failure. This is the equivalent of the Python expression ``
int
(o)``.
.. cfunction:: PyObject* PyNumber_Float(PyObject *o)
...
...
Include/abstract.h
View file @
43f2e08d
...
...
@@ -808,20 +808,14 @@ xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx*/
#define PyNumber_Int PyNumber_Long
PyAPI_FUNC
(
PyObject
*
)
PyNumber_Long
(
PyObject
*
o
);
/*
Returns the o converted to an integer object on success, or
NULL on failure. This is the equivalent of the Python
expression: int(o).
*/
PyAPI_FUNC
(
PyObject
*
)
PyNumber_Long
(
PyObject
*
o
);
/*
Returns the o converted to a long integer object on success,
or NULL on failure. This is the equivalent of the Python
expression: long(o).
*/
PyAPI_FUNC
(
PyObject
*
)
PyNumber_Float
(
PyObject
*
o
);
/*
...
...
Objects/typeobject.c
View file @
43f2e08d
...
...
@@ -5444,7 +5444,7 @@ static slotdef slotdefs[] = {
UNSLOT
(
"__int__"
,
nb_int
,
slot_nb_int
,
wrap_unaryfunc
,
"int(x)"
),
UNSLOT
(
"__long__"
,
nb_long
,
slot_nb_long
,
wrap_unaryfunc
,
"
long
(x)"
),
"
int
(x)"
),
UNSLOT
(
"__float__"
,
nb_float
,
slot_nb_float
,
wrap_unaryfunc
,
"float(x)"
),
NBSLOT
(
"__index__"
,
nb_index
,
slot_nb_index
,
wrap_unaryfunc
,
...
...
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