[New-bugs-announce] [issue1566] sock_type doesn't have GC although it can contain a PyObject*

Christian Heimes report at bugs.python.org
Fri Dec 7 12:49:59 CET 2007


New submission from Christian Heimes:

The socket object is defined in socketmodule.h as

typedef struct {
        PyObject_HEAD
        SOCKET_T sock_fd;       /* Socket file descriptor */
        int sock_family;        /* Address family, e.g., AF_INET */
        int sock_type;          /* Socket type, e.g., SOCK_STREAM */
        int sock_proto;         /* Protocol type, usually 0 */
        PyObject *(*errorhandler)(void); /* Error handler; checks
                                            errno, returns NULL and
                                            sets a Python exception */
        double sock_timeout;             /* Operation timeout in seconds;
                                            0.0 means non-blocking */
} PySocketSockObject;

The PyTypeObject sock_type doesn't have support for cyclic GC. Shouldn't
types that can contain a PyObject* use GC?

----------
components: Extension Modules
messages: 58270
nosy: tiran
priority: normal
severity: normal
status: open
title: sock_type doesn't have GC although it can contain a PyObject*
type: behavior
versions: Python 2.6, Python 3.0

__________________________________
Tracker <report at bugs.python.org>
<http://bugs.python.org/issue1566>
__________________________________


More information about the New-bugs-announce mailing list