python-gmp 0.5.0a3__tar.gz → 0.5.0a5__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 (64) hide show
  1. {python_gmp-0.5.0a3 → python_gmp-0.5.0a5}/.github/workflows/ci.yml +1 -1
  2. {python_gmp-0.5.0a3 → python_gmp-0.5.0a5}/.github/workflows/coverage.yml +7 -10
  3. python_gmp-0.5.0a5/.github/workflows/os.yml +62 -0
  4. {python_gmp-0.5.0a3 → python_gmp-0.5.0a5}/.github/workflows/publish.yml +4 -4
  5. {python_gmp-0.5.0a3 → python_gmp-0.5.0a5}/.github/workflows/wheels.yml +6 -6
  6. {python_gmp-0.5.0a3 → python_gmp-0.5.0a5}/PKG-INFO +13 -21
  7. {python_gmp-0.5.0a3 → python_gmp-0.5.0a5}/README.rst +12 -20
  8. {python_gmp-0.5.0a3 → python_gmp-0.5.0a5}/gmp.c +3 -1
  9. python_gmp-0.5.0a5/libzz/.github/workflows/ci.yml +41 -0
  10. python_gmp-0.5.0a5/libzz/.github/workflows/publish.yml +36 -0
  11. {python_gmp-0.5.0a3 → python_gmp-0.5.0a5}/libzz/.gitignore +9 -0
  12. python_gmp-0.5.0a5/libzz/ChangeLog +66 -0
  13. python_gmp-0.5.0a5/libzz/NEWS +5 -0
  14. python_gmp-0.5.0a5/libzz/README +2 -0
  15. {python_gmp-0.5.0a3 → python_gmp-0.5.0a5}/libzz/configure.ac +11 -2
  16. python_gmp-0.5.0a5/libzz/doc/fdl.texi +513 -0
  17. python_gmp-0.5.0a5/libzz/doc/makefile.am +2 -0
  18. python_gmp-0.5.0a5/libzz/doc/zz.texi +109 -0
  19. python_gmp-0.5.0a5/libzz/makefile.am +24 -0
  20. {python_gmp-0.5.0a3 → python_gmp-0.5.0a5/libzz}/scripts/cibw_before_all.sh +15 -15
  21. {python_gmp-0.5.0a3 → python_gmp-0.5.0a5/libzz}/scripts/dll-importexport.diff +5 -3
  22. {python_gmp-0.5.0a3 → python_gmp-0.5.0a5/libzz}/scripts/gcc15.diff +22 -0
  23. python_gmp-0.5.0a5/libzz/tests/makefile.am +5 -0
  24. python_gmp-0.5.0a5/libzz/tests/t-fac.c +63 -0
  25. python_gmp-0.5.0a5/libzz/tests/t-mul.c +120 -0
  26. {python_gmp-0.5.0a3 → python_gmp-0.5.0a5}/libzz/zz.c +44 -7
  27. {python_gmp-0.5.0a3 → python_gmp-0.5.0a5}/libzz/zz.h +12 -0
  28. {python_gmp-0.5.0a3 → python_gmp-0.5.0a5}/libzz/zz.pc.in +1 -1
  29. {python_gmp-0.5.0a3 → python_gmp-0.5.0a5}/pyproject.toml +3 -4
  30. python_gmp-0.5.0a5/scripts/cibw_before_all.sh +33 -0
  31. python_gmp-0.5.0a5/scripts/dll-importexport.diff +20 -0
  32. python_gmp-0.5.0a5/scripts/fat_build_fix.diff +37 -0
  33. python_gmp-0.5.0a5/scripts/gcc15.diff +51 -0
  34. {python_gmp-0.5.0a3 → python_gmp-0.5.0a5}/tests/test_api.py +3 -0
  35. python_gmp-0.5.0a3/.github/workflows/os.yml +0 -37
  36. python_gmp-0.5.0a3/libzz/COPYING +0 -674
  37. python_gmp-0.5.0a3/libzz/ChangeLog +0 -0
  38. python_gmp-0.5.0a3/libzz/NEWS +0 -0
  39. python_gmp-0.5.0a3/libzz/README +0 -0
  40. python_gmp-0.5.0a3/libzz/makefile.am +0 -12
  41. {python_gmp-0.5.0a3 → python_gmp-0.5.0a5}/.clang-format +0 -0
  42. {python_gmp-0.5.0a3 → python_gmp-0.5.0a5}/.github/dependabot.yml +0 -0
  43. {python_gmp-0.5.0a3 → python_gmp-0.5.0a5}/.github/workflows/linter.yml +0 -0
  44. {python_gmp-0.5.0a3 → python_gmp-0.5.0a5}/.gitignore +0 -0
  45. {python_gmp-0.5.0a3 → python_gmp-0.5.0a5}/.gitmodules +0 -0
  46. {python_gmp-0.5.0a3 → python_gmp-0.5.0a5}/.pre-commit-config.yaml +0 -0
  47. {python_gmp-0.5.0a3 → python_gmp-0.5.0a5}/.readthedocs.yaml +0 -0
  48. {python_gmp-0.5.0a3 → python_gmp-0.5.0a5}/LICENSE +0 -0
  49. {python_gmp-0.5.0a3 → python_gmp-0.5.0a5}/docs/conf.py +0 -0
  50. {python_gmp-0.5.0a3 → python_gmp-0.5.0a5}/docs/index.rst +0 -0
  51. {python_gmp-0.5.0a3 → python_gmp-0.5.0a5}/fmt.c +0 -0
  52. {python_gmp-0.5.0a3 → python_gmp-0.5.0a5}/libzz/AUTHORS +0 -0
  53. /python_gmp-0.5.0a3/libzz/COPYING.LESSER → /python_gmp-0.5.0a5/libzz/COPYING +0 -0
  54. {python_gmp-0.5.0a3 → python_gmp-0.5.0a5/libzz}/scripts/fat_build_fix.diff +0 -0
  55. {python_gmp-0.5.0a3 → python_gmp-0.5.0a5}/meson.build +0 -0
  56. {python_gmp-0.5.0a3 → python_gmp-0.5.0a5}/mpz.h +0 -0
  57. {python_gmp-0.5.0a3 → python_gmp-0.5.0a5}/pythoncapi_compat.h +0 -0
  58. {python_gmp-0.5.0a3 → python_gmp-0.5.0a5}/tests/conftest.py +0 -0
  59. {python_gmp-0.5.0a3 → python_gmp-0.5.0a5}/tests/test_functions.py +0 -0
  60. {python_gmp-0.5.0a3 → python_gmp-0.5.0a5}/tests/test_memory.py +0 -0
  61. {python_gmp-0.5.0a3 → python_gmp-0.5.0a5}/tests/test_mpz.py +0 -0
  62. {python_gmp-0.5.0a3 → python_gmp-0.5.0a5}/tests/test_utils.py +0 -0
  63. {python_gmp-0.5.0a3 → python_gmp-0.5.0a5}/utils.c +0 -0
  64. {python_gmp-0.5.0a3 → python_gmp-0.5.0a5}/utils.h +0 -0
