Skip to content

[C API] Private functions used by mypyc #121489

Description

@cdce8p

I've been working on adding support for 3.13 to mypyc. After updating the codebase, there are still some functions left we depend on which are now private after #106320. Would it make sense to export these again? That would make adopting 3.13 a bit easier. /CC @vstinner

  • _PyBytes_Join defined in pycore_bytesobject.h
  • _PyObject_CallMethodIdObjArgs defined in pycore_call.h
  • _PyType_CalculateMetaclass defined in pycore_object.h
  • _PyUnicode_EQ defined in pycore_unicodeobject.h
  • _PyUnicode_FastCopyCharacters defined in pycore_unicodeobject.h (this could be replaced with PyUnicode_CopyCharacters but it's used in a simplified copy of _PyUnicode_JoinArray which also uses _PyUnicode_FastCopyCharacters).

Other functions include these two. However, as they are inlined, it isn't a problem to include them.

  • _PyObject_CallMethodIdNoArgs and _PyObject_CallMethodIdOneArg defined in pycore_call.h

It would be fine to keep all of them in internal/pycore_* and just add PyAPI_FUNC.

/CC @hauntsaninja

Linked PRs

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions