Add a derive_constructor option to generate struct constructors
This commit is contained in:
committed by
Ryan Hunt
parent
59104b1efa
commit
2ccaa3e956
@@ -9,6 +9,10 @@ enum class C : uint32_t {
|
||||
struct A {
|
||||
int32_t m0;
|
||||
|
||||
A(int32_t const& aM0)
|
||||
: m0(aM0)
|
||||
{}
|
||||
|
||||
bool operator<(const A& other) const {
|
||||
return m0 < other.m0;
|
||||
}
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
/// cbindgen:derive-lt=true
|
||||
/// cbindgen:derive-lte=true
|
||||
/// cbindgen:derive-constructor=true
|
||||
/// cbindgen:rename-all=GeckoCase
|
||||
#[repr(C)]
|
||||
struct A(i32);
|
||||
|
||||
Reference in New Issue
Block a user