]> granicus.if.org Git - python/commitdiff
Issue #7353: Remove references to Include/intobject.h in the C-porting howto.
authorStefan Krah <skrah@bytereef.org>
Sun, 20 Jan 2013 22:18:00 +0000 (23:18 +0100)
committerStefan Krah <skrah@bytereef.org>
Sun, 20 Jan 2013 22:18:00 +0000 (23:18 +0100)
Doc/howto/cporting.rst

index 9d8a1b0e354c1caa5830107de95c96ed1c9db0b2..1ad77d687e7c32f1a34cacaab2e3f76d33d76afa 100644 (file)
@@ -100,25 +100,6 @@ corresponds to Python 2's :func:`long` type--the :func:`int` type
 used in Python 2 was removed.  In the C-API, ``PyInt_*`` functions
 are replaced by their ``PyLong_*`` equivalents.
 
-The best course of action here is using the ``PyInt_*`` functions aliased to
-``PyLong_*`` found in :file:`intobject.h`.  The abstract ``PyNumber_*`` APIs
-can also be used in some cases. ::
-
-   #include "Python.h"
-   #include "intobject.h"
-
-   static PyObject *
-   add_ints(PyObject *self, PyObject *args) {
-       int one, two;
-       PyObject *result;
-
-       if (!PyArg_ParseTuple(args, "ii:add_ints", &one, &two))
-           return NULL;
-
-       return PyInt_FromLong(one + two);
-   }
-
-
 
 Module initialization and state
 ===============================