@@ -41,7 +41,7 @@ jobs:
41
41
  key: ${{ matrix.os }}-${{ hashFiles('scripts/*') }}
42
42
  - run: bash scripts/cibw_before_all.sh
43
43
  if: steps.cache-gmp.outputs.cache-hit != 'true'
44
- - run: pip install --upgrade pip
44
+ - run: python -m pip install --upgrade pip
45
45
  - run: pip --verbose install .[tests] -Csetup-args=-Dbuildtype=debug
46
46
  env:
47
47
  PKG_CONFIG_PATH: ${{ github.workspace }}/.local/lib/pkgconfig
@@ -34,7 +34,7 @@ jobs:
34
34
  key: ${{ matrix.os }}-${{ hashFiles('scripts/*') }}
35
35
  - run: bash scripts/cibw_before_all.sh
36
36
  if: steps.cache-gmp.outputs.cache-hit != 'true'
37
- - run: pip install --upgrade pip
37
+ - run: python -m pip install --upgrade pip
38
38
  - run: |
39
39
  pip install --verbose .[tests] -Cbuild-dir=build \
40
40
  -Csetup-args=-Dbuildtype=debug \
@@ -50,7 +50,7 @@ jobs:
50
50
  lcov --remove coverage.info "*.h" --ignore-errors unused \
