cython: Leave out values of constants and enumerators
Keep them as documentation only
This commit is contained in:
parent
1b7976c88e
commit
98b7a3f9b9
@ -563,11 +563,8 @@ impl Constant {
|
|||||||
false
|
false
|
||||||
};
|
};
|
||||||
|
|
||||||
if config.language == Language::Cython
|
match config.language {
|
||||||
|| (config.language == Language::Cxx
|
Language::Cxx if config.constant.allow_static_const || allow_constexpr => {
|
||||||
&& (config.constant.allow_static_const || allow_constexpr))
|
|
||||||
{
|
|
||||||
if config.language == Language::Cxx {
|
|
||||||
if allow_constexpr {
|
if allow_constexpr {
|
||||||
out.write("constexpr ")
|
out.write("constexpr ")
|
||||||
}
|
}
|
||||||
@ -581,18 +578,26 @@ impl Constant {
|
|||||||
} else {
|
} else {
|
||||||
out.write("const ");
|
out.write("const ");
|
||||||
}
|
}
|
||||||
} else {
|
|
||||||
out.write("const ");
|
|
||||||
}
|
|
||||||
|
|
||||||
self.ty.write(config, out);
|
self.ty.write(config, out);
|
||||||
write!(out, " {} = ", name);
|
write!(out, " {} = ", name);
|
||||||
value.write(config, out);
|
value.write(config, out);
|
||||||
write!(out, ";");
|
write!(out, ";");
|
||||||
} else {
|
}
|
||||||
write!(out, "#define {} ", name);
|
Language::Cxx | Language::C => {
|
||||||
value.write(config, out);
|
write!(out, "#define {} ", name);
|
||||||
|
value.write(config, out);
|
||||||
|
}
|
||||||
|
Language::Cython => {
|
||||||
|
out.write("const ");
|
||||||
|
self.ty.write(config, out);
|
||||||
|
// For extern Cython declarations the initializer is ignored,
|
||||||
|
// but still useful as documentation, so we write it as a comment.
|
||||||
|
write!(out, " {} # = ", name);
|
||||||
|
value.write(config, out);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
condition.write_after(config, out);
|
condition.write_after(config, out);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -251,6 +251,11 @@ impl Source for EnumVariant {
|
|||||||
self.documentation.write(config, out);
|
self.documentation.write(config, out);
|
||||||
write!(out, "{}", self.export_name);
|
write!(out, "{}", self.export_name);
|
||||||
if let Some(discriminant) = &self.discriminant {
|
if let Some(discriminant) = &self.discriminant {
|
||||||
|
if config.language == Language::Cython {
|
||||||
|
// For extern Cython declarations the enumerator value is ignored,
|
||||||
|
// but still useful as documentation, so we write it as a comment.
|
||||||
|
out.write(" #")
|
||||||
|
}
|
||||||
out.write(" = ");
|
out.write(" = ");
|
||||||
discriminant.write(config, out);
|
discriminant.write(config, out);
|
||||||
}
|
}
|
||||||
|
@ -7,7 +7,7 @@ cdef extern from *:
|
|||||||
cdef extern from *:
|
cdef extern from *:
|
||||||
|
|
||||||
cdef enum:
|
cdef enum:
|
||||||
X = 2,
|
X # = 2,
|
||||||
Y,
|
Y,
|
||||||
ctypedef uint32_t C;
|
ctypedef uint32_t C;
|
||||||
|
|
||||||
|
@ -7,7 +7,7 @@ cdef extern from *:
|
|||||||
cdef extern from *:
|
cdef extern from *:
|
||||||
|
|
||||||
cdef enum:
|
cdef enum:
|
||||||
X = 2,
|
X # = 2,
|
||||||
Y,
|
Y,
|
||||||
ctypedef uint32_t C;
|
ctypedef uint32_t C;
|
||||||
|
|
||||||
|
@ -6,4 +6,4 @@ cdef extern from *:
|
|||||||
|
|
||||||
cdef extern from *:
|
cdef extern from *:
|
||||||
|
|
||||||
const uint32_t Foo_FOO = 42;
|
const uint32_t Foo_FOO # = 42
|
||||||
|
@ -8,7 +8,7 @@ cdef extern from *:
|
|||||||
|
|
||||||
ctypedef struct Foo:
|
ctypedef struct Foo:
|
||||||
pass
|
pass
|
||||||
const int32_t Foo_GA = 10;
|
const int32_t Foo_GA # = 10
|
||||||
const float Foo_ZO = 3.14;
|
const float Foo_ZO # = 3.14
|
||||||
|
|
||||||
void root(Foo x);
|
void root(Foo x);
|
||||||
|
@ -8,7 +8,7 @@ cdef extern from *:
|
|||||||
|
|
||||||
cdef struct Foo:
|
cdef struct Foo:
|
||||||
pass
|
pass
|
||||||
const int32_t Foo_GA = 10;
|
const int32_t Foo_GA # = 10
|
||||||
const float Foo_ZO = 3.14;
|
const float Foo_ZO # = 3.14
|
||||||
|
|
||||||
void root(Foo x);
|
void root(Foo x);
|
||||||
|
@ -12,14 +12,14 @@ cdef extern from *:
|
|||||||
ctypedef struct StyleAlignFlags:
|
ctypedef struct StyleAlignFlags:
|
||||||
uint8_t bits;
|
uint8_t bits;
|
||||||
# 'auto'
|
# 'auto'
|
||||||
const StyleAlignFlags StyleAlignFlags_AUTO = <StyleAlignFlags>{ <uint8_t>0 };
|
const StyleAlignFlags StyleAlignFlags_AUTO # = <StyleAlignFlags>{ <uint8_t>0 }
|
||||||
# 'normal'
|
# 'normal'
|
||||||
const StyleAlignFlags StyleAlignFlags_NORMAL = <StyleAlignFlags>{ <uint8_t>1 };
|
const StyleAlignFlags StyleAlignFlags_NORMAL # = <StyleAlignFlags>{ <uint8_t>1 }
|
||||||
# 'start'
|
# 'start'
|
||||||
const StyleAlignFlags StyleAlignFlags_START = <StyleAlignFlags>{ <uint8_t>(1 << 1) };
|
const StyleAlignFlags StyleAlignFlags_START # = <StyleAlignFlags>{ <uint8_t>(1 << 1) }
|
||||||
# 'end'
|
# 'end'
|
||||||
const StyleAlignFlags StyleAlignFlags_END = <StyleAlignFlags>{ <uint8_t>(1 << 2) };
|
const StyleAlignFlags StyleAlignFlags_END # = <StyleAlignFlags>{ <uint8_t>(1 << 2) }
|
||||||
# 'flex-start'
|
# 'flex-start'
|
||||||
const StyleAlignFlags StyleAlignFlags_FLEX_START = <StyleAlignFlags>{ <uint8_t>(1 << 3) };
|
const StyleAlignFlags StyleAlignFlags_FLEX_START # = <StyleAlignFlags>{ <uint8_t>(1 << 3) }
|
||||||
|
|
||||||
void root(StyleAlignFlags flags);
|
void root(StyleAlignFlags flags);
|
||||||
|
@ -12,14 +12,14 @@ cdef extern from *:
|
|||||||
cdef struct StyleAlignFlags:
|
cdef struct StyleAlignFlags:
|
||||||
uint8_t bits;
|
uint8_t bits;
|
||||||
# 'auto'
|
# 'auto'
|
||||||
const StyleAlignFlags StyleAlignFlags_AUTO = <StyleAlignFlags>{ <uint8_t>0 };
|
const StyleAlignFlags StyleAlignFlags_AUTO # = <StyleAlignFlags>{ <uint8_t>0 }
|
||||||
# 'normal'
|
# 'normal'
|
||||||
const StyleAlignFlags StyleAlignFlags_NORMAL = <StyleAlignFlags>{ <uint8_t>1 };
|
const StyleAlignFlags StyleAlignFlags_NORMAL # = <StyleAlignFlags>{ <uint8_t>1 }
|
||||||
# 'start'
|
# 'start'
|
||||||
const StyleAlignFlags StyleAlignFlags_START = <StyleAlignFlags>{ <uint8_t>(1 << 1) };
|
const StyleAlignFlags StyleAlignFlags_START # = <StyleAlignFlags>{ <uint8_t>(1 << 1) }
|
||||||
# 'end'
|
# 'end'
|
||||||
const StyleAlignFlags StyleAlignFlags_END = <StyleAlignFlags>{ <uint8_t>(1 << 2) };
|
const StyleAlignFlags StyleAlignFlags_END # = <StyleAlignFlags>{ <uint8_t>(1 << 2) }
|
||||||
# 'flex-start'
|
# 'flex-start'
|
||||||
const StyleAlignFlags StyleAlignFlags_FLEX_START = <StyleAlignFlags>{ <uint8_t>(1 << 3) };
|
const StyleAlignFlags StyleAlignFlags_FLEX_START # = <StyleAlignFlags>{ <uint8_t>(1 << 3) }
|
||||||
|
|
||||||
void root(StyleAlignFlags flags);
|
void root(StyleAlignFlags flags);
|
||||||
|
@ -12,19 +12,19 @@ cdef extern from *:
|
|||||||
ctypedef struct AlignFlags:
|
ctypedef struct AlignFlags:
|
||||||
uint8_t bits;
|
uint8_t bits;
|
||||||
# 'auto'
|
# 'auto'
|
||||||
const AlignFlags AlignFlags_AUTO = <AlignFlags>{ <uint8_t>0 };
|
const AlignFlags AlignFlags_AUTO # = <AlignFlags>{ <uint8_t>0 }
|
||||||
# 'normal'
|
# 'normal'
|
||||||
const AlignFlags AlignFlags_NORMAL = <AlignFlags>{ <uint8_t>1 };
|
const AlignFlags AlignFlags_NORMAL # = <AlignFlags>{ <uint8_t>1 }
|
||||||
# 'start'
|
# 'start'
|
||||||
const AlignFlags AlignFlags_START = <AlignFlags>{ <uint8_t>(1 << 1) };
|
const AlignFlags AlignFlags_START # = <AlignFlags>{ <uint8_t>(1 << 1) }
|
||||||
# 'end'
|
# 'end'
|
||||||
const AlignFlags AlignFlags_END = <AlignFlags>{ <uint8_t>(1 << 2) };
|
const AlignFlags AlignFlags_END # = <AlignFlags>{ <uint8_t>(1 << 2) }
|
||||||
# 'flex-start'
|
# 'flex-start'
|
||||||
const AlignFlags AlignFlags_FLEX_START = <AlignFlags>{ <uint8_t>(1 << 3) };
|
const AlignFlags AlignFlags_FLEX_START # = <AlignFlags>{ <uint8_t>(1 << 3) }
|
||||||
|
|
||||||
ctypedef struct DebugFlags:
|
ctypedef struct DebugFlags:
|
||||||
uint32_t bits;
|
uint32_t bits;
|
||||||
# Flag with the topmost bit set of the u32
|
# Flag with the topmost bit set of the u32
|
||||||
const DebugFlags DebugFlags_BIGGEST_ALLOWED = <DebugFlags>{ <uint32_t>(1 << 31) };
|
const DebugFlags DebugFlags_BIGGEST_ALLOWED # = <DebugFlags>{ <uint32_t>(1 << 31) }
|
||||||
|
|
||||||
void root(AlignFlags flags, DebugFlags bigger_flags);
|
void root(AlignFlags flags, DebugFlags bigger_flags);
|
||||||
|
@ -12,19 +12,19 @@ cdef extern from *:
|
|||||||
cdef struct AlignFlags:
|
cdef struct AlignFlags:
|
||||||
uint8_t bits;
|
uint8_t bits;
|
||||||
# 'auto'
|
# 'auto'
|
||||||
const AlignFlags AlignFlags_AUTO = <AlignFlags>{ <uint8_t>0 };
|
const AlignFlags AlignFlags_AUTO # = <AlignFlags>{ <uint8_t>0 }
|
||||||
# 'normal'
|
# 'normal'
|
||||||
const AlignFlags AlignFlags_NORMAL = <AlignFlags>{ <uint8_t>1 };
|
const AlignFlags AlignFlags_NORMAL # = <AlignFlags>{ <uint8_t>1 }
|
||||||
# 'start'
|
# 'start'
|
||||||
const AlignFlags AlignFlags_START = <AlignFlags>{ <uint8_t>(1 << 1) };
|
const AlignFlags AlignFlags_START # = <AlignFlags>{ <uint8_t>(1 << 1) }
|
||||||
# 'end'
|
# 'end'
|
||||||
const AlignFlags AlignFlags_END = <AlignFlags>{ <uint8_t>(1 << 2) };
|
const AlignFlags AlignFlags_END # = <AlignFlags>{ <uint8_t>(1 << 2) }
|
||||||
# 'flex-start'
|
# 'flex-start'
|
||||||
const AlignFlags AlignFlags_FLEX_START = <AlignFlags>{ <uint8_t>(1 << 3) };
|
const AlignFlags AlignFlags_FLEX_START # = <AlignFlags>{ <uint8_t>(1 << 3) }
|
||||||
|
|
||||||
cdef struct DebugFlags:
|
cdef struct DebugFlags:
|
||||||
uint32_t bits;
|
uint32_t bits;
|
||||||
# Flag with the topmost bit set of the u32
|
# Flag with the topmost bit set of the u32
|
||||||
const DebugFlags DebugFlags_BIGGEST_ALLOWED = <DebugFlags>{ <uint32_t>(1 << 31) };
|
const DebugFlags DebugFlags_BIGGEST_ALLOWED # = <DebugFlags>{ <uint32_t>(1 << 31) }
|
||||||
|
|
||||||
void root(AlignFlags flags, DebugFlags bigger_flags);
|
void root(AlignFlags flags, DebugFlags bigger_flags);
|
||||||
|
@ -13,10 +13,10 @@ cdef extern from *:
|
|||||||
cdef extern from *:
|
cdef extern from *:
|
||||||
|
|
||||||
IF NOT_DEFINED:
|
IF NOT_DEFINED:
|
||||||
const int32_t DEFAULT_X = 8;
|
const int32_t DEFAULT_X # = 8
|
||||||
|
|
||||||
IF DEFINED:
|
IF DEFINED:
|
||||||
const int32_t DEFAULT_X = 42;
|
const int32_t DEFAULT_X # = 42
|
||||||
|
|
||||||
IF (NOT_DEFINED or DEFINED):
|
IF (NOT_DEFINED or DEFINED):
|
||||||
ctypedef struct Foo:
|
ctypedef struct Foo:
|
||||||
|
@ -13,10 +13,10 @@ cdef extern from *:
|
|||||||
cdef extern from *:
|
cdef extern from *:
|
||||||
|
|
||||||
IF NOT_DEFINED:
|
IF NOT_DEFINED:
|
||||||
const int32_t DEFAULT_X = 8;
|
const int32_t DEFAULT_X # = 8
|
||||||
|
|
||||||
IF DEFINED:
|
IF DEFINED:
|
||||||
const int32_t DEFAULT_X = 42;
|
const int32_t DEFAULT_X # = 42
|
||||||
|
|
||||||
IF (NOT_DEFINED or DEFINED):
|
IF (NOT_DEFINED or DEFINED):
|
||||||
cdef struct Foo:
|
cdef struct Foo:
|
||||||
|
@ -6,4 +6,4 @@ cdef extern from *:
|
|||||||
|
|
||||||
cdef extern from *:
|
cdef extern from *:
|
||||||
|
|
||||||
const uint32_t Foo_FOO = 42;
|
const uint32_t Foo_FOO # = 42
|
||||||
|
@ -8,4 +8,4 @@ cdef extern from *:
|
|||||||
|
|
||||||
ctypedef uint8_t Transparent;
|
ctypedef uint8_t Transparent;
|
||||||
|
|
||||||
const Transparent FOO = 0;
|
const Transparent FOO # = 0
|
||||||
|
@ -6,46 +6,46 @@ cdef extern from *:
|
|||||||
|
|
||||||
cdef extern from *:
|
cdef extern from *:
|
||||||
|
|
||||||
const int32_t FOO = 10;
|
const int32_t FOO # = 10
|
||||||
|
|
||||||
const uint32_t DELIMITER = ':';
|
const uint32_t DELIMITER # = ':'
|
||||||
|
|
||||||
const uint32_t LEFTCURLY = '{';
|
const uint32_t LEFTCURLY # = '{'
|
||||||
|
|
||||||
const uint32_t QUOTE = '\'';
|
const uint32_t QUOTE # = '\''
|
||||||
|
|
||||||
const uint32_t TAB = '\t';
|
const uint32_t TAB # = '\t'
|
||||||
|
|
||||||
const uint32_t NEWLINE = '\n';
|
const uint32_t NEWLINE # = '\n'
|
||||||
|
|
||||||
const uint32_t HEART = U'\U00002764';
|
const uint32_t HEART # = U'\U00002764'
|
||||||
|
|
||||||
const uint32_t EQUID = U'\U00010083';
|
const uint32_t EQUID # = U'\U00010083'
|
||||||
|
|
||||||
const float ZOM = 3.14;
|
const float ZOM # = 3.14
|
||||||
|
|
||||||
# A single-line doc comment.
|
# A single-line doc comment.
|
||||||
const int8_t POS_ONE = 1;
|
const int8_t POS_ONE # = 1
|
||||||
|
|
||||||
# A
|
# A
|
||||||
# multi-line
|
# multi-line
|
||||||
# doc
|
# doc
|
||||||
# comment.
|
# comment.
|
||||||
const int8_t NEG_ONE = -1;
|
const int8_t NEG_ONE # = -1
|
||||||
|
|
||||||
const int64_t SHIFT = 3;
|
const int64_t SHIFT # = 3
|
||||||
|
|
||||||
const int64_t XBOOL = 1;
|
const int64_t XBOOL # = 1
|
||||||
|
|
||||||
const int64_t XFALSE1 = ((0 << 3) | 1);
|
const int64_t XFALSE1 # = ((0 << 3) | 1)
|
||||||
|
|
||||||
const int64_t XTRUE1 = (1 << (3 | 1));
|
const int64_t XTRUE1 # = (1 << (3 | 1))
|
||||||
|
|
||||||
const int64_t XFALSE2 = (0 << SHIFT);
|
const int64_t XFALSE2 # = (0 << SHIFT)
|
||||||
|
|
||||||
const uint8_t CAST = <uint8_t>'A';
|
const uint8_t CAST # = <uint8_t>'A'
|
||||||
|
|
||||||
const uint32_t DOUBLE_CAST = <uint32_t><float>1;
|
const uint32_t DOUBLE_CAST # = <uint32_t><float>1
|
||||||
|
|
||||||
ctypedef struct Foo:
|
ctypedef struct Foo:
|
||||||
int32_t x[FOO];
|
int32_t x[FOO];
|
||||||
|
@ -6,46 +6,46 @@ cdef extern from *:
|
|||||||
|
|
||||||
cdef extern from *:
|
cdef extern from *:
|
||||||
|
|
||||||
const int32_t FOO = 10;
|
const int32_t FOO # = 10
|
||||||
|
|
||||||
const uint32_t DELIMITER = ':';
|
const uint32_t DELIMITER # = ':'
|
||||||
|
|
||||||
const uint32_t LEFTCURLY = '{';
|
const uint32_t LEFTCURLY # = '{'
|
||||||
|
|
||||||
const uint32_t QUOTE = '\'';
|
const uint32_t QUOTE # = '\''
|
||||||
|
|
||||||
const uint32_t TAB = '\t';
|
const uint32_t TAB # = '\t'
|
||||||
|
|
||||||
const uint32_t NEWLINE = '\n';
|
const uint32_t NEWLINE # = '\n'
|
||||||
|
|
||||||
const uint32_t HEART = U'\U00002764';
|
const uint32_t HEART # = U'\U00002764'
|
||||||
|
|
||||||
const uint32_t EQUID = U'\U00010083';
|
const uint32_t EQUID # = U'\U00010083'
|
||||||
|
|
||||||
const float ZOM = 3.14;
|
const float ZOM # = 3.14
|
||||||
|
|
||||||
# A single-line doc comment.
|
# A single-line doc comment.
|
||||||
const int8_t POS_ONE = 1;
|
const int8_t POS_ONE # = 1
|
||||||
|
|
||||||
# A
|
# A
|
||||||
# multi-line
|
# multi-line
|
||||||
# doc
|
# doc
|
||||||
# comment.
|
# comment.
|
||||||
const int8_t NEG_ONE = -1;
|
const int8_t NEG_ONE # = -1
|
||||||
|
|
||||||
const int64_t SHIFT = 3;
|
const int64_t SHIFT # = 3
|
||||||
|
|
||||||
const int64_t XBOOL = 1;
|
const int64_t XBOOL # = 1
|
||||||
|
|
||||||
const int64_t XFALSE1 = ((0 << 3) | 1);
|
const int64_t XFALSE1 # = ((0 << 3) | 1)
|
||||||
|
|
||||||
const int64_t XTRUE1 = (1 << (3 | 1));
|
const int64_t XTRUE1 # = (1 << (3 | 1))
|
||||||
|
|
||||||
const int64_t XFALSE2 = (0 << SHIFT);
|
const int64_t XFALSE2 # = (0 << SHIFT)
|
||||||
|
|
||||||
const uint8_t CAST = <uint8_t>'A';
|
const uint8_t CAST # = <uint8_t>'A'
|
||||||
|
|
||||||
const uint32_t DOUBLE_CAST = <uint32_t><float>1;
|
const uint32_t DOUBLE_CAST # = <uint32_t><float>1
|
||||||
|
|
||||||
cdef struct Foo:
|
cdef struct Foo:
|
||||||
int32_t x[FOO];
|
int32_t x[FOO];
|
||||||
|
@ -6,10 +6,10 @@ cdef extern from *:
|
|||||||
|
|
||||||
cdef extern from *:
|
cdef extern from *:
|
||||||
|
|
||||||
const uint64_t UNSIGNED_NEEDS_ULL_SUFFIX = 9223372036854775808ULL;
|
const uint64_t UNSIGNED_NEEDS_ULL_SUFFIX # = 9223372036854775808ULL
|
||||||
|
|
||||||
const uint64_t UNSIGNED_DOESNT_NEED_ULL_SUFFIX = 8070450532247928832;
|
const uint64_t UNSIGNED_DOESNT_NEED_ULL_SUFFIX # = 8070450532247928832
|
||||||
|
|
||||||
const int64_t SIGNED_NEEDS_ULL_SUFFIX = -9223372036854775808ULL;
|
const int64_t SIGNED_NEEDS_ULL_SUFFIX # = -9223372036854775808ULL
|
||||||
|
|
||||||
const int64_t SIGNED_DOESNT_NEED_ULL_SUFFIX = -9223372036854775807;
|
const int64_t SIGNED_DOESNT_NEED_ULL_SUFFIX # = -9223372036854775807
|
||||||
|
@ -6,16 +6,16 @@ cdef extern from *:
|
|||||||
|
|
||||||
cdef extern from *:
|
cdef extern from *:
|
||||||
|
|
||||||
const int64_t CONSTANT_I64 = 216;
|
const int64_t CONSTANT_I64 # = 216
|
||||||
|
|
||||||
const float CONSTANT_FLOAT32 = 312.292;
|
const float CONSTANT_FLOAT32 # = 312.292
|
||||||
|
|
||||||
const uint32_t DELIMITER = ':';
|
const uint32_t DELIMITER # = ':'
|
||||||
|
|
||||||
const uint32_t LEFTCURLY = '{';
|
const uint32_t LEFTCURLY # = '{'
|
||||||
|
|
||||||
ctypedef struct Foo:
|
ctypedef struct Foo:
|
||||||
int32_t x;
|
int32_t x;
|
||||||
const int64_t Foo_CONSTANT_I64_BODY = 216;
|
const int64_t Foo_CONSTANT_I64_BODY # = 216
|
||||||
|
|
||||||
const Foo SomeFoo = <Foo>{ 99 };
|
const Foo SomeFoo # = <Foo>{ 99 }
|
||||||
|
@ -6,16 +6,16 @@ cdef extern from *:
|
|||||||
|
|
||||||
cdef extern from *:
|
cdef extern from *:
|
||||||
|
|
||||||
const int64_t CONSTANT_I64 = 216;
|
const int64_t CONSTANT_I64 # = 216
|
||||||
|
|
||||||
const float CONSTANT_FLOAT32 = 312.292;
|
const float CONSTANT_FLOAT32 # = 312.292
|
||||||
|
|
||||||
const uint32_t DELIMITER = ':';
|
const uint32_t DELIMITER # = ':'
|
||||||
|
|
||||||
const uint32_t LEFTCURLY = '{';
|
const uint32_t LEFTCURLY # = '{'
|
||||||
|
|
||||||
cdef struct Foo:
|
cdef struct Foo:
|
||||||
int32_t x;
|
int32_t x;
|
||||||
const int64_t Foo_CONSTANT_I64_BODY = 216;
|
const int64_t Foo_CONSTANT_I64_BODY # = 216
|
||||||
|
|
||||||
const Foo SomeFoo = <Foo>{ 99 };
|
const Foo SomeFoo # = <Foo>{ 99 }
|
||||||
|
@ -6,9 +6,9 @@ cdef extern from *:
|
|||||||
|
|
||||||
cdef extern from *:
|
cdef extern from *:
|
||||||
|
|
||||||
const uint8_t A = 0;
|
const uint8_t A # = 0
|
||||||
|
|
||||||
const uint8_t B = 0;
|
const uint8_t B # = 0
|
||||||
|
|
||||||
extern const uint8_t C;
|
extern const uint8_t C;
|
||||||
|
|
||||||
|
@ -6,9 +6,9 @@ cdef extern from *:
|
|||||||
|
|
||||||
cdef extern from *:
|
cdef extern from *:
|
||||||
|
|
||||||
const uint8_t B = 0;
|
const uint8_t B # = 0
|
||||||
|
|
||||||
const uint8_t A = 0;
|
const uint8_t A # = 0
|
||||||
|
|
||||||
extern const uint8_t D;
|
extern const uint8_t D;
|
||||||
|
|
||||||
|
@ -14,8 +14,8 @@ cdef extern from *:
|
|||||||
|
|
||||||
ctypedef uint8_t A;
|
ctypedef uint8_t A;
|
||||||
|
|
||||||
const S C1 = <S>{ 0 };
|
const S C1 # = <S>{ 0 }
|
||||||
|
|
||||||
const E C2 = V;
|
const E C2 # = V
|
||||||
|
|
||||||
const A C3 = 0;
|
const A C3 # = 0
|
||||||
|
@ -14,8 +14,8 @@ cdef extern from *:
|
|||||||
|
|
||||||
ctypedef uint8_t A;
|
ctypedef uint8_t A;
|
||||||
|
|
||||||
const S C1 = <S>{ 0 };
|
const S C1 # = <S>{ 0 }
|
||||||
|
|
||||||
const E C2 = V;
|
const E C2 # = V
|
||||||
|
|
||||||
const A C3 = 0;
|
const A C3 # = 0
|
||||||
|
@ -7,7 +7,7 @@ cdef extern from *:
|
|||||||
cdef extern from *:
|
cdef extern from *:
|
||||||
|
|
||||||
cdef enum:
|
cdef enum:
|
||||||
X = 2,
|
X # = 2,
|
||||||
Y,
|
Y,
|
||||||
ctypedef uint32_t C;
|
ctypedef uint32_t C;
|
||||||
|
|
||||||
|
@ -7,7 +7,7 @@ cdef extern from *:
|
|||||||
cdef extern from *:
|
cdef extern from *:
|
||||||
|
|
||||||
cdef enum:
|
cdef enum:
|
||||||
X = 2,
|
X # = 2,
|
||||||
Y,
|
Y,
|
||||||
ctypedef uint32_t C;
|
ctypedef uint32_t C;
|
||||||
|
|
||||||
|
@ -7,45 +7,45 @@ cdef extern from *:
|
|||||||
cdef extern from *:
|
cdef extern from *:
|
||||||
|
|
||||||
cdef enum:
|
cdef enum:
|
||||||
a1 = 0,
|
a1 # = 0,
|
||||||
a2 = 2,
|
a2 # = 2,
|
||||||
a3,
|
a3,
|
||||||
a4 = 5,
|
a4 # = 5,
|
||||||
ctypedef uint64_t A;
|
ctypedef uint64_t A;
|
||||||
|
|
||||||
cdef enum:
|
cdef enum:
|
||||||
b1 = 0,
|
b1 # = 0,
|
||||||
b2 = 2,
|
b2 # = 2,
|
||||||
b3,
|
b3,
|
||||||
b4 = 5,
|
b4 # = 5,
|
||||||
ctypedef uint32_t B;
|
ctypedef uint32_t B;
|
||||||
|
|
||||||
cdef enum:
|
cdef enum:
|
||||||
c1 = 0,
|
c1 # = 0,
|
||||||
c2 = 2,
|
c2 # = 2,
|
||||||
c3,
|
c3,
|
||||||
c4 = 5,
|
c4 # = 5,
|
||||||
ctypedef uint16_t C;
|
ctypedef uint16_t C;
|
||||||
|
|
||||||
cdef enum:
|
cdef enum:
|
||||||
d1 = 0,
|
d1 # = 0,
|
||||||
d2 = 2,
|
d2 # = 2,
|
||||||
d3,
|
d3,
|
||||||
d4 = 5,
|
d4 # = 5,
|
||||||
ctypedef uint8_t D;
|
ctypedef uint8_t D;
|
||||||
|
|
||||||
cdef enum:
|
cdef enum:
|
||||||
e1 = 0,
|
e1 # = 0,
|
||||||
e2 = 2,
|
e2 # = 2,
|
||||||
e3,
|
e3,
|
||||||
e4 = 5,
|
e4 # = 5,
|
||||||
ctypedef uintptr_t E;
|
ctypedef uintptr_t E;
|
||||||
|
|
||||||
cdef enum:
|
cdef enum:
|
||||||
f1 = 0,
|
f1 # = 0,
|
||||||
f2 = 2,
|
f2 # = 2,
|
||||||
f3,
|
f3,
|
||||||
f4 = 5,
|
f4 # = 5,
|
||||||
ctypedef intptr_t F;
|
ctypedef intptr_t F;
|
||||||
|
|
||||||
ctypedef enum L:
|
ctypedef enum L:
|
||||||
@ -55,9 +55,9 @@ cdef extern from *:
|
|||||||
l4,
|
l4,
|
||||||
|
|
||||||
cdef enum:
|
cdef enum:
|
||||||
m1 = -1,
|
m1 # = -1,
|
||||||
m2 = 0,
|
m2 # = 0,
|
||||||
m3 = 1,
|
m3 # = 1,
|
||||||
ctypedef int8_t M;
|
ctypedef int8_t M;
|
||||||
|
|
||||||
ctypedef enum N:
|
ctypedef enum N:
|
||||||
|
@ -7,45 +7,45 @@ cdef extern from *:
|
|||||||
cdef extern from *:
|
cdef extern from *:
|
||||||
|
|
||||||
cdef enum:
|
cdef enum:
|
||||||
a1 = 0,
|
a1 # = 0,
|
||||||
a2 = 2,
|
a2 # = 2,
|
||||||
a3,
|
a3,
|
||||||
a4 = 5,
|
a4 # = 5,
|
||||||
ctypedef uint64_t A;
|
ctypedef uint64_t A;
|
||||||
|
|
||||||
cdef enum:
|
cdef enum:
|
||||||
b1 = 0,
|
b1 # = 0,
|
||||||
b2 = 2,
|
b2 # = 2,
|
||||||
b3,
|
b3,
|
||||||
b4 = 5,
|
b4 # = 5,
|
||||||
ctypedef uint32_t B;
|
ctypedef uint32_t B;
|
||||||
|
|
||||||
cdef enum:
|
cdef enum:
|
||||||
c1 = 0,
|
c1 # = 0,
|
||||||
c2 = 2,
|
c2 # = 2,
|
||||||
c3,
|
c3,
|
||||||
c4 = 5,
|
c4 # = 5,
|
||||||
ctypedef uint16_t C;
|
ctypedef uint16_t C;
|
||||||
|
|
||||||
cdef enum:
|
cdef enum:
|
||||||
d1 = 0,
|
d1 # = 0,
|
||||||
d2 = 2,
|
d2 # = 2,
|
||||||
d3,
|
d3,
|
||||||
d4 = 5,
|
d4 # = 5,
|
||||||
ctypedef uint8_t D;
|
ctypedef uint8_t D;
|
||||||
|
|
||||||
cdef enum:
|
cdef enum:
|
||||||
e1 = 0,
|
e1 # = 0,
|
||||||
e2 = 2,
|
e2 # = 2,
|
||||||
e3,
|
e3,
|
||||||
e4 = 5,
|
e4 # = 5,
|
||||||
ctypedef uintptr_t E;
|
ctypedef uintptr_t E;
|
||||||
|
|
||||||
cdef enum:
|
cdef enum:
|
||||||
f1 = 0,
|
f1 # = 0,
|
||||||
f2 = 2,
|
f2 # = 2,
|
||||||
f3,
|
f3,
|
||||||
f4 = 5,
|
f4 # = 5,
|
||||||
ctypedef intptr_t F;
|
ctypedef intptr_t F;
|
||||||
|
|
||||||
cdef enum L:
|
cdef enum L:
|
||||||
@ -55,9 +55,9 @@ cdef extern from *:
|
|||||||
l4,
|
l4,
|
||||||
|
|
||||||
cdef enum:
|
cdef enum:
|
||||||
m1 = -1,
|
m1 # = -1,
|
||||||
m2 = 0,
|
m2 # = 0,
|
||||||
m3 = 1,
|
m3 # = 1,
|
||||||
ctypedef int8_t M;
|
ctypedef int8_t M;
|
||||||
|
|
||||||
cdef enum N:
|
cdef enum N:
|
||||||
|
@ -6,16 +6,16 @@ cdef extern from *:
|
|||||||
|
|
||||||
cdef extern from *:
|
cdef extern from *:
|
||||||
|
|
||||||
const int8_t FOUR = 4;
|
const int8_t FOUR # = 4
|
||||||
|
|
||||||
cdef enum:
|
cdef enum:
|
||||||
A = 1,
|
A # = 1,
|
||||||
B = -1,
|
B # = -1,
|
||||||
C = (1 + 2),
|
C # = (1 + 2),
|
||||||
D = FOUR,
|
D # = FOUR,
|
||||||
F = 5,
|
F # = 5,
|
||||||
G = <int8_t>54,
|
G # = <int8_t>54,
|
||||||
H = <int8_t>False,
|
H # = <int8_t>False,
|
||||||
ctypedef int8_t E;
|
ctypedef int8_t E;
|
||||||
|
|
||||||
void root(const E*);
|
void root(const E*);
|
||||||
|
@ -6,7 +6,7 @@ cdef extern from *:
|
|||||||
|
|
||||||
cdef extern from *:
|
cdef extern from *:
|
||||||
|
|
||||||
const uint8_t EXPORT_ME_TOO = 42;
|
const uint8_t EXPORT_ME_TOO # = 42
|
||||||
|
|
||||||
ctypedef struct ExportMe:
|
ctypedef struct ExportMe:
|
||||||
uint64_t val;
|
uint64_t val;
|
||||||
|
@ -6,7 +6,7 @@ cdef extern from *:
|
|||||||
|
|
||||||
cdef extern from *:
|
cdef extern from *:
|
||||||
|
|
||||||
const uint8_t EXPORT_ME_TOO = 42;
|
const uint8_t EXPORT_ME_TOO # = 42
|
||||||
|
|
||||||
cdef struct ExportMe:
|
cdef struct ExportMe:
|
||||||
uint64_t val;
|
uint64_t val;
|
||||||
|
@ -6,7 +6,7 @@ cdef extern from *:
|
|||||||
|
|
||||||
cdef extern from *:
|
cdef extern from *:
|
||||||
|
|
||||||
const uint8_t EXPORT_ME_TOO = 42;
|
const uint8_t EXPORT_ME_TOO # = 42
|
||||||
|
|
||||||
ctypedef struct ExportMe:
|
ctypedef struct ExportMe:
|
||||||
uint64_t val;
|
uint64_t val;
|
||||||
|
@ -6,7 +6,7 @@ cdef extern from *:
|
|||||||
|
|
||||||
cdef extern from *:
|
cdef extern from *:
|
||||||
|
|
||||||
const uint8_t EXPORT_ME_TOO = 42;
|
const uint8_t EXPORT_ME_TOO # = 42
|
||||||
|
|
||||||
cdef struct ExportMe:
|
cdef struct ExportMe:
|
||||||
uint64_t val;
|
uint64_t val;
|
||||||
|
@ -13,10 +13,10 @@ cdef extern from *:
|
|||||||
cdef extern from *:
|
cdef extern from *:
|
||||||
|
|
||||||
IF FOO:
|
IF FOO:
|
||||||
const int32_t FOO = 1;
|
const int32_t FOO # = 1
|
||||||
|
|
||||||
IF BAR:
|
IF BAR:
|
||||||
const int32_t BAR = 2;
|
const int32_t BAR # = 2
|
||||||
|
|
||||||
IF FOO:
|
IF FOO:
|
||||||
ctypedef struct Foo:
|
ctypedef struct Foo:
|
||||||
|
@ -13,10 +13,10 @@ cdef extern from *:
|
|||||||
cdef extern from *:
|
cdef extern from *:
|
||||||
|
|
||||||
IF FOO:
|
IF FOO:
|
||||||
const int32_t FOO = 1;
|
const int32_t FOO # = 1
|
||||||
|
|
||||||
IF BAR:
|
IF BAR:
|
||||||
const int32_t BAR = 2;
|
const int32_t BAR # = 2
|
||||||
|
|
||||||
IF FOO:
|
IF FOO:
|
||||||
cdef struct Foo:
|
cdef struct Foo:
|
||||||
|
@ -6,7 +6,7 @@ cdef extern from *:
|
|||||||
|
|
||||||
cdef extern from *:
|
cdef extern from *:
|
||||||
|
|
||||||
const uint8_t EXPORT_ME_TOO = 42;
|
const uint8_t EXPORT_ME_TOO # = 42
|
||||||
|
|
||||||
ctypedef struct ExportMe:
|
ctypedef struct ExportMe:
|
||||||
uint64_t val;
|
uint64_t val;
|
||||||
|
@ -6,7 +6,7 @@ cdef extern from *:
|
|||||||
|
|
||||||
cdef extern from *:
|
cdef extern from *:
|
||||||
|
|
||||||
const uint8_t EXPORT_ME_TOO = 42;
|
const uint8_t EXPORT_ME_TOO # = 42
|
||||||
|
|
||||||
cdef struct ExportMe:
|
cdef struct ExportMe:
|
||||||
uint64_t val;
|
uint64_t val;
|
||||||
|
@ -6,9 +6,9 @@ cdef extern from *:
|
|||||||
|
|
||||||
cdef extern from *:
|
cdef extern from *:
|
||||||
|
|
||||||
const int32_t FOO = 10;
|
const int32_t FOO # = 10
|
||||||
|
|
||||||
const float ZOM = 3.14;
|
const float ZOM # = 3.14
|
||||||
|
|
||||||
ctypedef struct Foo:
|
ctypedef struct Foo:
|
||||||
int32_t x[FOO];
|
int32_t x[FOO];
|
||||||
|
@ -6,9 +6,9 @@ cdef extern from *:
|
|||||||
|
|
||||||
cdef extern from *:
|
cdef extern from *:
|
||||||
|
|
||||||
const int32_t FOO = 10;
|
const int32_t FOO # = 10
|
||||||
|
|
||||||
const float ZOM = 3.14;
|
const float ZOM # = 3.14
|
||||||
|
|
||||||
cdef struct Foo:
|
cdef struct Foo:
|
||||||
int32_t x[FOO];
|
int32_t x[FOO];
|
||||||
|
@ -6,9 +6,9 @@ cdef extern from *:
|
|||||||
|
|
||||||
cdef extern from *:
|
cdef extern from *:
|
||||||
|
|
||||||
const int32_t FOO = 10;
|
const int32_t FOO # = 10
|
||||||
|
|
||||||
const float ZOM = 3.14;
|
const float ZOM # = 3.14
|
||||||
|
|
||||||
ctypedef struct Foo:
|
ctypedef struct Foo:
|
||||||
int32_t x[FOO];
|
int32_t x[FOO];
|
||||||
|
@ -6,9 +6,9 @@ cdef extern from *:
|
|||||||
|
|
||||||
cdef extern from *:
|
cdef extern from *:
|
||||||
|
|
||||||
const int32_t FOO = 10;
|
const int32_t FOO # = 10
|
||||||
|
|
||||||
const float ZOM = 3.14;
|
const float ZOM # = 3.14
|
||||||
|
|
||||||
cdef struct Foo:
|
cdef struct Foo:
|
||||||
int32_t x[FOO];
|
int32_t x[FOO];
|
||||||
|
@ -6,13 +6,13 @@ cdef extern from *:
|
|||||||
|
|
||||||
cdef extern from *:
|
cdef extern from *:
|
||||||
|
|
||||||
const int32_t PREFIX_LEN = 22;
|
const int32_t PREFIX_LEN # = 22
|
||||||
|
|
||||||
const int64_t PREFIX_X = (22 << 22);
|
const int64_t PREFIX_X # = (22 << 22)
|
||||||
|
|
||||||
const int64_t PREFIX_Y1 = ((22 << 22) + (22 << 22));
|
const int64_t PREFIX_Y1 # = ((22 << 22) + (22 << 22))
|
||||||
|
|
||||||
const int64_t PREFIX_Y2 = PREFIX_X;
|
const int64_t PREFIX_Y2 # = PREFIX_X
|
||||||
|
|
||||||
ctypedef int32_t PREFIX_NamedLenArray[PREFIX_LEN];
|
ctypedef int32_t PREFIX_NamedLenArray[PREFIX_LEN];
|
||||||
|
|
||||||
|
@ -6,13 +6,13 @@ cdef extern from *:
|
|||||||
|
|
||||||
cdef extern from *:
|
cdef extern from *:
|
||||||
|
|
||||||
const int32_t PREFIX_LEN = 22;
|
const int32_t PREFIX_LEN # = 22
|
||||||
|
|
||||||
const int64_t PREFIX_X = (22 << 22);
|
const int64_t PREFIX_X # = (22 << 22)
|
||||||
|
|
||||||
const int64_t PREFIX_Y1 = ((22 << 22) + (22 << 22));
|
const int64_t PREFIX_Y1 # = ((22 << 22) + (22 << 22))
|
||||||
|
|
||||||
const int64_t PREFIX_Y2 = PREFIX_X;
|
const int64_t PREFIX_Y2 # = PREFIX_X
|
||||||
|
|
||||||
ctypedef int32_t PREFIX_NamedLenArray[PREFIX_LEN];
|
ctypedef int32_t PREFIX_NamedLenArray[PREFIX_LEN];
|
||||||
|
|
||||||
|
@ -9,8 +9,8 @@ cdef extern from *:
|
|||||||
ctypedef struct PREFIXFoo:
|
ctypedef struct PREFIXFoo:
|
||||||
int32_t a;
|
int32_t a;
|
||||||
uint32_t b;
|
uint32_t b;
|
||||||
const PREFIXFoo PREFIXFoo_FOO = <PREFIXFoo>{ 42, 47 };
|
const PREFIXFoo PREFIXFoo_FOO # = <PREFIXFoo>{ 42, 47 }
|
||||||
|
|
||||||
const PREFIXFoo PREFIXBAR = <PREFIXFoo>{ 42, 1337 };
|
const PREFIXFoo PREFIXBAR # = <PREFIXFoo>{ 42, 1337 }
|
||||||
|
|
||||||
void root(PREFIXFoo x);
|
void root(PREFIXFoo x);
|
||||||
|
@ -9,8 +9,8 @@ cdef extern from *:
|
|||||||
cdef struct PREFIXFoo:
|
cdef struct PREFIXFoo:
|
||||||
int32_t a;
|
int32_t a;
|
||||||
uint32_t b;
|
uint32_t b;
|
||||||
const PREFIXFoo PREFIXFoo_FOO = <PREFIXFoo>{ 42, 47 };
|
const PREFIXFoo PREFIXFoo_FOO # = <PREFIXFoo>{ 42, 47 }
|
||||||
|
|
||||||
const PREFIXFoo PREFIXBAR = <PREFIXFoo>{ 42, 1337 };
|
const PREFIXFoo PREFIXBAR # = <PREFIXFoo>{ 42, 1337 }
|
||||||
|
|
||||||
void root(PREFIXFoo x);
|
void root(PREFIXFoo x);
|
||||||
|
@ -14,6 +14,6 @@ cdef extern from *:
|
|||||||
uint32_t b;
|
uint32_t b;
|
||||||
PREFIXBar bar;
|
PREFIXBar bar;
|
||||||
|
|
||||||
const PREFIXFoo PREFIXVAL = <PREFIXFoo>{ 42, 1337, <PREFIXBar>{ 323 } };
|
const PREFIXFoo PREFIXVAL # = <PREFIXFoo>{ 42, 1337, <PREFIXBar>{ 323 } }
|
||||||
|
|
||||||
void root(PREFIXFoo x);
|
void root(PREFIXFoo x);
|
||||||
|
@ -14,6 +14,6 @@ cdef extern from *:
|
|||||||
uint32_t b;
|
uint32_t b;
|
||||||
PREFIXBar bar;
|
PREFIXBar bar;
|
||||||
|
|
||||||
const PREFIXFoo PREFIXVAL = <PREFIXFoo>{ 42, 1337, <PREFIXBar>{ 323 } };
|
const PREFIXFoo PREFIXVAL # = <PREFIXFoo>{ 42, 1337, <PREFIXBar>{ 323 } }
|
||||||
|
|
||||||
void root(PREFIXFoo x);
|
void root(PREFIXFoo x);
|
||||||
|
@ -6,11 +6,11 @@ cdef extern from *:
|
|||||||
|
|
||||||
cdef extern from *:
|
cdef extern from *:
|
||||||
|
|
||||||
const int32_t C_H = 10;
|
const int32_t C_H # = 10
|
||||||
|
|
||||||
cdef enum:
|
cdef enum:
|
||||||
x = 0,
|
x # = 0,
|
||||||
y = 1,
|
y # = 1,
|
||||||
ctypedef uint8_t C_E;
|
ctypedef uint8_t C_E;
|
||||||
|
|
||||||
ctypedef struct C_A:
|
ctypedef struct C_A:
|
||||||
@ -29,7 +29,7 @@ cdef extern from *:
|
|||||||
|
|
||||||
ctypedef C_A C_F;
|
ctypedef C_A C_F;
|
||||||
|
|
||||||
const intptr_t C_I = <intptr_t><C_F*>10;
|
const intptr_t C_I # = <intptr_t><C_F*>10
|
||||||
|
|
||||||
extern const int32_t G;
|
extern const int32_t G;
|
||||||
|
|
||||||
|
@ -6,11 +6,11 @@ cdef extern from *:
|
|||||||
|
|
||||||
cdef extern from *:
|
cdef extern from *:
|
||||||
|
|
||||||
const int32_t C_H = 10;
|
const int32_t C_H # = 10
|
||||||
|
|
||||||
cdef enum:
|
cdef enum:
|
||||||
x = 0,
|
x # = 0,
|
||||||
y = 1,
|
y # = 1,
|
||||||
ctypedef uint8_t C_E;
|
ctypedef uint8_t C_E;
|
||||||
|
|
||||||
cdef struct C_A:
|
cdef struct C_A:
|
||||||
@ -29,7 +29,7 @@ cdef extern from *:
|
|||||||
|
|
||||||
ctypedef C_A C_F;
|
ctypedef C_A C_F;
|
||||||
|
|
||||||
const intptr_t C_I = <intptr_t><C_F*>10;
|
const intptr_t C_I # = <intptr_t><C_F*>10
|
||||||
|
|
||||||
extern const int32_t G;
|
extern const int32_t G;
|
||||||
|
|
||||||
|
@ -12,12 +12,12 @@ cdef extern from *:
|
|||||||
ctypedef struct Foo:
|
ctypedef struct Foo:
|
||||||
int32_t a;
|
int32_t a;
|
||||||
uint32_t b;
|
uint32_t b;
|
||||||
const Foo Foo_FOO = <Foo>{ 42, 47 };
|
const Foo Foo_FOO # = <Foo>{ 42, 47 }
|
||||||
const Foo Foo_FOO2 = <Foo>{ 42, 47 };
|
const Foo Foo_FOO2 # = <Foo>{ 42, 47 }
|
||||||
const Foo Foo_FOO3 = <Foo>{ 42, 47 };
|
const Foo Foo_FOO3 # = <Foo>{ 42, 47 }
|
||||||
|
|
||||||
|
|
||||||
const Foo BAR = <Foo>{ 42, 1337 };
|
const Foo BAR # = <Foo>{ 42, 1337 }
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
@ -12,12 +12,12 @@ cdef extern from *:
|
|||||||
cdef struct Foo:
|
cdef struct Foo:
|
||||||
int32_t a;
|
int32_t a;
|
||||||
uint32_t b;
|
uint32_t b;
|
||||||
const Foo Foo_FOO = <Foo>{ 42, 47 };
|
const Foo Foo_FOO # = <Foo>{ 42, 47 }
|
||||||
const Foo Foo_FOO2 = <Foo>{ 42, 47 };
|
const Foo Foo_FOO2 # = <Foo>{ 42, 47 }
|
||||||
const Foo Foo_FOO3 = <Foo>{ 42, 47 };
|
const Foo Foo_FOO3 # = <Foo>{ 42, 47 }
|
||||||
|
|
||||||
|
|
||||||
const Foo BAR = <Foo>{ 42, 1337 };
|
const Foo BAR # = <Foo>{ 42, 1337 }
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
@ -10,16 +10,16 @@ cdef extern from *:
|
|||||||
float a;
|
float a;
|
||||||
uint32_t b;
|
uint32_t b;
|
||||||
uint32_t c;
|
uint32_t c;
|
||||||
const ABC ABC_abc = <ABC>{ 1.0, 2, 3 };
|
const ABC ABC_abc # = <ABC>{ 1.0, 2, 3 }
|
||||||
const ABC ABC_bac = <ABC>{ 1.0, 2, 3 };
|
const ABC ABC_bac # = <ABC>{ 1.0, 2, 3 }
|
||||||
const ABC ABC_cba = <ABC>{ 1.0, 2, 3 };
|
const ABC ABC_cba # = <ABC>{ 1.0, 2, 3 }
|
||||||
|
|
||||||
ctypedef struct BAC:
|
ctypedef struct BAC:
|
||||||
uint32_t b;
|
uint32_t b;
|
||||||
float a;
|
float a;
|
||||||
int32_t c;
|
int32_t c;
|
||||||
const BAC BAC_abc = <BAC>{ 1, 2.0, 3 };
|
const BAC BAC_abc # = <BAC>{ 1, 2.0, 3 }
|
||||||
const BAC BAC_bac = <BAC>{ 1, 2.0, 3 };
|
const BAC BAC_bac # = <BAC>{ 1, 2.0, 3 }
|
||||||
const BAC BAC_cba = <BAC>{ 1, 2.0, 3 };
|
const BAC BAC_cba # = <BAC>{ 1, 2.0, 3 }
|
||||||
|
|
||||||
void root(ABC a1, BAC a2);
|
void root(ABC a1, BAC a2);
|
||||||
|
@ -10,16 +10,16 @@ cdef extern from *:
|
|||||||
float a;
|
float a;
|
||||||
uint32_t b;
|
uint32_t b;
|
||||||
uint32_t c;
|
uint32_t c;
|
||||||
const ABC ABC_abc = <ABC>{ 1.0, 2, 3 };
|
const ABC ABC_abc # = <ABC>{ 1.0, 2, 3 }
|
||||||
const ABC ABC_bac = <ABC>{ 1.0, 2, 3 };
|
const ABC ABC_bac # = <ABC>{ 1.0, 2, 3 }
|
||||||
const ABC ABC_cba = <ABC>{ 1.0, 2, 3 };
|
const ABC ABC_cba # = <ABC>{ 1.0, 2, 3 }
|
||||||
|
|
||||||
cdef struct BAC:
|
cdef struct BAC:
|
||||||
uint32_t b;
|
uint32_t b;
|
||||||
float a;
|
float a;
|
||||||
int32_t c;
|
int32_t c;
|
||||||
const BAC BAC_abc = <BAC>{ 1, 2.0, 3 };
|
const BAC BAC_abc # = <BAC>{ 1, 2.0, 3 }
|
||||||
const BAC BAC_bac = <BAC>{ 1, 2.0, 3 };
|
const BAC BAC_bac # = <BAC>{ 1, 2.0, 3 }
|
||||||
const BAC BAC_cba = <BAC>{ 1, 2.0, 3 };
|
const BAC BAC_cba # = <BAC>{ 1, 2.0, 3 }
|
||||||
|
|
||||||
void root(ABC a1, BAC a2);
|
void root(ABC a1, BAC a2);
|
||||||
|
@ -25,10 +25,10 @@ cdef extern from *:
|
|||||||
ctypedef uint32_t TransparentPrimitiveWrapper_i32;
|
ctypedef uint32_t TransparentPrimitiveWrapper_i32;
|
||||||
|
|
||||||
ctypedef uint32_t TransparentPrimitiveWithAssociatedConstants;
|
ctypedef uint32_t TransparentPrimitiveWithAssociatedConstants;
|
||||||
const TransparentPrimitiveWithAssociatedConstants TransparentPrimitiveWithAssociatedConstants_ZERO = 0;
|
const TransparentPrimitiveWithAssociatedConstants TransparentPrimitiveWithAssociatedConstants_ZERO # = 0
|
||||||
const TransparentPrimitiveWithAssociatedConstants TransparentPrimitiveWithAssociatedConstants_ONE = 1;
|
const TransparentPrimitiveWithAssociatedConstants TransparentPrimitiveWithAssociatedConstants_ONE # = 1
|
||||||
|
|
||||||
const TransparentPrimitiveWrappingStructure EnumWithAssociatedConstantInImpl_TEN = 10;
|
const TransparentPrimitiveWrappingStructure EnumWithAssociatedConstantInImpl_TEN # = 10
|
||||||
|
|
||||||
void root(TransparentComplexWrappingStructTuple a,
|
void root(TransparentComplexWrappingStructTuple a,
|
||||||
TransparentPrimitiveWrappingStructTuple b,
|
TransparentPrimitiveWrappingStructTuple b,
|
||||||
|
@ -25,10 +25,10 @@ cdef extern from *:
|
|||||||
ctypedef uint32_t TransparentPrimitiveWrapper_i32;
|
ctypedef uint32_t TransparentPrimitiveWrapper_i32;
|
||||||
|
|
||||||
ctypedef uint32_t TransparentPrimitiveWithAssociatedConstants;
|
ctypedef uint32_t TransparentPrimitiveWithAssociatedConstants;
|
||||||
const TransparentPrimitiveWithAssociatedConstants TransparentPrimitiveWithAssociatedConstants_ZERO = 0;
|
const TransparentPrimitiveWithAssociatedConstants TransparentPrimitiveWithAssociatedConstants_ZERO # = 0
|
||||||
const TransparentPrimitiveWithAssociatedConstants TransparentPrimitiveWithAssociatedConstants_ONE = 1;
|
const TransparentPrimitiveWithAssociatedConstants TransparentPrimitiveWithAssociatedConstants_ONE # = 1
|
||||||
|
|
||||||
const TransparentPrimitiveWrappingStructure EnumWithAssociatedConstantInImpl_TEN = 10;
|
const TransparentPrimitiveWrappingStructure EnumWithAssociatedConstantInImpl_TEN # = 10
|
||||||
|
|
||||||
void root(TransparentComplexWrappingStructTuple a,
|
void root(TransparentComplexWrappingStructTuple a,
|
||||||
TransparentPrimitiveWrappingStructTuple b,
|
TransparentPrimitiveWrappingStructTuple b,
|
||||||
|
@ -6,7 +6,7 @@ cdef extern from *:
|
|||||||
|
|
||||||
cdef extern from *:
|
cdef extern from *:
|
||||||
|
|
||||||
const int32_t EXT_CONST = 0;
|
const int32_t EXT_CONST # = 0
|
||||||
|
|
||||||
ctypedef struct ExtType:
|
ctypedef struct ExtType:
|
||||||
uint32_t data;
|
uint32_t data;
|
||||||
|
@ -6,7 +6,7 @@ cdef extern from *:
|
|||||||
|
|
||||||
cdef extern from *:
|
cdef extern from *:
|
||||||
|
|
||||||
const int32_t EXT_CONST = 0;
|
const int32_t EXT_CONST # = 0
|
||||||
|
|
||||||
cdef struct ExtType:
|
cdef struct ExtType:
|
||||||
uint32_t data;
|
uint32_t data;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user