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

Add support for elaborated types. #3

Closed
wants to merge 1 commit into from

Conversation

metajack
Copy link
Contributor

Things like JS::Latin1Char now show up as elaborated types and we need to use clang_Type_getNamedType to resolve them.

This should fix #1.

@metajack
Copy link
Contributor Author

cc @emilio @nox

@metajack
Copy link
Contributor Author

@edunham This repo is not reported to IRC or homu yet. Can you turn that on?

@nox
Copy link
Contributor

nox commented Jun 23, 2016

So that's something that changed in libclang itself or something like that?

bors-servo pushed a commit to servo/rust-mozjs that referenced this pull request Jun 23, 2016
Fix linux 64bit bindings which included inline symbols

This requires rust-lang/rust-bindgen#2 and rust-lang/rust-bindgen#3 to run bindgen, but does not need to wait on those to land as the new bindings are included here.

<!-- Reviewable:start -->
---
This change is [<img src="https://reviewable.io/review_button.svg" height="35" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/rust-mozjs/271)
<!-- Reviewable:end -->
@emilio
Copy link
Contributor

emilio commented Jun 23, 2016

@nox It seems so.

@metajack Thanks for digging into this, my laptop OOMd the first time I tried to build LLVM 3.9 so I left it building again with -j1 and went to bed. Adding a test for this would be ideal (tests/headers/x.hpp + make test, yeah, I know), but I can take care of it.

@@ -946,6 +952,9 @@ pub fn type_to_str(x: Enum_CXTypeKind) -> &'static str {
CXType_IncompleteArray => "IncompleteArray",
CXType_VariableArray => "VariableArray",
CXType_DependentSizedArray => "DependentSizedArray",
CXType_MemberPointer => "CXType_MemberPointer",
CXType_Auto => "CXType_Auto",
CXType_Elaborated => "CXType_Elaborated",
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Remove the CXType_ prefixes.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed.

bors-servo pushed a commit to servo/saltfs that referenced this pull request Jun 23, 2016
add servo/rust-bindgen

as Jack requested in rust-lang/rust-bindgen#3

<!-- Reviewable:start -->
---
This change is [<img src="https://reviewable.io/review_button.svg" height="35" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/saltfs/402)
<!-- Reviewable:end -->
@edunham edunham mentioned this pull request Jun 23, 2016
bors-servo pushed a commit to servo/saltfs that referenced this pull request Jun 23, 2016
add servo/rust-bindgen

as Jack requested in rust-lang/rust-bindgen#3

<!-- Reviewable:start -->
---
This change is [<img src="https://reviewable.io/review_button.svg" height="35" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/saltfs/402)
<!-- Reviewable:end -->
@metajack
Copy link
Contributor Author

@emilio Tests added and @nox's comment addressed.

@metajack
Copy link
Contributor Author

@emilio re-r?

@emilio
Copy link
Contributor

emilio commented Jun 26, 2016

r+, I'm looking into CI issues right now (#5) that should allow us to autoland this instead of merging manually, but feel free to do so.

@emilio
Copy link
Contributor

emilio commented Jun 30, 2016

@bors-servo: r+

@bors-servo
Copy link

📌 Commit 1c4ca74 has been approved by emilio

@bors-servo
Copy link

⌛ Testing commit 1c4ca74 with merge 00ddb0e...

bors-servo pushed a commit that referenced this pull request Jun 30, 2016
Add support for elaborated types.

Things like JS::Latin1Char now show up as elaborated types and we need to use clang_Type_getNamedType to resolve them.

This should fix #1.
@bors-servo
Copy link

💔 Test failed - travis

@bors-servo
Copy link

☔ The latest upstream changes (presumably #6) made this pull request unmergeable. Please resolve the merge conflicts.

@Ms2ger Ms2ger closed this Jul 1, 2016
bors-servo pushed a commit that referenced this pull request Oct 29, 2016
After the rewrite, this works.

Fixes #3
luser pushed a commit to luser/rust-bindgen that referenced this pull request Mar 27, 2017
Reduce some nesting in cstruct_to_rs.
@jvo203 jvo203 mentioned this pull request Jan 27, 2019
benesch pushed a commit to benesch/rust-bindgen that referenced this pull request Dec 23, 2021
…bute

Add attribute for C++ special members
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

current bindgen is broken for rust-mozjs
6 participants