51
51
  --output-file coverage.info
52
52
  cp coverage.info build/coverage-${{ matrix.python-version }}.info
53
- - uses: actions/upload-artifact@v4
53
+ - uses: actions/upload-artifact@v5
54
54
  with:
55
55
  name: coverage-${{ matrix.python-version }}
56
56
  path: |
@@ -67,13 +67,13 @@ jobs:
67
67
  submodules: true
68
68
  - run: sudo apt-get update
69
69
  - run: sudo apt-get install lcov
70
- - uses: actions/download-artifact@v5
70
+ - uses: actions/download-artifact@v6
71
71
  with:
72
72
  pattern: coverage-*
73
73
  path: build/
74
74
  merge-multiple: true
75
- - run: genhtml build/coverage*.info --output-directory build/coverage
76
- - uses: actions/upload-artifact@v4
75
+ - run: genhtml build/coverage*.info --hierarchical --output-directory build/coverage
76
+ - uses: actions/upload-artifact@v5
77
77
  with:
78
78
  name: coverage
79
79
  path: |
@@ -83,9 +83,6 @@ jobs:
83
83
  with:
84
84
  token: ${{ secrets.CODECOV_TOKEN }}
85
85
  gcov_ignore: pythoncapi_compat.h
86
- gcov_include: fmt.c
87
- gmp.c
88
- zz.c
89
- utils.c
90
- gcov_args: --no-external
86
+ gcov_include: '*.c, libzz/*.c'
87
+ gcov_args: --no-external --preserve-paths
91
88
  fail_ci_if_error: true
