Mercurial > hg
view rust/hg-core/Cargo.toml @ 50303:0d3690f8ce2a stable
cext: fix for PyLong refactoring in CPython 3.12
Compiling Mercurial with Python 3.12 a5 would fail with:
mercurial/cext/dirs.c: In function '_addpath':
mercurial/cext/dirs.c:19:44: error: 'PyLongObject' {aka 'struct _longobject'} has no member named 'ob_digit'
19 | #define PYLONG_VALUE(o) ((PyLongObject *)o)->ob_digit[0]
| ^~
mercurial/cext/dirs.c:97:25: note: in expansion of macro 'PYLONG_VALUE'
97 | PYLONG_VALUE(val) += 1;
| ^~~~~~~~~~~~
mercurial/cext/dirs.c:19:44: error: 'PyLongObject' {aka 'struct _longobject'} has no member named 'ob_digit'
19 | #define PYLONG_VALUE(o) ((PyLongObject *)o)->ob_digit[0]
| ^~
mercurial/cext/dirs.c:108:17: note: in expansion of macro 'PYLONG_VALUE'
108 | PYLONG_VALUE(val) = 1;
| ^~~~~~~~~~~~
mercurial/cext/dirs.c: In function '_delpath':
mercurial/cext/dirs.c:19:44: error: 'PyLongObject' {aka 'struct _longobject'} has no member named 'ob_digit'
19 | #define PYLONG_VALUE(o) ((PyLongObject *)o)->ob_digit[0]
| ^~
mercurial/cext/dirs.c:145:23: note: in expansion of macro 'PYLONG_VALUE'
145 | if (--PYLONG_VALUE(val) <= 0) {
| ^~~~~~~~~~~~
This was caused by
https://github.com/python/cpython/commit/c1b1f51cd1632f0b77dacd43092fb44ed5e053a9 .
author | Mads Kiilerich <mads@kiilerich.com> |
---|---|
date | Tue, 07 Mar 2023 16:25:51 +0100 |
parents | dd12fc49f9e6 |
children | 2cc5de261d76 |
line wrap: on
line source
[package] name = "hg-core" version = "0.1.0" authors = ["Georges Racinet <gracinet@anybox.fr>"] description = "Mercurial pure Rust core library, with no assumption on Python bindings (FFI)" edition = "2021" [lib] name = "hg" [dependencies] bitflags = "1.3.2" bytes-cast = "0.3.0" byteorder = "1.4.3" derive_more = "0.99.17" hashbrown = { version = "0.13.1", features = ["rayon"] } home = "0.5.4" im-rc = "15.1.0" itertools = "0.10.5" lazy_static = "1.4.0" libc = "0.2.137" logging_timer = "1.1.0" ouroboros = "0.15.5" rand = "0.8.5" rand_pcg = "0.3.1" rand_distr = "0.4.3" rayon = "1.7.0" regex = "1.7.0" sha-1 = "0.10.0" twox-hash = "1.6.3" same-file = "1.0.6" tempfile = "3.3.0" thread_local = "1.1.4" crossbeam-channel = "0.5.6" log = "0.4.17" memmap2 = { version = "0.5.8", features = ["stable_deref_trait"] } zstd = "0.12" format-bytes = "0.3.0" once_cell = "1.16.0" # We don't use the `miniz-oxide` backend to not change rhg benchmarks and until # we have a clearer view of which backend is the fastest. [dependencies.flate2] version = "1.0.24" features = ["zlib"] default-features = false [dev-dependencies] clap = { version = "4.0.24", features = ["derive"] } pretty_assertions = "1.1.0"