]> git.lizzy.rs Git - rust.git/commitdiff
make memcmp return a value of c_int_width instead of i32
authorDavid Morrison <drmorr@evokewonder.com>
Thu, 11 Nov 2021 04:14:23 +0000 (20:14 -0800)
committerDavid Morrison <drmorr@evokewonder.com>
Sun, 3 Apr 2022 00:21:08 +0000 (17:21 -0700)
src/common.rs

index 61709dd92de7961e17524100ae7bdbfe02ac1f15..19127c7612d8f5ad36d2600bd9daf91b48f393c9 100644 (file)
@@ -91,6 +91,10 @@ fn const_bool(&self, val: bool) -> RValue<'gcc> {
         self.const_uint(self.type_i1(), val as u64)
     }
 
+    fn const_i16(&self, i: i16) -> RValue<'gcc> {
+        self.const_int(self.type_i16(), i as i64)
+    }
+
     fn const_i32(&self, i: i32) -> RValue<'gcc> {
         self.const_int(self.type_i32(), i as i64)
     }