cpython icon indicating copy to clipboard operation
cpython copied to clipboard

gh-113993: Don't immortalize in PyUnicode_InternInPlace; keep immortalizing in other API

Open encukou opened this issue 1 year ago • 0 comments

  • Switch PyUnicode_InternInPlace to _PyUnicode_InternMortal
  • Keep immortalizing in functions that take char*, and are almost exclusively used with strings known at compile-time:
    • PyUnicode_InternFromString
    • PyDict_SetItemString
    • PyObject_SetAttrString
    • PyObject_DelAttrString
    • PyUnicode_InternFromString
    • PyModule_Add* convenience functions.
  • Clarify docs
  • Don't immortalize PyCSimpleType descriptor names, which aren't known at compile time
  • Issue: gh-113993

📚 Documentation preview 📚: https://cpython-previews--121364.org.readthedocs.build/

encukou avatar Jul 04 '24 13:07 encukou