This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author Ananthakrishnan
Recipients Ananthakrishnan, BernardoSulzbach, Dennis Sweeney, SilentGhost, mark.dickinson, rhettinger, serhiy.storchaka, steven.daprano, tim.peters
Date 2020-02-21.06:41:40
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <>
This is my code for math.gcd:

static PyObject *
math_gcd(PyObject *module, PyObject *args, Py_ssize_t n)
    PyObject *g = 0, *item, *in;
    Py_ssize_t i;
    for (i = 0; i < n; i++) {
        item = args[i];
        in = PyNumber_Index(item);
        if (in == NULL) {
            return NULL;
        g = _PyLong_GCD(g, in);
    return g;

This is showing an error:

error: incompatible types when assigning to type ‘PyObject * {aka struct _object *}’ from type ‘PyObject {aka struct _object}’
       item = args[i];
Date User Action Args
2020-02-21 06:41:40Ananthakrishnansetrecipients: + Ananthakrishnan, tim.peters, rhettinger, mark.dickinson, steven.daprano, SilentGhost, serhiy.storchaka, Dennis Sweeney, BernardoSulzbach
2020-02-21 06:41:40Ananthakrishnansetmessageid: <>
2020-02-21 06:41:40Ananthakrishnanlinkissue39648 messages
2020-02-21 06:41:40Ananthakrishnancreate