diff options
author | bors-servo <lbergstrom+bors@mozilla.com> | 2017-03-27 12:15:33 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-03-27 12:15:33 -0700 |
commit | 7ed7c2492fbda2e25fe84be0696341288998bd8b (patch) | |
tree | 77d4166045932df4b7899d4311a4a1ba58ece234 /bindgen-integration/cpp/Test.cc | |
parent | 3cb681918a8ea1f670516e0edfca97ab81ef767a (diff) | |
parent | 63de9486e8e1a2d2987c93a7fedd766bf8c52b78 (diff) |
Auto merge of #601 - luser:string-input, r=emilio
Add a `Builder::header_contents` method to allow passing source code as a string to a Builder
Currently the Builder API requires input as header files on disk. This allows
passing C source directly to clang using the existing UnsavedFile struct.
I'm going to take a shot at implementing a webapp that lets users paste in C source and get the bindgen output. It would make life easier if I didn't have to write the source out to a temp file. This patch allows passing the source in as a `&str`.
I wasn't quite sure where to put the new test, but it seems to work in tests.rs.
Diffstat (limited to 'bindgen-integration/cpp/Test.cc')
0 files changed, 0 insertions, 0 deletions