@@ -0,0 +1,62 @@
1
+ name: Run tests on different OS
2
+ on: [workflow_dispatch, workflow_call]
3
+ jobs:
4
+ os:
5
+ runs-on: ${{ matrix.os }}
6
+ strategy:
7
+ fail-fast: false
8
+ matrix:
9
+ os: [ubuntu-24.04, ubuntu-24.04-arm, macos-15]
10
+ shell: [bash]
11
+ include:
12
+ - os: windows-2022
13
+ shell: 'msys2 {0}'
14
+ defaults:
15
+ run:
16
+ shell: ${{ matrix.shell }}
17
+ env:
18
+ PYTEST_ADDOPTS: --verbose --hypothesis-profile=default
19
+ CFLAGS: -Wall -Wpedantic -Werror -std=c17 -Wconversion
20
+ steps:
21
+ - uses: actions/checkout@v5
22
+ with:
23
+ fetch-depth: 0
24
+ submodules: true
25
+ - uses: actions/setup-python@v6
26
+ with:
27
+ python-version: "3.x"
28
+ - uses: msys2/setup-msys2@v2.29.0
29
+ with:
30
+ install: >-
31
+ mingw-w64-ucrt-x86_64-pkg-config
32
+ mingw-w64-ucrt-x86_64-gcc
33
+ diffutils
34
+ m4
35
+ make
36
+ patch
37
+ msystem: ucrt64
38
+ path-type: inherit
39
+ if: ${{ startsWith(matrix.os, 'windows') }}
40
+ - name: Cache GNU GMP builds
41
+ id: cache-gmp
42
+ uses: actions/cache@v4
43
+ with:
44
+ path: .local
45
+ key: ${{ matrix.os }}-${{ hashFiles('scripts/*') }}
46
+ - run: bash scripts/cibw_before_all.sh
47
+ if: steps.cache-gmp.outputs.cache-hit != 'true'
48
+ - run: python -m pip install --upgrade pip
49
+ - run: pip --verbose wheel . -Csetup-args=-Dbuildtype=debug
50
+ env:
51
+ PKG_CONFIG_PATH: ${{ github.workspace }}/.local/lib/pkgconfig
52
+ - run: |
53
+ pip install delvewheel
54
+ delvewheel repair *.whl
55
+ mv wheelhouse/*.whl .
56
+ if: ${{ startsWith(matrix.os, 'windows') }}
57
+ - run: |
58
+ pip install --verbose *.whl
59
+ pip install --verbose python-gmp[tests]
60
+ - run: pytest
61
+ env:
62
+ LD_LIBRARY_PATH: ${{ github.workspace }}/.local/lib
@@ -15,7 +15,7 @@ jobs:
15
15
  python-version: "3.x"
16
16
  - run: pip install build
17
17
  - run: python -m build -s
18
- - uses: actions/upload-artifact@v4
18
+ - uses: actions/upload-artifact@v5
19
19
  with:
20
20
  name: python-gmp-sdist
21
21
  path: dist/
@@ -34,7 +34,7 @@ jobs:
34
34
  permissions:
35
35
  id-token: write
36
36
  steps:
37
- - uses: actions/download-artifact@v5
37
+ - uses: actions/download-artifact@v6
38
38
  with:
39
39
  pattern: python-gmp-*
40
40
  path: dist/
@@ -51,12 +51,12 @@ jobs:
51
51
  contents: write
52
52
  id-token: write
53
53
  steps:
54
- - uses: actions/download-artifact@v5
54
+ - uses: actions/download-artifact@v6
55
55
  with:
56
56
  pattern: python-gmp-*
57
57
  path: dist/
58
58
  merge-multiple: true
59
- - uses: sigstore/gh-action-sigstore-python@v3.0.1
59
+ - uses: sigstore/gh-action-sigstore-python@v3.1.0
60
60
  with:
61
61
  inputs: >-
62
62
  ./dist/*.tar.gz
@@ -18,12 +18,12 @@ jobs:
18
18
  with:
19
19
  install: >-
20
20
  mingw-w64-ucrt-x86_64-gcc
21
- autotools
21
+ diffutils
22
+ m4
23
+ make
22
24
  patch
23
25
  msystem: ucrt64
24
26
  if: ${{ startsWith(matrix.os, 'windows') }}
25
- - run: brew install autoconf automake libtool
26
- if: ${{ startsWith(matrix.os, 'macos') }}
27
27
  # Install pkgconfig on Windows from choco rather than from msys and
28
28
  # avoid using the Strawberry one.
29
29
  - run: choco install -y --stoponfirstfailure --checksum 6004DF17818F5A6DBF19CB335CC92702 pkgconfiglite
@@ -33,8 +33,8 @@ jobs:
33
33
  - run: echo "PKG_CONFIG_PATH=${{ github.workspace }}/.local/lib/pkgconfig" >> $env:GITHUB_ENV
34
34
  if: ${{ startsWith( matrix.os , 'windows' ) }}
35
35
  - name: Build wheels
36
- uses: pypa/cibuildwheel@v3.2.0
37
- - uses: actions/upload-artifact@v4
36
+ uses: pypa/cibuildwheel@v3.2.1
37
+ - uses: actions/upload-artifact@v5
38
38
  with:
39
39
  name: wheels-${{ matrix.os }}
40
40
  path: ./wheelhouse/
@@ -43,7 +43,7 @@ jobs:
43
43
  needs: build_wheels
44
44
  steps:
45
45
  - name: Merge Wheels
46
- uses: actions/upload-artifact/merge@v4
46
+ uses: actions/upload-artifact/merge@v5
47
47
  with:
48
48
  name: python-gmp-wheels
49
49
  pattern: wheels-*
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: python-gmp
3
- Version: 0.5.0a3
3
+ Version: 0.5.0a5
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>
@@ -60,31 +60,13 @@ functions (`comb`_, `factorial`_, `gcd`_, `isqrt`_, `lcm`_ and `perm`_),
60
60
  compatible with the Python stdlib's module `math`_.
61
61
 
62
62
  This module requires Python 3.9 or later versions and has been tested with
63
- CPython 3.9 through 3.14, with PyPy 3.11 and with GraalPy 25.0. Free-threading
64
- builds of the CPython are supported.
63
+ CPython 3.9 through 3.14, with PyPy3.11 7.3.20 and with GraalPy 25.0.
64
+ Free-threading builds of the CPython are supported.
65
65
 
66
66
  Releases are available in the Python Package Index (PyPI) at
67
67
  https://pypi.org/project/python-gmp/.
68
68
 
69
69
 
70
- Warning on --disable-alloca configure option
71
- --------------------------------------------
72
-
73
- Most GMP packages enable using alloca() for temporary workspace allocation.
74
- This module can't prevent a crash in case of a stack overflow. To avoid this,
75
- you should compile the GMP library with '--disable-alloca' configure option to
76
- use rather the heap for all temporary allocations.
77
-
78
- Published on the PyPI binary wheels aren't affected by this issue.
79
-
80
-
81
- Warning on using mp_set_memory_functions()
82
- ------------------------------------------
83
-
84
- This extension customize memory allocation routines, used by the GMP. Don't
85
- import it together with other GMP bindings, like the `gmpy2`_.
86
-
87
-
88
70
  Motivation
89
71
  ----------
90
72
 
@@ -132,6 +114,16 @@ The gmp module handles such errors correctly:
132
114
  >>> z.bit_length() # including pre-failure value of z
133
115
  93882077
134
116
 
117
+
118
+ Warning on --disable-alloca configure option
119
+ --------------------------------------------
120
+
121
+ You should use the GNU GMP library, compiled with the '--disable-alloca'
122
+ configure option to prevent using alloca() for temporary workspace allocation
123
+ (and use the heap instead), or this module can't prevent a crash in case of a
124
+ stack overflow.
125
+
126
+
135
127
  .. _gmpy2: https://pypi.org/project/gmpy2/
136
128
  .. _python-flint: https://pypi.org/project/python-flint/
137
129
  .. _mpz: https://python-gmp.readthedocs.io/en/latest/#gmp.mpz
@@ -10,31 +10,13 @@ functions (`comb`_, `factorial`_, `gcd`_, `isqrt`_, `lcm`_ and `perm`_),
10
10
  compatible with the Python stdlib's module `math`_.
11
11
 
12
12
  This module requires Python 3.9 or later versions and has been tested with
13
- CPython 3.9 through 3.14, with PyPy 3.11 and with GraalPy 25.0. Free-threading
14
- builds of the CPython are supported.
13
+ CPython 3.9 through 3.14, with PyPy3.11 7.3.20 and with GraalPy 25.0.
14
+ Free-threading builds of the CPython are supported.
15
15
 
16
16
  Releases are available in the Python Package Index (PyPI) at
17
17
  https://pypi.org/project/python-gmp/.
18
18
 
19
19
 
20
- Warning on --disable-alloca configure option
21
- --------------------------------------------
22
-
23
- Most GMP packages enable using alloca() for temporary workspace allocation.
24
- This module can't prevent a crash in case of a stack overflow. To avoid this,
25
- you should compile the GMP library with '--disable-alloca' configure option to
26
- use rather the heap for all temporary allocations.
27
-
28
- Published on the PyPI binary wheels aren't affected by this issue.
29
-
30
-
31
- Warning on using mp_set_memory_functions()
32
- ------------------------------------------
33
-
34
- This extension customize memory allocation routines, used by the GMP. Don't
35
- import it together with other GMP bindings, like the `gmpy2`_.
36
-
37
-
38
20
  Motivation
39
21
  ----------
40
22
 
@@ -82,6 +64,16 @@ The gmp module handles such errors correctly:
82
64
  >>> z.bit_length() # including pre-failure value of z
83
65
  93882077
84
66
 
67
+
68
+ Warning on --disable-alloca configure option
69
+ --------------------------------------------
70
+
71
+ You should use the GNU GMP library, compiled with the '--disable-alloca'
72
+ configure option to prevent using alloca() for temporary workspace allocation
73
+ (and use the heap instead), or this module can't prevent a crash in case of a
74
+ stack overflow.
75
+
76
+
85
77
  .. _gmpy2: https://pypi.org/project/gmpy2/
86
78
  .. _python-flint: https://pypi.org/project/python-flint/
87
79
  .. _mpz: https://python-gmp.readthedocs.io/en/latest/#gmp.mpz
@@ -391,8 +391,10 @@ MPZ_to_bytes(MPZ_Object *u, Py_ssize_t length, int is_little, int is_signed)
391
391
  Py_DECREF(bytes);
392
392
  return NULL;
393
393
  }
394
+ /* LCOV_EXCL_START */
394
395
  Py_DECREF(bytes);
