You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@qpid.apache.org by GitBox <gi...@apache.org> on 2022/07/16 16:40:13 UTC
[GitHub] [qpid-proton] jiridanek commented on pull request #375: PROTON-2095 Move away from SWIG to CFFI (rebased from #318)
jiridanek commented on PR #375:
URL: https://github.com/apache/qpid-proton/pull/375#issuecomment-1186235175
@astitcher I've updated #318 to use current proton main and to run all tests. I want to keep that previous PR for future reference, so I am closing that one and opening a new PR.
So far, I am thinking that
1) CFFI is certainly possible and (maybe with the exception of the tracer test) it can maintain the api that swig previously exposed to the python code
2) Ownership of the cffi cdata values might be tricky in places. So far I never had problems with it, but maybe I was just lucky. The thing is that CFFI discourages relying on CPython specifics (ref counting) so values must be kept alive by something on the python side always referencing them. Trying out Pypy should flush out problems, I hope
3) python-tests don't cover many data types; the type conversion in the PR is woefully incomplete but they still pass. some other ctest targets maybe test that
4) The CFFI wrapper functions (in `_cpython` directory) can be probably mostly generated from the c type signatures, but I don't think that there is a cffi tool for that; it would need to be done by us; currently they are hand-written as needed (to pass tests)
5) I noticed asan job on GHA for this PR is not running, that is something to fix
6) There is a script to autogenerate the c signatures for cffi from .h files, somewhere, I need to find it. Currently, I made edits by hand.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: dev-unsubscribe@qpid.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@qpid.apache.org
For additional commands, e-mail: dev-help@qpid.apache.org