Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix gcc 14 errors. Fixes #28 #29

Merged
merged 3 commits into from
May 28, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 4 additions & 6 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -46,8 +46,6 @@ jobs:
matrix:
include:
# MacOS
- python: '3.7'
os: macos-latest
- python: '3.8'
os: macos-latest
- python: '3.9'
Expand All @@ -56,11 +54,9 @@ jobs:
os: macos-latest
- python: '3.11'
os: macos-latest
- python: '3.12'
os: macos-latest
# Windows
- python: '3.6'
os: windows-latest
- python: '3.7'
os: windows-latest
- python: '3.8'
os: windows-latest
- python: '3.9'
Expand All @@ -69,6 +65,8 @@ jobs:
os: windows-latest
- python: '3.11'
os: windows-latest
- python: '3.12'
os: windows-latest

steps:
- uses: actions/checkout@v2
Expand Down
15 changes: 6 additions & 9 deletions .github/workflows/tox.yml
Original file line number Diff line number Diff line change
Expand Up @@ -46,9 +46,6 @@ jobs:

matrix:
include:
- toxenv: py37
python: "3.7"
os: ubuntu-latest
- toxenv: py38
python: "3.8"
os: ubuntu-latest
Expand All @@ -61,9 +58,9 @@ jobs:
- toxenv: py311
python: "3.11"
os: ubuntu-latest
- toxenv: py37
python: "3.7"
os: windows-latest
- toxenv: py312
python: "3.12"
os: ubuntu-latest
- toxenv: py38
python: "3.8"
os: windows-latest
Expand All @@ -76,9 +73,6 @@ jobs:
- toxenv: py311
python: "3.11"
os: windows-latest
- toxenv: py37
python: "3.7"
os: macos-latest
- toxenv: py38
python: "3.8"
os: macos-latest
Expand All @@ -91,6 +85,9 @@ jobs:
- toxenv: py311
python: "3.11"
os: macos-latest
- toxenv: py312
python: "3.12"
os: macos-latest

steps:
- uses: actions/checkout@v2
Expand Down
15 changes: 8 additions & 7 deletions caio/linux_aio.c
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
#include <stdlib.h>
#include <sys/eventfd.h>
#include <sys/syscall.h>
#include <stdint.h>
#include <unistd.h>

#define PY_SSIZE_T_CLEAN
Expand Down Expand Up @@ -387,7 +388,7 @@ static PyObject* AIOContext_process_events(
for (i = 0; i < result; i++) {
ev = &events[i];

op = (AIOOperation*) ev->data;
op = (AIOOperation*)(uintptr_t) ev->data;
if (ev->res >= 0) {
op->iocb.aio_nbytes = ev->res;
} else {
Expand Down Expand Up @@ -574,7 +575,7 @@ static PyObject* AIOOperation_read(

memset(&self->iocb, 0, sizeof(struct iocb));

self->iocb.aio_data = self;
self->iocb.aio_data = (uint64_t)(uintptr_t) self;
self->context = NULL;
self->buffer = NULL;
self->py_buffer = NULL;
Expand Down Expand Up @@ -627,7 +628,7 @@ static PyObject* AIOOperation_write(

memset(&self->iocb, 0, sizeof(struct iocb));

self->iocb.aio_data = self;
self->iocb.aio_data = (uint64_t)(uintptr_t) self;

self->context = NULL;
self->buffer = NULL;
Expand Down Expand Up @@ -703,7 +704,7 @@ static PyObject* AIOOperation_fsync(

memset(&self->iocb, 0, sizeof(struct iocb));

self->iocb.aio_data = self;
self->iocb.aio_data = (uint64_t)(uintptr_t) self;
self->context = NULL;
self->buffer = NULL;
self->py_buffer = NULL;
Expand Down Expand Up @@ -748,7 +749,7 @@ static PyObject* AIOOperation_fdsync(

memset(&self->iocb, 0, sizeof(struct iocb));

self->iocb.aio_data = self;
self->iocb.aio_data = (uint64_t)(uintptr_t) self;
self->buffer = NULL;
self->py_buffer = NULL;

Expand Down Expand Up @@ -876,7 +877,7 @@ static PyMemberDef AIOOperation_members[] = {

/*
AIOOperation methods
*/
*/
static PyMethodDef AIOOperation_methods[] = {
{
"read",
Expand Down Expand Up @@ -917,7 +918,7 @@ static PyMethodDef AIOOperation_methods[] = {

/*
AIOOperation class
*/
*/
static PyTypeObject
AIOOperationType = {
PyVarObject_HEAD_INIT(NULL, 0)
Expand Down
2 changes: 1 addition & 1 deletion scripts/make-wheels.sh
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,11 @@ function build_wheel() {
/opt/python/$1/bin/pip wheel . -f . -w dist
}

build_wheel cp37-cp37m
build_wheel cp38-cp38
build_wheel cp39-cp39
build_wheel cp310-cp310
build_wheel cp311-cp311
build_wheel cp312-cp312

cd dist

Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -69,11 +69,11 @@
"Operating System :: Microsoft",
"Programming Language :: Python",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3.7",
"Programming Language :: Python :: 3.8",
"Programming Language :: Python :: 3.9",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
"Programming Language :: Python :: Implementation :: CPython",
],
python_requires=">=3.7, <4",
Expand Down
2 changes: 1 addition & 1 deletion tox.ini
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
[tox]
envlist = lint,py3{7-11}
envlist = lint,py3{8-12}

[testenv]
passenv = COVERALLS_*, FORCE_COLOR
Expand Down
Loading