2018-11-13 05:08:37 -08:00
|
|
|
pub const CInt = struct {
|
2018-07-18 21:08:47 -07:00
|
|
|
id: Id,
|
|
|
|
zig_name: []const u8,
|
|
|
|
c_name: []const u8,
|
|
|
|
is_signed: bool,
|
|
|
|
|
2018-11-13 05:08:37 -08:00
|
|
|
pub const Id = enum {
|
2018-07-18 21:08:47 -07:00
|
|
|
Short,
|
|
|
|
UShort,
|
|
|
|
Int,
|
|
|
|
UInt,
|
|
|
|
Long,
|
|
|
|
ULong,
|
|
|
|
LongLong,
|
|
|
|
ULongLong,
|
|
|
|
};
|
|
|
|
|
2018-11-13 05:08:37 -08:00
|
|
|
pub const list = []CInt{
|
|
|
|
CInt{
|
2018-07-18 21:08:47 -07:00
|
|
|
.id = Id.Short,
|
|
|
|
.zig_name = "c_short",
|
|
|
|
.c_name = "short",
|
|
|
|
.is_signed = true,
|
|
|
|
},
|
2018-11-13 05:08:37 -08:00
|
|
|
CInt{
|
2018-07-18 21:08:47 -07:00
|
|
|
.id = Id.UShort,
|
|
|
|
.zig_name = "c_ushort",
|
|
|
|
.c_name = "unsigned short",
|
|
|
|
.is_signed = false,
|
|
|
|
},
|
2018-11-13 05:08:37 -08:00
|
|
|
CInt{
|
2018-07-18 21:08:47 -07:00
|
|
|
.id = Id.Int,
|
|
|
|
.zig_name = "c_int",
|
|
|
|
.c_name = "int",
|
|
|
|
.is_signed = true,
|
|
|
|
},
|
2018-11-13 05:08:37 -08:00
|
|
|
CInt{
|
2018-07-18 21:08:47 -07:00
|
|
|
.id = Id.UInt,
|
|
|
|
.zig_name = "c_uint",
|
|
|
|
.c_name = "unsigned int",
|
|
|
|
.is_signed = false,
|
|
|
|
},
|
2018-11-13 05:08:37 -08:00
|
|
|
CInt{
|
2018-07-18 21:08:47 -07:00
|
|
|
.id = Id.Long,
|
|
|
|
.zig_name = "c_long",
|
|
|
|
.c_name = "long",
|
|
|
|
.is_signed = true,
|
|
|
|
},
|
2018-11-13 05:08:37 -08:00
|
|
|
CInt{
|
2018-07-18 21:08:47 -07:00
|
|
|
.id = Id.ULong,
|
|
|
|
.zig_name = "c_ulong",
|
|
|
|
.c_name = "unsigned long",
|
|
|
|
.is_signed = false,
|
|
|
|
},
|
2018-11-13 05:08:37 -08:00
|
|
|
CInt{
|
2018-07-18 21:08:47 -07:00
|
|
|
.id = Id.LongLong,
|
|
|
|
.zig_name = "c_longlong",
|
|
|
|
.c_name = "long long",
|
|
|
|
.is_signed = true,
|
|
|
|
},
|
2018-11-13 05:08:37 -08:00
|
|
|
CInt{
|
2018-07-18 21:08:47 -07:00
|
|
|
.id = Id.ULongLong,
|
|
|
|
.zig_name = "c_ulonglong",
|
|
|
|
.c_name = "unsigned long long",
|
|
|
|
.is_signed = false,
|
|
|
|
},
|
|
|
|
};
|
|
|
|
};
|