Commit 5813198
feat(dyngen): preconvert path to
In libloading 0.9 the argument bound changed from `AsRef<OsStr>` to
`libloading::AsFilename`. This was necessary in order to enable
compilation of libloading for usecases that cannot depend on libstd.
`libloading::AsFilename` supports most of the same types, but cannot be
implemented generally for any `T: AsRef<OsStr>` due to the orphan rule.
This makes the generated code support both 0.8 and 0.9 versions of
libloading transparently, and at the same time it also reduces the
number of different instantiations of `Library::new`.
When bindgen is adjusted to work with libloading 0.9 only it will be
worthwhile to adjust the generation of `from_library` to use `c"string"`
literals over `b"string\0"` ones as those can forgo any runtime checking
of the argument(s). However we can't do it right while libloading 0.8 is
still supported.OsStr when opening the library1 parent 6fe5302 commit 5813198
File tree
12 files changed
+12
-0
lines changed- bindgen-tests/tests/expectations/tests
- bindgen/codegen
12 files changed
+12
-0
lines changedLines changed: 1 addition & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Lines changed: 1 addition & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Lines changed: 1 addition & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Lines changed: 1 addition & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Lines changed: 1 addition & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Lines changed: 1 addition & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Lines changed: 1 addition & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Lines changed: 1 addition & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Lines changed: 1 addition & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Lines changed: 1 addition & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
0 commit comments