Skip to content

Commit

Permalink
Refine
Browse files Browse the repository at this point in the history
  • Loading branch information
hattya committed Oct 16, 2024
1 parent 89590f7 commit e507556
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 11 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ jobs:
- platform: Linux
os: ubuntu-latest
- platform: macOS
os: macos-latest
os: macos-13
- platform: Windows
os: windows-latest
exclude:
Expand Down
1 change: 0 additions & 1 deletion setup.cfg
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
[sdist]
formats = zip
group = users

[flake8]
Expand Down
2 changes: 1 addition & 1 deletion tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ deps =
flake8-bugbear
mypy
scmver[toml] >= 1.7
passenv = *FLAGS, DISTUTILS_*, INCLUDE, LC_*, LIB, MSSdk, Program*, SETUPTOOLS_*
passenv = *FLAGS, INCLUDE, LC_*, LIB, MSSdk, Program*
commands =
python setup.py build_ext --inplace
# test
Expand Down
16 changes: 8 additions & 8 deletions zopfli/_zopfli/_zopflimodule.h
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/*
* zopfli._zopfli :: _zopflimodule.h
*
* Copyright (c) 2015-2021 Akinori Hattori <[email protected]>
* Copyright (c) 2015-2024 Akinori Hattori <[email protected]>
*
* SPDX-License-Identifier: Apache-2.0
*/
Expand Down Expand Up @@ -40,13 +40,13 @@ extern "C" {
PyThread_free_lock((self)->lock); \
} \
} while (0)
# define ACQUIRE_LOCK(self) \
do { \
if (!PyThread_acquire_lock((self)->lock, 0)) { \
Py_BEGIN_ALLOW_THREADS \
PyThread_acquire_lock((self)->lock, 1); \
Py_END_ALLOW_THREADS \
} \
# define ACQUIRE_LOCK(self) \
do { \
if (!PyThread_acquire_lock((self)->lock, NOWAIT_LOCK)) { \
Py_BEGIN_ALLOW_THREADS \
PyThread_acquire_lock((self)->lock, WAIT_LOCK); \
Py_END_ALLOW_THREADS \
} \
} while (0)
# define RELEASE_LOCK(self) PyThread_release_lock((self)->lock)
# else
Expand Down

0 comments on commit e507556

Please sign in to comment.