[issue46664] PY_SSIZE_T_MAX is not an integer constant expression

2022-02-06 Thread ov2k
Change by ov2k : -- type: compile error -> enhancement ___ Python tracker <https://bugs.python.org/issue46664> ___ ___ Python-bugs-list mailing list Unsubscrib

[issue46664] PY_SSIZE_T_MAX is not an integer constant expression

2022-02-06 Thread ov2k
New submission from ov2k : PY_SSIZE_T_MAX is currently defined in Include/pyport.h as: #define PY_SSIZE_T_MAX ((Py_ssize_t)(((size_t)-1)>>1)) This is not an integer constant expression, which means it can't be used in preprocessor conditionals. For example: #if PY_SSIZE

[issue46605] Py_XDECREF() module on fail in Py_mod_exec

2022-02-01 Thread ov2k
New submission from ov2k : In some of the xx modules, a Py_mod_exec function steals a reference to the module argument when an error occurs (Py_XDECREF(m) after goto fail). It's a bit pernicious given the modules' stated intent to be used as a template, although I'm not sure how often