395
- return PyErr_NoMemory(); /* LCOV_EXCL_LINE */
396
+ return PyErr_NoMemory();
397
+ /* LCOV_EXCL_STOP */
396
398
  }
397
399
 
398
400
  static MPZ_Object *
@@ -0,0 +1,41 @@
1
+ name: Run CI tests
2
+
3
+ on:
4
+ push:
5
+ branches: [ "master" ]
6
+ pull_request:
7
+ branches: [ "master" ]
8
+ workflow_dispatch:
9
+
10
+ jobs:
11
+ tests:
12
+ strategy:
13
+ matrix:
14
+ os: [ubuntu-24.04]
15
+ runs-on: ${{ matrix.os }}
16
+ env:
17
+ CFLAGS: -Wall -Wpedantic -Werror -std=c17 -Wconversion
18
+ steps:
19
+ - uses: actions/checkout@v5
20
+ - run: sudo apt-get update
21
+ - run: sudo apt-get install lcov texlive
22
+ - run: sh scripts/cibw_before_all.sh
23
+ - run: autoreconf -if
24
+ - run: ./configure -q --enable-gcov
25
+ - run: make -s
26
+ - run: make -s check
27
+ - run: lcov --capture --directory . --output-file coverage.info
28
+ - run: genhtml coverage.info --output-directory coverage
29
+ - run: make -s distcheck
30
+ - uses: actions/upload-artifact@v4
31
+ with:
32
+ name: coverage
33
+ path: |
34
+ coverage/
35
+ coverage.info
36
+ - uses: codecov/codecov-action@v5
37
+ with:
38
+ token: ${{ secrets.CODECOV_TOKEN }}
39
+ gcov_include: '*.c'
40
+ gcov_args: --no-external
41
+ fail_ci_if_error: true
@@ -0,0 +1,36 @@
1
+ name: Publish on Github
2
+
3
+ on:
4
+ push:
5
+ workflow_dispatch:
6
+
7
+ jobs:
8
+ build:
9
+ if: startsWith(github.ref, 'refs/tags/')
10
+ runs-on: ubuntu-24.04
11
+ steps:
12
+ - uses: actions/checkout@v5
13
+ - run: sudo apt-get update
14
+ - run: sudo apt-get install lcov texlive
15
+ - run: sh scripts/cibw_before_all.sh
16
+ - run: autoreconf -if
17
+ - run: ./configure -q
18
+ - run: make -s dist
19
+ - run: make -s pdf
20
+ - run: mkdir dist
21
+ - run: cp zz*.tar.gz doc/zz.pdf dist/
22
+ - name: Create GitHub Release
23
+ env:
24
+ GITHUB_TOKEN: ${{ github.token }}
25
+ run: >-
26
+ gh release create '${{ github.ref_name }}'
27
+ --repo '${{ github.repository }}'
28
+ --prerelease
29
+ --generate-notes
30
+ - name: Upload artifacts to GitHub Release
31
+ env:
32
+ GITHUB_TOKEN: ${{ github.token }}
33
+ run: >-
34
+ gh release upload
35
+ '${{ github.ref_name }}' dist/**
36
+ --repo '${{ github.repository }}'
@@ -40,3 +40,12 @@ test-driver
40
40
  a.out
41
41
  m4/
42
42
  *.pc
43
+ tests/*.trs
44
+ tests/t-fac
45
+ tests/t-mul
46
+ doc/zz.html/
47
+ doc/zz.t2p/
48
+ coverage.info
49
+ coverage/
50
+ *.gcno
51
+ zz-*.tar.gz
@@ -0,0 +1,66 @@
1
+ 2025-10-17 Sergey B Kirpichev <skirpichev@gmail.com>
2
+
3
+ Fill README, closes #9
4
+
5
+ Rename COPYING.LESSER -> COPYING
6
+
7
+ Add workflow to publish releases
8
+
9
+ Run make distcheck in CI
10
+
11
+ Fixes for "make distcheck"
12
+
13
+ Enable test coverage in CI
14
+
15
+ Support --enable-gcov configure option
16
+
17
+ Set CFLAGS
18
+
19
+ 2025-10-16 Sergey B Kirpichev <skirpichev@gmail.com>
20
+
21
+ Test with pthread's
22
+
23
+ Don't alter hard limits
24
+
25
+ 2025-10-15 Sergey B Kirpichev <skirpichev@gmail.com>
26
+
27
+ Add CI tests
28
+
29
+ 2025-10-12 Sergey B Kirpichev <skirpichev@gmail.com>
30
+
31
+ Init docs (texinfo)
32
+
33
+ Correct repo url
34
+
35
+ Add some tests
36
+
37
+ Add copyrights
38
+
39
+ Drop unsupported rounding modes
40
+
41
+ 2025-10-06 Sergey B Kirpichev <skirpichev@gmail.com>
42
+
43
+ Fix _zz_addsub_i32() in case both u and v are zero
44
+
45
+ 2025-09-22 Sergey B Kirpichev <skirpichev@gmail.com>
46
+
47
+ Disallow length=0 for signed integers
48
+
49
+ 2025-08-29 Sergey B Kirpichev <skirpichev@gmail.com>
50
+
51
+ Update zz.*
52
+
53
+ 2025-08-18 Sergey B Kirpichev <skirpichev@gmail.com>
54
+
55
+ Update configure.ac/makefile.am, add zz.pc.in
56
+
57
+ Add LGPL
58
+
59
+ Revert "Add example, using pthread's"
60
+ This reverts commit 753bcd9be5e32b34814848946d2949436a2e7fa3.
61
+
62
+ 2025-08-17 Sergey B Kirpichev <skirpichev@gmail.com>
63
+
64
+ Add example, using pthread's
65
+
66
+ Init
@@ -0,0 +1,5 @@
1
+ Changes between versions 0.1.* and 0.5.0
2
+
3
+ BUGS FIXED
4
+ * Disallow length=0 in zz_to_bytes() for signed integers
5
+ * Correct zz_add/sub_i32() in case u and v are both zeros
@@ -0,0 +1,2 @@
1
+ The ZZ Library is a tiny wrapper for the GNU GMP Library, providing
2
+ memory-safe API for arbitrary precision arithmetic over integers.
@@ -14,7 +14,7 @@ any later version. See <https://www.gnu.org/licenses/>.
14
14
  define(ZZ_COPYRIGHT_C,[[/*
15
15
  Copyright (C) 2024, 2025 Sergey B Kirpichev
16
16
 
17
- This file is part of the ZZ Library.
17
+ This file is part of the ZZ Library.
18
18
 
19
19
  The ZZ Library is free software: you can redistribute it and/or modify it
20
20
  under the terms of the GNU Lesser General Public License (LGPL) as
@@ -54,6 +54,12 @@ LT_INIT
54
54
  # Checks for libraries...
55
55
  AC_CHECK_LIB(gmp,__gmpz_init,,AC_MSG_ERROR([GNU GMP library is required.]))
56
56
 
57
+ AC_CHECK_LIB([pthread], [pthread_create], [HAVE_PTHREAD=yes], [HAVE_PTHREAD=no])
58
+ AS_IF([test "x$HAVE_PTHREAD" = xyes],
59
+ [AC_DEFINE_UNQUOTED([HAVE_PTHREAD_H], [1], [Define to 1 if you have the <pthread.h> header file.])
60
+ LIBS="$LIBS -lpthread"],
61
+ [AC_DEFINE_UNQUOTED([HAVE_PTHREAD_H], [0], [Define to 0 if you do not have the <pthread.h> header file.])])
62
+
57
63
  # Checks for header files.
58
64
  AC_CHECK_HEADERS([assert.h ctype.h float.h inttypes.h math.h setjmp.h
59
65
  stdlib.h string.h stdbool.h stddef.h stdint.h])
@@ -62,5 +68,8 @@ AC_CHECK_HEADERS([assert.h ctype.h float.h inttypes.h math.h setjmp.h
62
68
  AC_C_CONST
63
69
  AC_C_INLINE
64
70
 
65
- AC_CONFIG_FILES([makefile zz.pc])
71
+ AC_ARG_ENABLE(gcov,[AS_HELP_STRING([--enable-gcov], [enable coverage test])])
72
+ AM_CONDITIONAL([ENABLE_GCOV],[test "x${enable_gcov}" = "xyes"])
73
+
74
+ AC_CONFIG_FILES([makefile doc/makefile tests/makefile zz.pc])
66
75
  AC_OUTPUT