Age | Commit message (Collapse) | Author |
|
codegen: generate stable names for tests functions.
r? @heycam
|
|
|
|
ir: Fix namespace_aware_canonical_name with disable_name_namespacing.
This dropped off the previous PR.
|
|
|
|
Coherent replacement and whitelisting
This is on top of the last few PRs.
This moves us to take modules into account when whitelisting and replacing.
This also fixes a few issues with replacements, and simplifies our handling of template aliases.
r? @fitzgen
|
|
Fixes #315
|
|
|
|
|
|
|
|
codegen: Fix bindgen-injected items in namespaces.
Found while trying to use namespaces in stylo.
r? @fitzgen
|
|
Use std::env::var instead of env! in build srcipt
Recent versions of Cargo seems to not provide $OUT_DIR and some other environment variables anymore when building build scripts.
CC @upsuper
|
|
Recent versions of Cargo seems to not provide $OUT_DIR and some other
environment variables anymore when building build scripts.
|
|
Update clang-sys.
r? @upsuper
|
|
|
|
Add an API to decide what gets generated more granularly.
This unifies options and is more flexible.
I'd prefer to do the `bitflags!` thing as a followup, because airport WiFi (it could be an E-Easy).
r? @fitzgen
|
|
|
|
Found while trying to use namespaces in stylo.
|
|
Assert that we won't infinite loop
In non-release builds with debug assertions, keep track of the set of
`ItemId`s that we have iterated over in `ItemAncestorsIter` and make
sure that we don't reach an ancestor we have already yielded, which
would trigger an infinite loop.
|
|
The type is now being used outside of the context of ancestors, and
additionally "debug only" more precisely describes its behavior.
|
|
This re-uses the infrastructure used when asserting that
`ItemAncestorsIter` does not infinitely loop in `ir::Item::name_target`.
|
|
In non-release builds with debug assertions, keep track of the set of
`ItemId`s that we have iterated over in `ItemAncestorsIter` and make
sure that we don't reach an ancestor we have already yielded, which
would trigger an infinite loop.
|
|
Do not treat parent struct as a module for nested structs
This fixes `ItemCanonicalPath` to return paths of the form `[module*,
item]` rather than `[item*, item]`. That is, there will only be module
names before the item's name, rather than also other arbitrary item
names (such as parent structs).
Fixes #311
r? @emilio
|
|
This fixes `ItemCanonicalPath` to return paths of the form `[module*,
item]` rather than `[item*, item]`. That is, there will only be module
names before the item's name, rather than also other arbitrary item
names (such as parent structs).
Fixes #311
|
|
Use the generated root module via a relative path
We previously generated uses of the root module with absolute paths:
use root;
However this only works if the generated bindings are the root of the
crate. If they were in some submodule then that path would not be
valid. They are now generated relative to the current module, like this:
use self::super::super::root;
Fixes #96
r? @emilio
|
|
We previously generated uses of the root module with absolute paths:
use root;
However this only works if the generated bindings are the root of the
crate. If they were in some submodule then that path would not be
valid. They are now generated relative to the current module, like this:
use self::super::super::root;
Fixes #96
|
|
Unify naming methods into a single method + options builder type
Some of these changes are still under the question but I guess it's how @fitzgen describe it in issue #201.
|
|
This an implementation of `NameOptions` structure which will hold
flags for building a name string. This fixes related to issue #201
|
|
Bunch of fixes for stylo and libclang 4
r? @fitzgen or @nox
|
|
|
|
|
|
Restore links in README.md
These were deleted accidentally in 073b12ff35a8ec6314d655804915f177ce453227.
|
|
These were deleted accidentally in 073b12ff35a8ec6314d655804915f177ce453227.
|
|
|
|
|
|
clang::Cursor::enum_type should return an Option<Type>
Returning an Option<Type> relieves callers from having to check whether clang::Cursor::enum_type returns `CXType_Invalid`.
Fixes #125
|
|
|
|
As discussed with @emilio. Part of #125.
|
|
Thanks for pointing this out @emilio.
|
|
ir: Rework how we discover children of modules.
r? @fitzgen
|
|
|
|
A more coherent story for whitelisting.
r? @fitzgen
Fixes #300
Fixes #299
Fixes #298
|
|
|
|
|
|
ir: Deduplicate namespaces.
|
|
|
|
Trace function signature types
This extends the `TypeCollector` trait implementation for `Item` to
consider items of kind `Function` and to collect the types found in the
function's signature.
Fixes #291
r? @emilio
|
|
This extends the `TypeCollector` trait implementation for `Item` to
consider items of kind `Function` and to collect the types found in the
function's signature.
Fixes #291
|
|
First steps to fix issue #57
This should generate tests for fully specialized templates.
TODO:
- [x] Tests
r? @emilio
|
|
Recurse on the inner type when finding a template alias name target
The assertion that the template alias's inner type was our name target,
and that we didn't need to recurse, is failing when generating
SpiderMonkey bindings. I'm not 100% sure when this can happen, but
clearly it can, and it is easy to support, so let's support it.
r? @emilio
|
|
The assertion that the template alias's inner type was our name target,
and that we didn't need to recurse, is failing when generating
SpiderMonkey bindings. I'm not 100% sure when this can happen, but
clearly it can, and it is easy to support, so let's support it.
|