Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit e4aa08e

Browse files
author
Stefan Krah
committed
Issue #7353: Remove references to Include/intobject.h in the C-porting howto.
1 parent 648fa19 commit e4aa08e

1 file changed

Lines changed: 0 additions & 19 deletions

File tree

Doc/howto/cporting.rst

Lines changed: 0 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -100,25 +100,6 @@ corresponds to Python 2's :func:`long` type--the :func:`int` type
100100
used in Python 2 was removed. In the C-API, ``PyInt_*`` functions
101101
are replaced by their ``PyLong_*`` equivalents.
102102

103-
The best course of action here is using the ``PyInt_*`` functions aliased to
104-
``PyLong_*`` found in :file:`intobject.h`. The abstract ``PyNumber_*`` APIs
105-
can also be used in some cases. ::
106-
107-
#include "Python.h"
108-
#include "intobject.h"
109-
110-
static PyObject *
111-
add_ints(PyObject *self, PyObject *args) {
112-
int one, two;
113-
PyObject *result;
114-
115-
if (!PyArg_ParseTuple(args, "ii:add_ints", &one, &two))
116-
return NULL;
117-
118-
return PyInt_FromLong(one + two);
119-
}
120-
121-
122103

123104
Module initialization and state
124105
===============================

0 commit comments

Comments
 (0)