Patchwork D6473: rust-dirstate: architecture independence fix

login
register
mail settings
Submitter phabricator
Date June 3, 2019, 12:49 p.m.
Message ID <differential-rev-PHID-DREV-cq6ehhvhg3rcdxcrbdrr-req@phab.mercurial-scm.org>
Download mbox | patch
Permalink /patch/40301/
State Superseded
Headers show

Comments

phabricator - June 3, 2019, 12:49 p.m.
gracinet created this revision.
Herald added subscribers: mercurial-devel, kevincox, durin42.
Herald added a reviewer: hg-reviewers.

REVISION SUMMARY
  Apparently, c_char is u8 on ppc64le and i8 on amd64

REPOSITORY
  rHG Mercurial

REVISION DETAIL
  https://phab.mercurial-scm.org/D6473

AFFECTED FILES
  rust/hg-cpython/src/dirstate.rs

CHANGE DETAILS




To: gracinet, #hg-reviewers
Cc: durin42, kevincox, mercurial-devel

Patch

diff --git a/rust/hg-cpython/src/dirstate.rs b/rust/hg-cpython/src/dirstate.rs
--- a/rust/hg-cpython/src/dirstate.rs
+++ b/rust/hg-cpython/src/dirstate.rs
@@ -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,
                     ),
                 )?;
             }