Author vstinner
Recipients benjamin.peterson, cgohlke, paul.moore, pyscripter, steve.dower, tim.golden, vstinner, zach.ware
Date 2019-06-17.07:48:56
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1560757736.95.0.172860236688.issue37189@roundup.psfhosted.org>
In-reply-to
Content
Attached PR 14142 fix bpo-34646 regression.

> It shouldn't break existing code because PyRun_String has a macro expansion to PyRun_StringFlags. ABI compatibility between major releases is not provided.

Many applications don't use Python header files, but access directly libpython. For example, py2app uses dlsym():
https://bitbucket.org/ronaldoussoren/py2app/src/default/py2app/apptemplate/src/main.c

PyInstaller uses GetProcAddress() on Windows or dlsym() on other platforms:
* https://github.com/pyinstaller/pyinstaller/blob/1844d69f5aa1d64d3feca912ed1698664a3faf3e/bootloader/src/pyi_python.h
* https://github.com/pyinstaller/pyinstaller/blob/1844d69f5aa1d64d3feca912ed1698664a3faf3e/bootloader/src/pyi_pythonlib.c

That's why PyRun_String() is defined as an alias using a macro *and* as a function in pythonrun.c:

#undef PyRun_String
PyObject *
PyRun_String(const char *str, int s, PyObject *g, PyObject *l)
{
    return PyRun_StringFlags(str, s, g, l, NULL);
}
History
Date User Action Args
2019-06-17 07:48:56vstinnersetrecipients: + vstinner, paul.moore, tim.golden, pyscripter, benjamin.peterson, cgohlke, zach.ware, steve.dower
2019-06-17 07:48:56vstinnersetmessageid: <1560757736.95.0.172860236688.issue37189@roundup.psfhosted.org>
2019-06-17 07:48:56vstinnerlinkissue37189 messages
2019-06-17 07:48:56vstinnercreate