Skip to content

translate-c: use @intToPtr to cast away qualifiers #4052

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

Merged
merged 1 commit into from
Jan 7, 2020

Conversation

tadeokondrak
Copy link
Contributor

Fixes #4044

@daurnimator daurnimator added the translate-c C to Zig source translation feature (@cImport) label Jan 3, 2020
@andrewrk
Copy link
Member

andrewrk commented Jan 5, 2020

Thanks!

Now that #4053 is merged, would you mind adding a "Run Translated C" test case?

file: test/run_translated_c.zig
cmd: ./zig build test-run-translated-c

This kind of test is better at catching whether translated-c code will actually turn into viable zig code.

@tadeokondrak tadeokondrak force-pushed the translate-c-const-cast branch from 22a1f6f to 2983bd9 Compare January 6, 2020 08:34
@andrewrk andrewrk merged commit f83b02a into ziglang:master Jan 7, 2020
@andrewrk
Copy link
Member

andrewrk commented Jan 7, 2020

Nice work.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
translate-c C to Zig source translation feature (@cImport)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

translate-c: casting away const fails
3 participants