rust-dirstate: architecture independence fix
authorGeorges Racinet <georges.racinet@octobus.net>
Wed, 22 May 2019 08:27:02 +0000
changeset 42427 4e4fa3a95406
parent 42426 602469a91550
child 42428 72522fe7fb95
rust-dirstate: architecture independence fix Apparently, c_char is u8 on ppc64le and i8 on amd64 Differential Revision: https://phab.mercurial-scm.org/D6473
rust/hg-cpython/src/dirstate.rs
--- a/rust/hg-cpython/src/dirstate.rs	Tue May 14 22:20:10 2019 -0700
+++ b/rust/hg-cpython/src/dirstate.rs	Wed May 22 08:27:02 2019 +0000
@@ -70,7 +70,7 @@
                     py,
                     PyBytes::new(py, &filename[..]),
                     decapsule_make_dirstate_tuple(py)?(
-                        entry.state,
+                        entry.state as c_char,
                         entry.mode,
                         entry.size,
                         entry.mtime,
@@ -170,7 +170,7 @@
                     py,
                     PyBytes::new(py, &filename[..]),
                     decapsule_make_dirstate_tuple(py)?(
-                        state, mode, size, mtime,
+                        state as c_char, mode, size, mtime,
                     ),
                 )?;
             }