-
-
Notifications
You must be signed in to change notification settings - Fork 2.8k
translate-c: add detect possible member functions #23606
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
base: master
Are you sure you want to change the base?
Conversation
@Vexu Please review this PR. |
If the function where the first argument is a container or a pointer to a container, then add a const variable that store the function, and the variable name is the function name without the prefix.
bac86f4
to
cc4a74c
Compare
If you're going to submit this to https://github.com/ziglang/translate-c then I'd prefer to review it there when you do so. |
I had clone https://github.com/ziglang/translate-c into my computer, it failed to build by use command The error message is show in bellow:
My zig compiler version is 0.14.0. |
In the |
@Vexu I had success to build translate-c project by use last version zig in master branch. But can not translate main.c file to zig file. The detail command and output messages is show in bellow:
After I specify the include path by -I parameter, it has more error messages to terminal. The detail command and partial output messages is show in bellow:
How to fix this problem? My operate system is macOS 15.3.2. |
It's a known issue ziglang/translate-c#18, Vexu/arocc#848. You can wait for that PR to be merged or just avoid include |
@Vexu I had update source code to your stdio-include branch, It can be successful build compile_c example by use zig 0.15.0-dev. I could start merging my code.
But it is also failed to translate main.c file by use translate-c that built from your latest source code of branch stdio-include.
|
That's because I'm adding the system include dirs in the build script, if you use |
It is also failed by use your suggest command, the detail command and error messages is in below:
|
Fixes ziglang/translate-c#14
If the function where the first argument is a container or a pointer to a container, then add a const variable that store the function, and the variable name is the function name without the prefix.