Open
Description
Input C/C++ Header
#include <stdint.h>
typedef u16 uint16_t;
extern void meow(u16 a);
Bindgen Invocation
bindgen::builder()
.header("bindgen.h")
.generate()
.unwrap()
Actual Results
/* snip */
pub type u16_ = u16;
extern "C" {
pub fn meow(a: u16_);
}
Expected Results
There doesn't appear to be an easy way for this to simply become:
extern "C" {
pub fn meow(a: u16);
}
As renaming via ParseCallbacks
doesn't appear to work.
It'd be highly unfortunate to have to hack around it like this:
// Pretend we already included the header with the type aliases
#define _LIB_TYPES_H
#include <stdint.h>
// Do the alias in the preprocessor instead
#define u16 uint16_t
// Include the actual header
#include <lib.h>