Files
cbindgen/tests/expectations/constant.cpp
T
Adrian Wong 087d36f32a Map char to char32_t
Rust's `char` is 32 bits wide, but `wchar_t` on Windows is 16.
Avoid truncation by mapping `char` to `char32_t`.
2019-10-04 10:39:31 +02:00

37 lines
566 B
C++

#include <cstdarg>
#include <cstdint>
#include <cstdlib>
#include <new>
static const char32_t DELIMITER = ':';
static const char32_t EQUID = L'\u10083';
static const int32_t FOO = 10;
static const char32_t HEART = L'\u2764';
static const char32_t LEFTCURLY = '{';
static const int8_t NEG_ONE = -1;
static const char32_t NEWLINE = '\n';
static const int8_t POS_ONE = 1;
static const char32_t QUOTE = '\'';
static const char32_t TAB = '\t';
static const float ZOM = 3.14;
struct Foo {
int32_t x[FOO];
};
extern "C" {
void root(Foo x);
} // extern "C"