Skip to content

Commit 35c101f

Browse files
committed
Remove bindgen layout tests
Layout tests assume layouts for current platform, and thus fail on 32-bit platforms.
1 parent 7070836 commit 35c101f

File tree

2 files changed

+1
-119
lines changed

2 files changed

+1
-119
lines changed

misc/run_bindgen.sh

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ bindgen wrapper.h \
1515
--with-derive-default \
1616
--disable-header-comment \
1717
--no-doc-comments \
18+
--no-layout-tests \
1819
--use-core \
1920
--generate-cstr \
2021
--sort-semantically \

rust/src/c.rs

Lines changed: 0 additions & 119 deletions
Original file line numberDiff line numberDiff line change
@@ -140,131 +140,12 @@ pub const GG_MAX_OBJECT_DEPTH: u32 = 15;
140140
pub const GG_MAX_OBJECT_SUBOBJECTS: u32 = 255;
141141
pub const GG_IPC_MAX_STREAMS: u32 = 16;
142142
pub const GG_IPC_RESPONSE_TIMEOUT: u32 = 10;
143-
#[allow(clippy::unnecessary_operation, clippy::identity_op)]
144-
const _: () = {
145-
["Size of GgBuffer"][::core::mem::size_of::<GgBuffer>() - 16usize];
146-
["Alignment of GgBuffer"][::core::mem::align_of::<GgBuffer>() - 8usize];
147-
["Offset of field: GgBuffer::data"]
148-
[::core::mem::offset_of!(GgBuffer, data) - 0usize];
149-
["Offset of field: GgBuffer::len"]
150-
[::core::mem::offset_of!(GgBuffer, len) - 8usize];
151-
};
152-
#[allow(clippy::unnecessary_operation, clippy::identity_op)]
153-
const _: () = {
154-
["Size of GgBufList"][::core::mem::size_of::<GgBufList>() - 16usize];
155-
["Alignment of GgBufList"][::core::mem::align_of::<GgBufList>() - 8usize];
156-
["Offset of field: GgBufList::bufs"]
157-
[::core::mem::offset_of!(GgBufList, bufs) - 0usize];
158-
["Offset of field: GgBufList::len"]
159-
[::core::mem::offset_of!(GgBufList, len) - 8usize];
160-
};
161-
#[allow(clippy::unnecessary_operation, clippy::identity_op)]
162-
const _: () = {
163-
["Size of GgObject"][::core::mem::size_of::<GgObject>() - 11usize];
164-
["Alignment of GgObject"][::core::mem::align_of::<GgObject>() - 1usize];
165-
["Offset of field: GgObject::_private"]
166-
[::core::mem::offset_of!(GgObject, _private) - 0usize];
167-
};
168-
#[allow(clippy::unnecessary_operation, clippy::identity_op)]
169-
const _: () = {
170-
["Size of GgList"][::core::mem::size_of::<GgList>() - 16usize];
171-
["Alignment of GgList"][::core::mem::align_of::<GgList>() - 8usize];
172-
["Offset of field: GgList::items"]
173-
[::core::mem::offset_of!(GgList, items) - 0usize];
174-
["Offset of field: GgList::len"]
175-
[::core::mem::offset_of!(GgList, len) - 8usize];
176-
};
177-
#[allow(clippy::unnecessary_operation, clippy::identity_op)]
178-
const _: () = {
179-
["Size of GgKV"][::core::mem::size_of::<GgKV>() - 21usize];
180-
["Alignment of GgKV"][::core::mem::align_of::<GgKV>() - 1usize];
181-
["Offset of field: GgKV::_private"]
182-
[::core::mem::offset_of!(GgKV, _private) - 0usize];
183-
};
184-
#[allow(clippy::unnecessary_operation, clippy::identity_op)]
185-
const _: () = {
186-
["Size of GgMap"][::core::mem::size_of::<GgMap>() - 16usize];
187-
["Alignment of GgMap"][::core::mem::align_of::<GgMap>() - 8usize];
188-
["Offset of field: GgMap::pairs"]
189-
[::core::mem::offset_of!(GgMap, pairs) - 0usize];
190-
["Offset of field: GgMap::len"]
191-
[::core::mem::offset_of!(GgMap, len) - 8usize];
192-
};
193-
#[allow(clippy::unnecessary_operation, clippy::identity_op)]
194-
const _: () = {
195-
["Size of GgArena"][::core::mem::size_of::<GgArena>() - 16usize];
196-
["Alignment of GgArena"][::core::mem::align_of::<GgArena>() - 8usize];
197-
["Offset of field: GgArena::mem"]
198-
[::core::mem::offset_of!(GgArena, mem) - 0usize];
199-
["Offset of field: GgArena::capacity"]
200-
[::core::mem::offset_of!(GgArena, capacity) - 8usize];
201-
["Offset of field: GgArena::index"]
202-
[::core::mem::offset_of!(GgArena, index) - 12usize];
203-
};
204-
#[allow(clippy::unnecessary_operation, clippy::identity_op)]
205-
const _: () = {
206-
["Size of GgArenaState"][::core::mem::size_of::<GgArenaState>() - 4usize];
207-
["Alignment of GgArenaState"]
208-
[::core::mem::align_of::<GgArenaState>() - 4usize];
209-
["Offset of field: GgArenaState::index"]
210-
[::core::mem::offset_of!(GgArenaState, index) - 0usize];
211-
};
212-
#[allow(clippy::unnecessary_operation, clippy::identity_op)]
213-
const _: () = {
214-
["Size of GgIpcSubscriptionHandle"]
215-
[::core::mem::size_of::<GgIpcSubscriptionHandle>() - 4usize];
216-
["Alignment of GgIpcSubscriptionHandle"]
217-
[::core::mem::align_of::<GgIpcSubscriptionHandle>() - 4usize];
218-
["Offset of field: GgIpcSubscriptionHandle::val"]
219-
[::core::mem::offset_of!(GgIpcSubscriptionHandle, val) - 0usize];
220-
};
221143
pub const GgPresence_GG_PRESENCE_REQUIRED: GgPresence__bindgen_ty_1 =
222144
GgPresence__bindgen_ty_1::GG_PRESENCE_REQUIRED;
223145
pub const GgPresence_GG_PRESENCE_OPTIONAL: GgPresence__bindgen_ty_1 =
224146
GgPresence__bindgen_ty_1::GG_PRESENCE_OPTIONAL;
225147
pub const GgPresence_GG_PRESENCE_MISSING: GgPresence__bindgen_ty_1 =
226148
GgPresence__bindgen_ty_1::GG_PRESENCE_MISSING;
227-
#[allow(clippy::unnecessary_operation, clippy::identity_op)]
228-
const _: () = {
229-
["Size of GgPresence"][::core::mem::size_of::<GgPresence>() - 4usize];
230-
["Alignment of GgPresence"][::core::mem::align_of::<GgPresence>() - 4usize];
231-
["Offset of field: GgPresence::val"]
232-
[::core::mem::offset_of!(GgPresence, val) - 0usize];
233-
};
234-
#[allow(clippy::unnecessary_operation, clippy::identity_op)]
235-
const _: () = {
236-
["Size of GgMapSchemaEntry"]
237-
[::core::mem::size_of::<GgMapSchemaEntry>() - 32usize];
238-
["Alignment of GgMapSchemaEntry"]
239-
[::core::mem::align_of::<GgMapSchemaEntry>() - 8usize];
240-
["Offset of field: GgMapSchemaEntry::key"]
241-
[::core::mem::offset_of!(GgMapSchemaEntry, key) - 0usize];
242-
["Offset of field: GgMapSchemaEntry::required"]
243-
[::core::mem::offset_of!(GgMapSchemaEntry, required) - 16usize];
244-
["Offset of field: GgMapSchemaEntry::type_"]
245-
[::core::mem::offset_of!(GgMapSchemaEntry, type_) - 20usize];
246-
["Offset of field: GgMapSchemaEntry::value"]
247-
[::core::mem::offset_of!(GgMapSchemaEntry, value) - 24usize];
248-
};
249-
#[allow(clippy::unnecessary_operation, clippy::identity_op)]
250-
const _: () = {
251-
["Size of GgMapSchema"][::core::mem::size_of::<GgMapSchema>() - 16usize];
252-
["Alignment of GgMapSchema"]
253-
[::core::mem::align_of::<GgMapSchema>() - 8usize];
254-
["Offset of field: GgMapSchema::entries"]
255-
[::core::mem::offset_of!(GgMapSchema, entries) - 0usize];
256-
["Offset of field: GgMapSchema::entry_count"]
257-
[::core::mem::offset_of!(GgMapSchema, entry_count) - 8usize];
258-
};
259-
#[allow(clippy::unnecessary_operation, clippy::identity_op)]
260-
const _: () = {
261-
["Size of timespec"][::core::mem::size_of::<timespec>() - 16usize];
262-
["Alignment of timespec"][::core::mem::align_of::<timespec>() - 8usize];
263-
["Offset of field: timespec::tv_sec"]
264-
[::core::mem::offset_of!(timespec, tv_sec) - 0usize];
265-
["Offset of field: timespec::tv_nsec"]
266-
[::core::mem::offset_of!(timespec, tv_nsec) - 8usize];
267-
};
268149
#[repr(u32)]
269150
#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]
270151
pub enum GgError {

0 commit comments

Comments
 (0)