Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Crash: PY_SSIZE_T_CLEAN macro must be defined for '#' formats #41

Open
mechgt opened this issue Jan 15, 2023 · 1 comment
Open

Crash: PY_SSIZE_T_CLEAN macro must be defined for '#' formats #41

mechgt opened this issue Jan 15, 2023 · 1 comment

Comments

@mechgt
Copy link

mechgt commented Jan 15, 2023

There seems to be a breaking change in python 3.10 (see https://docs.python.org/3.10/whatsnew/3.10.html#id2 ) where PY_SSIZE_T_CLEAN needs to be defined. See error below I receive when attempting to run ropium,

(ropium)> load -a X86 myfile.dll

Traceback (most recent call last):
  File "/usr/bin/ropium", line 524, in <module>
    main()
  File "/usr/bin/ropium", line 84, in main
    load(args[1:])
  File "/usr/bin/ropium", line 205, in load
    compiler.load(f)
SystemError: PY_SSIZE_T_CLEAN macro must be defined for '#' formats
mechgt added a commit to mechgt/ropium that referenced this issue Jan 15, 2023
@mechgt
Copy link
Author

mechgt commented Jan 16, 2023

I believe that PY_SSIZE_T_CLEAN needs to be defined, and a few types need to be changed from int to Py_ssize_t. I don't exactly understand all of this, but managed to get it working anyway and sent a pull request.

Change details in case others are interested: mechgt@212ed51

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant