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

Don't build C source if running on PYPY #5

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

imwhocodes
Copy link

Avoid building C optimised version if running on PYPY and use the plain python implementation

  1. pypy have a penalty cost at the python to C interface
  2. I found this memory leak: memoryview leaking memory pypy/pypy#5100

As implementation I took inspiration from msgpack https://github.com/msgpack/msgpack-python/blob/main/setup.py

Alternative is to use import cobs.cobs._cobs_py as cobs instead of from cobs import cobs but this move the burden to the userspace and it is pretty ugly

Thanks,
Luca

Avoid building C optimised version if running on PYPY and use the plain python implementation

1- pypy have a penalty cost at the python to C interface
2- I found this memory leak: pypy/pypy#5100

As implementation I took inspiration from msgpack https://github.com/msgpack/msgpack-python/blob/main/setup.py
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

Successfully merging this pull request may close these issues.

1 participant