
June 29, 2020
2:59 a.m.
Le dim. 28 juin 2020 à 17:21, Inada Naoki <songofacandy@gmail.com> a écrit :
More aggressive idea: override current PyUnicode_EncodeXXX() apis. Change from `Py_UNICODE *object` to `PyObject *unicode`.
This idea might look crazy. But PyUnicode_EncodeXXX APIs are deprecated for a long time, and there are only a few users. I grepped from 3874 source packages in top 4000 downloaded packages. (126 packages are wheel-only)
IMO it's a violation of the C API stability warranty. I would prefer to use different function names to ensure that building an old C extension fails with a compiler error, rather than emit a compiler warning and crash at runtime. Victor -- Night gathers, and now my watch begins. It shall not end until my death.