Skip to content
GitLab
Projects Groups Snippets
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in / Register
  • L libxml2
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 91
    • Issues 91
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 7
    • Merge requests 7
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Deployments
    • Deployments
    • Environments
    • Releases
  • Packages and registries
    • Packages and registries
    • Package Registry
    • Container Registry
    • Infrastructure Registry
  • Monitor
    • Monitor
    • Incidents
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Repository
  • Wiki
    • Wiki
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • GNOMEGNOME
  • libxml2
  • Issues
  • #203
Closed
Open
Issue created Nov 09, 2020 by Victor Stinner@vstinner

Python 3.10: SystemError: PY_SSIZE_T_CLEAN macro must be defined for '#' formats

Python 3.10 now requires extension modules to use the Py_ssize_t type rather than the int type for string lengths:

"* "The PY_SSIZE_T_CLEAN macro must now be defined to use PyArg_ParseTuple() and Py_BuildValue() formats which use #: es#, et#, s#, u#, y#, z#, U# and Z#. See Parsing arguments and building values and the PEP 353."

  • https://docs.python.org/3.10/whatsnew/3.10.html#id2
  • https://docs.python.org/3.10/c-api/arg.html#arg-parsing
  • https://www.python.org/dev/peps/pep-0353
  • https://bugs.python.org/issue40943

I wrote a 2 lines changes for python/generator.py to define the PY_SSIZE_T_CLEAN macro and uses the proper type.

Assignee
Assign to
Time tracking