chaokunyang commented on code in PR #3080:
URL: https://github.com/apache/fory/pull/3080#discussion_r2643704515


##########
rust/fory-core/src/buffer.rs:
##########
@@ -192,6 +192,16 @@ impl<'a> Writer<'a> {
         }
     }
 
+    #[inline(always)]
+    pub fn write_i128(&mut self, value: i128) {
+        self.write_u128(value as u128);
+    }
+
+    #[inline(always)]
+    pub fn write_isize(&mut self, value: isize) {
+        self.write_i64(value as i64);

Review Comment:
   isize has different size on different architecture, could we use const to 
dispatch to different codepath. 
   
   - When it's 2 bytes, use write_u16
   - When it's 4 bhtes, use write_varu32
   - When it's 8 bhtes, use write_varu64
   
   And for serializer in number.rs, we choose type id `u16/32/64` instead?



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to