Skip to content

Commit e846ef2

Browse files
committed
Merge pull request #12 from madsmtm/pointer-width-16
Support architectures with pointer width 16
2 parents b697ca5 + cb2cb7b commit e846ef2

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

objc_encode/src/encode.rs

+6
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,9 @@ encode_impls!(
4040
);
4141

4242
unsafe impl Encode for isize {
43+
#[cfg(target_pointer_width = "16")]
44+
const ENCODING: Encoding<'static> = i16::ENCODING;
45+
4346
#[cfg(target_pointer_width = "32")]
4447
const ENCODING: Encoding<'static> = i32::ENCODING;
4548

@@ -48,6 +51,9 @@ unsafe impl Encode for isize {
4851
}
4952

5053
unsafe impl Encode for usize {
54+
#[cfg(target_pointer_width = "16")]
55+
const ENCODING: Encoding<'static> = u16::ENCODING;
56+
5157
#[cfg(target_pointer_width = "32")]
5258
const ENCODING: Encoding<'static> = u32::ENCODING;
5359

0 commit comments

Comments
 (0)