Skip to content

Commit

Permalink
Add support for u128/i128. Fixes m4b#31.
Browse files Browse the repository at this point in the history
This change adds u128 and i128 to the list of primitive types that get
implementations of all the basic scroll traits.
  • Loading branch information
luser committed Sep 7, 2018
1 parent 3d5f64d commit 36494a6
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions src/ctx.rs
Original file line number Diff line number Diff line change
Expand Up @@ -163,6 +163,8 @@ macro_rules! signed_to_unsigned {
(u32) => {u32};
(i64) => {u64};
(u64) => {u64};
(i128) => {u128};
(u128) => {u128};
(f32) => {u32};
(f64) => {u64};
}
Expand Down Expand Up @@ -274,6 +276,8 @@ ctx_impl!(u32, 4);
ctx_impl!(i32, 4);
ctx_impl!(u64, 8);
ctx_impl!(i64, 8);
ctx_impl!(u128, 16);
ctx_impl!(i128, 16);

macro_rules! from_ctx_float_impl {
($typ:tt, $size:expr) => {
Expand Down Expand Up @@ -318,6 +322,8 @@ into_ctx_impl!(u32, 4);
into_ctx_impl!(i32, 4);
into_ctx_impl!(u64, 8);
into_ctx_impl!(i64, 8);
into_ctx_impl!(u128, 16);
into_ctx_impl!(i128, 16);

macro_rules! into_ctx_float_impl {
($typ:tt, $size:expr) => {
Expand Down Expand Up @@ -440,6 +446,8 @@ sizeof_impl!(u32);
sizeof_impl!(i32);
sizeof_impl!(u64);
sizeof_impl!(i64);
sizeof_impl!(u128);
sizeof_impl!(i128);
sizeof_impl!(f32);
sizeof_impl!(f64);
sizeof_impl!(usize);
Expand Down

0 comments on commit 36494a6

Please sign in to comment.