Show More
@@ -31,12 +31,12 b' use std::convert::TryFrom;' | |||
|
31 | 31 | use std::ffi::CStr; |
|
32 | 32 | use std::mem::transmute; |
|
33 | 33 | |
|
34 |
// |
|
|
35 |
// |
|
|
36 |
// |
|
|
37 |
// |
|
|
38 |
// |
|
|
39 |
// |
|
|
34 | // C code uses a custom `dirstate_tuple` type, checks in multiple instances | |
|
35 | // for this type, and raises a Python `Exception` if the check does not pass. | |
|
36 | // Because this type differs only in name from the regular Python tuple, it | |
|
37 | // would be a good idea in the near future to remove it entirely to allow | |
|
38 | // for a pure Python tuple of the same effective structure to be used, | |
|
39 | // rendering this type and the capsule below useless. | |
|
40 | 40 | type MakeDirstateTupleFn = unsafe extern "C" fn( |
|
41 | 41 | state: c_char, |
|
42 | 42 | mode: c_int, |
@@ -44,9 +44,9 b' type MakeDirstateTupleFn = unsafe extern' | |||
|
44 | 44 | mtime: c_int, |
|
45 | 45 | ) -> *mut python_sys::PyObject; |
|
46 | 46 | |
|
47 |
// |
|
|
48 |
// |
|
|
49 |
// |
|
|
47 | // This is largely a copy/paste from cindex.rs, pending the merge of a | |
|
48 | // `py_capsule_fn!` macro in the rust-cpython project: | |
|
49 | // https://github.com/dgrunwald/rust-cpython/pull/169 | |
|
50 | 50 | fn decapsule_make_dirstate_tuple(py: Python) -> PyResult<MakeDirstateTupleFn> { |
|
51 | 51 | unsafe { |
|
52 | 52 | let caps_name = CStr::from_bytes_with_nul_unchecked( |
General Comments 0
You need to be logged in to leave comments.
Login now