Skip to content

Commit c782d1d

Browse files
Nullptr revert (#145)
* cis: do not build wheels on 3.11 yet (betas are not ABI stable) Alos update to setup-pythonv4 * Revert use of nullptr in PyTuple_SET_ITEM This reverts commit 4a568b7fb6ef9996181013b960a18ceec56d8889, reversing changes made to 13b6186. * cis: force to use 3.11beta4 and update checkout action * fix typo
1 parent 081a5f4 commit c782d1d

File tree

5 files changed

+15
-13
lines changed

5 files changed

+15
-13
lines changed

.github/workflows/ci.yml

+5-5
Original file line numberDiff line numberDiff line change
@@ -24,13 +24,13 @@ jobs:
2424
matrix:
2525
python-version: ['3.9']
2626
steps:
27-
- uses: actions/checkout@v2
27+
- uses: actions/checkout@v3
2828
- name: Get history and tags for SCM versioning to work
2929
run: |
3030
git fetch --prune --unshallow
3131
git fetch --depth=1 origin +refs/tags/*:refs/tags/*
3232
- name: Set up Python ${{ matrix.python-version }}
33-
uses: actions/setup-python@v3
33+
uses: actions/setup-python@v4
3434
with:
3535
python-version: ${{ matrix.python-version }}
3636
- name: Install dependencies
@@ -63,7 +63,7 @@ jobs:
6363
matrix:
6464
os: [ubuntu-latest]
6565
steps:
66-
- uses: actions/checkout@v2
66+
- uses: actions/checkout@v3
6767
- name: Install dependencies
6868
run: |
6969
sudo add-apt-repository -y ppa:ubuntu-toolchain-r/test
@@ -83,13 +83,13 @@ jobs:
8383
os: [ubuntu-latest, windows-latest, macos-latest]
8484
python-version: ['3.7', '3.8', '3.9', '3.10', 'pypy-3.7', 'pypy-3.8', '3.11.0-beta - 3.11.0']
8585
steps:
86-
- uses: actions/checkout@v2
86+
- uses: actions/checkout@v3
8787
- name: Get history and tags for SCM versioning to work
8888
run: |
8989
git fetch --prune --unshallow
9090
git fetch --depth=1 origin +refs/tags/*:refs/tags/*
9191
- name: Set up Python ${{ matrix.python-version }}
92-
uses: actions/setup-python@v3
92+
uses: actions/setup-python@v4
9393
with:
9494
python-version: ${{ matrix.python-version }}
9595
- name: Install dependencies

.github/workflows/docs.yml

+3-1
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,9 @@ jobs:
2727
git fetch --prune --unshallow
2828
git fetch --depth=1 origin +refs/tags/*:refs/tags/*
2929
- name: Set up Python
30-
uses: actions/setup-python@v3
30+
uses: actions/setup-python@v4
31+
with:
32+
python-version: '3.x'
3133
- name: Install dependencies
3234
run: |
3335
python -m pip install --upgrade pip

.github/workflows/release.yml

+5-5
Original file line numberDiff line numberDiff line change
@@ -19,9 +19,9 @@ jobs:
1919
git fetch --prune --unshallow
2020
git fetch --depth=1 origin +refs/tags/*:refs/tags/*
2121
- name: Setup Python
22-
uses: actions/setup-python@v3
22+
uses: actions/setup-python@v4
2323
with:
24-
python-version: '3.10'
24+
python-version: '3.x'
2525
- name: Build sdist
2626
run: |
2727
pip install --upgrade pip
@@ -77,9 +77,9 @@ jobs:
7777
git fetch --prune --unshallow
7878
git fetch --depth=1 origin +refs/tags/*:refs/tags/*
7979
- name: Setup Python
80-
uses: actions/setup-python@v3
80+
uses: actions/setup-python@v4
8181
with:
82-
python-version: '3.9'
82+
python-version: '3.x'
8383
- name: Set up QEMU
8484
if: runner.os == 'Linux' && matrix.archs != 'auto'
8585
uses: docker/setup-qemu-action@v1
@@ -102,7 +102,7 @@ jobs:
102102
uses: pypa/cibuildwheel@v2.1.1
103103
if: matrix.manylinux_version == 'manylinux2010'
104104
env:
105-
CIBW_BUILD: "cp39-* cp310-* cp311-* pp37-*"
105+
CIBW_BUILD: "cp39-* cp310-* pp37-*"
106106
CIBW_ARCHS_MACOS: x86_64 universal2 arm64
107107
CIBW_ARCHS_LINUX: ${{ matrix.archs }}
108108
CIBW_MANYLINUX_X86_64_IMAGE: manylinux2010

py/src/symbolics.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -123,7 +123,7 @@ PyObject* BinaryMul::operator()( Expression* first, double second )
123123
return 0;
124124
Py_ssize_t end = PyTuple_GET_SIZE( first->terms );
125125
for( Py_ssize_t i = 0; i < end; ++i ) // memset 0 for safe error return
126-
PyTuple_SET_ITEM( terms.get(), i, nullptr );
126+
PyTuple_SET_ITEM( terms.get(), i, 0 );
127127
for( Py_ssize_t i = 0; i < end; ++i )
128128
{
129129
PyObject* item = PyTuple_GET_ITEM( first->terms, i );

py/src/util.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -117,7 +117,7 @@ make_terms( const std::map<PyObject*, double>& coeffs )
117117
return 0;
118118
Py_ssize_t size = PyTuple_GET_SIZE( terms.get() );
119119
for( Py_ssize_t i = 0; i < size; ++i ) // zero tuple for safe early return
120-
PyTuple_SET_ITEM( terms.get(), i, nullptr );
120+
PyTuple_SET_ITEM( terms.get(), i, 0 );
121121
Py_ssize_t i = 0;
122122
iter_t it = coeffs.begin();
123123
iter_t end = coeffs.end();

0 commit comments

Comments
 (0)