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 pitrou
Recipients colesbury, gregory.p.smith, pablogsal, pitrou, serhiy.storchaka, vstinner
Date 2020-04-20.21:13:05
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1587417185.94.0.947363558961.issue40120@roundup.psfhosted.org>
In-reply-to
Content
Another possibility yet would be:

typedef struct {
    PyObject_VAR_HEAD
    Py_hash_t ob_shash;
    char ob_sval;
} PyBytesObject;

#define PyBytes_AS_STRING(op) (assert(PyBytes_Check(op)), \
                                &(((PyBytesObject *)(op))->ob_sval))

Not sure whether that would be UB...
History
Date User Action Args
2020-04-20 21:13:05pitrousetrecipients: + pitrou, gregory.p.smith, vstinner, serhiy.storchaka, colesbury, pablogsal
2020-04-20 21:13:05pitrousetmessageid: <1587417185.94.0.947363558961.issue40120@roundup.psfhosted.org>
2020-04-20 21:13:05pitroulinkissue40120 messages
2020-04-20 21:13:05pitroucreate