python-gmp 0.5.0a3__tar.gz → 0.5.0a4__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {python_gmp-0.5.0a3 → python_gmp-0.5.0a4}/PKG-INFO +1 -1
- {python_gmp-0.5.0a3 → python_gmp-0.5.0a4}/libzz/zz.c +5 -3
- {python_gmp-0.5.0a3 → python_gmp-0.5.0a4}/tests/test_api.py +3 -0
- {python_gmp-0.5.0a3 → python_gmp-0.5.0a4}/.clang-format +0 -0
- {python_gmp-0.5.0a3 → python_gmp-0.5.0a4}/.github/dependabot.yml +0 -0
- {python_gmp-0.5.0a3 → python_gmp-0.5.0a4}/.github/workflows/ci.yml +0 -0
- {python_gmp-0.5.0a3 → python_gmp-0.5.0a4}/.github/workflows/coverage.yml +0 -0
- {python_gmp-0.5.0a3 → python_gmp-0.5.0a4}/.github/workflows/linter.yml +0 -0
- {python_gmp-0.5.0a3 → python_gmp-0.5.0a4}/.github/workflows/os.yml +0 -0
- {python_gmp-0.5.0a3 → python_gmp-0.5.0a4}/.github/workflows/publish.yml +0 -0
- {python_gmp-0.5.0a3 → python_gmp-0.5.0a4}/.github/workflows/wheels.yml +0 -0
- {python_gmp-0.5.0a3 → python_gmp-0.5.0a4}/.gitignore +0 -0
- {python_gmp-0.5.0a3 → python_gmp-0.5.0a4}/.gitmodules +0 -0
- {python_gmp-0.5.0a3 → python_gmp-0.5.0a4}/.pre-commit-config.yaml +0 -0
- {python_gmp-0.5.0a3 → python_gmp-0.5.0a4}/.readthedocs.yaml +0 -0
- {python_gmp-0.5.0a3 → python_gmp-0.5.0a4}/LICENSE +0 -0
- {python_gmp-0.5.0a3 → python_gmp-0.5.0a4}/README.rst +0 -0
- {python_gmp-0.5.0a3 → python_gmp-0.5.0a4}/docs/conf.py +0 -0
- {python_gmp-0.5.0a3 → python_gmp-0.5.0a4}/docs/index.rst +0 -0
- {python_gmp-0.5.0a3 → python_gmp-0.5.0a4}/fmt.c +0 -0
- {python_gmp-0.5.0a3 → python_gmp-0.5.0a4}/gmp.c +0 -0
- {python_gmp-0.5.0a3 → python_gmp-0.5.0a4}/libzz/.gitignore +0 -0
- {python_gmp-0.5.0a3 → python_gmp-0.5.0a4}/libzz/AUTHORS +0 -0
- {python_gmp-0.5.0a3 → python_gmp-0.5.0a4}/libzz/COPYING +0 -0
- {python_gmp-0.5.0a3 → python_gmp-0.5.0a4}/libzz/COPYING.LESSER +0 -0
- {python_gmp-0.5.0a3 → python_gmp-0.5.0a4}/libzz/ChangeLog +0 -0
- {python_gmp-0.5.0a3 → python_gmp-0.5.0a4}/libzz/NEWS +0 -0
- {python_gmp-0.5.0a3 → python_gmp-0.5.0a4}/libzz/README +0 -0
- {python_gmp-0.5.0a3 → python_gmp-0.5.0a4}/libzz/configure.ac +0 -0
- {python_gmp-0.5.0a3 → python_gmp-0.5.0a4}/libzz/makefile.am +0 -0
- {python_gmp-0.5.0a3 → python_gmp-0.5.0a4}/libzz/zz.h +0 -0
- {python_gmp-0.5.0a3 → python_gmp-0.5.0a4}/libzz/zz.pc.in +0 -0
- {python_gmp-0.5.0a3 → python_gmp-0.5.0a4}/meson.build +0 -0
- {python_gmp-0.5.0a3 → python_gmp-0.5.0a4}/mpz.h +0 -0
- {python_gmp-0.5.0a3 → python_gmp-0.5.0a4}/pyproject.toml +0 -0
- {python_gmp-0.5.0a3 → python_gmp-0.5.0a4}/pythoncapi_compat.h +0 -0
- {python_gmp-0.5.0a3 → python_gmp-0.5.0a4}/scripts/cibw_before_all.sh +0 -0
- {python_gmp-0.5.0a3 → python_gmp-0.5.0a4}/scripts/dll-importexport.diff +0 -0
- {python_gmp-0.5.0a3 → python_gmp-0.5.0a4}/scripts/fat_build_fix.diff +0 -0
- {python_gmp-0.5.0a3 → python_gmp-0.5.0a4}/scripts/gcc15.diff +0 -0
- {python_gmp-0.5.0a3 → python_gmp-0.5.0a4}/tests/conftest.py +0 -0
- {python_gmp-0.5.0a3 → python_gmp-0.5.0a4}/tests/test_functions.py +0 -0
- {python_gmp-0.5.0a3 → python_gmp-0.5.0a4}/tests/test_memory.py +0 -0
- {python_gmp-0.5.0a3 → python_gmp-0.5.0a4}/tests/test_mpz.py +0 -0
- {python_gmp-0.5.0a3 → python_gmp-0.5.0a4}/tests/test_utils.py +0 -0
- {python_gmp-0.5.0a3 → python_gmp-0.5.0a4}/utils.c +0 -0
- {python_gmp-0.5.0a3 → python_gmp-0.5.0a4}/utils.h +0 -0
|
@@ -897,12 +897,14 @@ _zz_addsub_i32(const zz_t *u, int32_t v, bool subtract, zz_t *w)
|
|
|
897
897
|
zz_size_t u_size = u->size, v_size = v != 0;
|
|
898
898
|
zz_limb_t digit = (zz_limb_t)imaxabs(v);
|
|
899
899
|
|
|
900
|
-
if (u_size < v_size) {
|
|
901
|
-
assert(
|
|
900
|
+
if (!u_size || u_size < v_size) {
|
|
901
|
+
assert(!u_size);
|
|
902
902
|
if (zz_resize(v_size, w)) {
|
|
903
903
|
return ZZ_MEM; /* LCOV_EXCL_LINE */
|
|
904
904
|
}
|
|
905
|
-
|
|
905
|
+
if (v_size) {
|
|
906
|
+
w->digits[0] = digit;
|
|
907
|
+
}
|
|
906
908
|
w->negative = negv;
|
|
907
909
|
return ZZ_OK;
|
|
908
910
|
}
|
|
@@ -94,6 +94,9 @@ def test_zz_add_i32():
|
|
|
94
94
|
assert zz_from_i64(0, u) == zz_err.ZZ_OK
|
|
95
95
|
assert zz_add_i32(u, 2, u) == zz_err.ZZ_OK
|
|
96
96
|
assert zz_cmp_i32(u, 2) == zz_ord.ZZ_EQ
|
|
97
|
+
assert zz_from_i64(0, u) == zz_err.ZZ_OK
|
|
98
|
+
assert zz_add_i32(u, 0, u) == zz_err.ZZ_OK
|
|
99
|
+
assert zz_cmp_i32(u, 0) == zz_ord.ZZ_EQ
|
|
97
100
|
|
|
98
101
|
|
|
99
102
|
def test_zz_lsbpos():
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|