[issue19661] Python: RuntimeError: invalid slot offset when importing a module

STINNER Victor report at bugs.python.org
Thu Nov 21 03:26:28 CET 2013


STINNER Victor added the comment:

This warning is interesting:

 "/aix/Modules/_ssl.c", line 262.17: 1506-196 (W) Initialization between types "void*" and "struct _object*(*)(struct {...}*)" is not allowed.

It looks like the following line:

static PyType_Slot sslerror_type_slots[] = {
    {Py_tp_base, NULL},  /* Filled out in module init as it's not a constant */ <===== HERE =====
    {Py_tp_doc, SSLError_doc},
    {Py_tp_str, SSLError_str},
    {0, 0},
};

NULL is replaced in PyInit__ssl():

    sslerror_type_slots[0].pfunc = PyExc_OSError;

----------
nosy: +haypo

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue19661>
_______________________________________


More information about the Python-bugs-list mailing list