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.
Files changed (47) hide show
  1. {python_gmp-0.5.0a3 → python_gmp-0.5.0a4}/PKG-INFO +1 -1
  2. {python_gmp-0.5.0a3 → python_gmp-0.5.0a4}/libzz/zz.c +5 -3
  3. {python_gmp-0.5.0a3 → python_gmp-0.5.0a4}/tests/test_api.py +3 -0
  4. {python_gmp-0.5.0a3 → python_gmp-0.5.0a4}/.clang-format +0 -0
  5. {python_gmp-0.5.0a3 → python_gmp-0.5.0a4}/.github/dependabot.yml +0 -0
  6. {python_gmp-0.5.0a3 → python_gmp-0.5.0a4}/.github/workflows/ci.yml +0 -0
  7. {python_gmp-0.5.0a3 → python_gmp-0.5.0a4}/.github/workflows/coverage.yml +0 -0
  8. {python_gmp-0.5.0a3 → python_gmp-0.5.0a4}/.github/workflows/linter.yml +0 -0
  9. {python_gmp-0.5.0a3 → python_gmp-0.5.0a4}/.github/workflows/os.yml +0 -0
  10. {python_gmp-0.5.0a3 → python_gmp-0.5.0a4}/.github/workflows/publish.yml +0 -0
  11. {python_gmp-0.5.0a3 → python_gmp-0.5.0a4}/.github/workflows/wheels.yml +0 -0
  12. {python_gmp-0.5.0a3 → python_gmp-0.5.0a4}/.gitignore +0 -0
  13. {python_gmp-0.5.0a3 → python_gmp-0.5.0a4}/.gitmodules +0 -0
  14. {python_gmp-0.5.0a3 → python_gmp-0.5.0a4}/.pre-commit-config.yaml +0 -0
  15. {python_gmp-0.5.0a3 → python_gmp-0.5.0a4}/.readthedocs.yaml +0 -0
  16. {python_gmp-0.5.0a3 → python_gmp-0.5.0a4}/LICENSE +0 -0
  17. {python_gmp-0.5.0a3 → python_gmp-0.5.0a4}/README.rst +0 -0
  18. {python_gmp-0.5.0a3 → python_gmp-0.5.0a4}/docs/conf.py +0 -0
  19. {python_gmp-0.5.0a3 → python_gmp-0.5.0a4}/docs/index.rst +0 -0
  20. {python_gmp-0.5.0a3 → python_gmp-0.5.0a4}/fmt.c +0 -0
  21. {python_gmp-0.5.0a3 → python_gmp-0.5.0a4}/gmp.c +0 -0
  22. {python_gmp-0.5.0a3 → python_gmp-0.5.0a4}/libzz/.gitignore +0 -0
  23. {python_gmp-0.5.0a3 → python_gmp-0.5.0a4}/libzz/AUTHORS +0 -0
  24. {python_gmp-0.5.0a3 → python_gmp-0.5.0a4}/libzz/COPYING +0 -0
  25. {python_gmp-0.5.0a3 → python_gmp-0.5.0a4}/libzz/COPYING.LESSER +0 -0
  26. {python_gmp-0.5.0a3 → python_gmp-0.5.0a4}/libzz/ChangeLog +0 -0
  27. {python_gmp-0.5.0a3 → python_gmp-0.5.0a4}/libzz/NEWS +0 -0
  28. {python_gmp-0.5.0a3 → python_gmp-0.5.0a4}/libzz/README +0 -0
  29. {python_gmp-0.5.0a3 → python_gmp-0.5.0a4}/libzz/configure.ac +0 -0
  30. {python_gmp-0.5.0a3 → python_gmp-0.5.0a4}/libzz/makefile.am +0 -0
  31. {python_gmp-0.5.0a3 → python_gmp-0.5.0a4}/libzz/zz.h +0 -0
  32. {python_gmp-0.5.0a3 → python_gmp-0.5.0a4}/libzz/zz.pc.in +0 -0
  33. {python_gmp-0.5.0a3 → python_gmp-0.5.0a4}/meson.build +0 -0
  34. {python_gmp-0.5.0a3 → python_gmp-0.5.0a4}/mpz.h +0 -0
  35. {python_gmp-0.5.0a3 → python_gmp-0.5.0a4}/pyproject.toml +0 -0
  36. {python_gmp-0.5.0a3 → python_gmp-0.5.0a4}/pythoncapi_compat.h +0 -0
  37. {python_gmp-0.5.0a3 → python_gmp-0.5.0a4}/scripts/cibw_before_all.sh +0 -0
  38. {python_gmp-0.5.0a3 → python_gmp-0.5.0a4}/scripts/dll-importexport.diff +0 -0
  39. {python_gmp-0.5.0a3 → python_gmp-0.5.0a4}/scripts/fat_build_fix.diff +0 -0
  40. {python_gmp-0.5.0a3 → python_gmp-0.5.0a4}/scripts/gcc15.diff +0 -0
  41. {python_gmp-0.5.0a3 → python_gmp-0.5.0a4}/tests/conftest.py +0 -0
  42. {python_gmp-0.5.0a3 → python_gmp-0.5.0a4}/tests/test_functions.py +0 -0
  43. {python_gmp-0.5.0a3 → python_gmp-0.5.0a4}/tests/test_memory.py +0 -0
  44. {python_gmp-0.5.0a3 → python_gmp-0.5.0a4}/tests/test_mpz.py +0 -0
  45. {python_gmp-0.5.0a3 → python_gmp-0.5.0a4}/tests/test_utils.py +0 -0
  46. {python_gmp-0.5.0a3 → python_gmp-0.5.0a4}/utils.c +0 -0
  47. {python_gmp-0.5.0a3 → python_gmp-0.5.0a4}/utils.h +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: python-gmp
3
- Version: 0.5.0a3
3
+ Version: 0.5.0a4
4
4
  Summary: Safe bindings to the GNU GMP library
5
5
  Keywords: gmp,multiple-precision,arbitrary-precision,bignum
6
6
  Author-Email: Sergey B Kirpichev <skirpichev@gmail.com>
@@ -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(v_size == 1);
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
- w->digits[0] = digit;
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