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
Is anybody working on the C backend? #800
Comments
The most recent (but still not really functional) version of this is in my fork, see this recent thread |
I would like to help. Where do I start? |
Pull requests fixing any of the existing test failures would be surely welcome. Perhaps the best would be to run the current code with your own header and fix the problems affecting your project (and maybe discover new ones :-) Personally, my next goal is adding Thanks in advance for your help! |
I started to look into the test failures. |
Is there a design document available somewhere describing basic decisions regarding the C backend? For instance I wonder how are C++ exception mapped? Do all wrapper functions use their return value for error codes? |
There's a In the source of SWIG itself, there's a
I don't know if there's a design document, but I'd expect the wrappers to return the return value of the wrapped function by default - exception handling would then be handled via |
The only documentation I can think of is the Doc/Manual/C.html file in the branch. If you find anything wrong in here, please feel free to correct it. |
You can see the exception handling in action in This is definitely not ideal from C point of view, but this should be good enough for my ultimate goal of C++ wrapper for C++ API as such API could check for exception after every C function call and just rethrow it immediately. And other alternatives are not really better anyhow (but let's discuss them on the mailing list if you're interested). |
Wait for swig/swig#800 to get closed :/
Please try out the proposed pull request to add in C support in #2086. |
I'm going to close this as the question "Is anybody working on the C backend?" has been answered, and there's an open PR to track progress. |
I think, creating a shallow C interface still would be of great benefit because many languages already have binding generators for C.
The most recent code for this backend seems to be in the branch gsoc2012-c
https://github.com/swig/swig/tree/gsoc2012-c
Has anyone looked into this? Is it beyond repair?
Here's the description and summary from gsoc 2012
https://opensource.googleblog.com/2008/11/swigs-first-google-summer-of-code.html
https://opensource.googleblog.com/2012/11/swig-swings-into-another-successful.html
http://swig-devel.narkive.com/jqdNrIxV/gsoc-c-backend-resume
The text was updated successfully, but these errors were encountered: