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 vstinner
Recipients brandtbucher, serhiy.storchaka, vstinner
Date 2020-11-12.12:58:37
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1605185917.46.0.234947242157.issue42327@roundup.psfhosted.org>
In-reply-to
Content
I'm using more and more often such macro:

#define MOD_ADD(name, expr) \
    do { \
        PyObject *obj = (expr); \
        if (obj == NULL) { \
            return -1; \
        } \
        if (PyModule_AddObjectRef(mod, name, obj) < 0) { \
            Py_DECREF(obj); \
            return -1; \
        } \
        Py_DECREF(obj); \
    } while (0)

Would PyModule_Add() replace such macro?
History
Date User Action Args
2020-11-12 12:58:37vstinnersetrecipients: + vstinner, serhiy.storchaka, brandtbucher
2020-11-12 12:58:37vstinnersetmessageid: <1605185917.46.0.234947242157.issue42327@roundup.psfhosted.org>
2020-11-12 12:58:37vstinnerlinkissue42327 messages
2020-11-12 12:58:37vstinnercreate