Age | Commit message (Collapse) | Author |
|
|
|
|
|
codegen: Fix bindgen-injected items in namespaces.
Found while trying to use namespaces in stylo.
r? @fitzgen
|
|
|
|
Found while trying to use namespaces in stylo.
|
|
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.
|
|
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
|
|
This an implementation of `NameOptions` structure which will hold
flags for building a name string. This fixes related to issue #201
|
|
|
|
|
|
|
|
|
|
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.
|
|
|
|
|
|
|
|
|
|
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
|
|
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.
|
|
Do not evaluate variadic template types
This is a workaround for an internal clang assertion that gets triggered
if we try to evaluate a variadic template type reference.
Fixes #283
r? @emilio
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Fixes issue #125
|
|
|
|
|
|
|
|
This is a workaround for an internal clang assertion that gets triggered
if we try to evaluate a variadic template type reference.
Fixes #283
|
|
clang::Cursor::args should return an Option<Vec<Cursor>>
Attempt to fix #130
|
|
Include namespaces in mangled symbols
When we aren't using `--enable-cxx-namespaces`, we can end up with
conflicting struct symbol names that we need to disambiguate. The
solution is to mangle the namespaced C++ symbol "foo::bar::Baz" into the
Rust "foo_bar_Baz" symbol.
This did change the way anonymous types and modules get named a little,
but I think our approach is much more sane now than it was before.
Fixes #267.
r? @emilio
|
|
When we aren't using `--enable-cxx-namespaces`, we can end up with
conflicting struct symbol names that we need to disambiguate. The
solution is to mangle the namespaced C++ symbol "foo::bar::Baz" into the
Rust "foo_bar_Baz" symbol.
|
|
|
|
|
|
|
|
Fixes #274
|
|
This fixes #272.
|