diff options
| author | Dimitri Staessens <dimitri@ouroboros.rocks> | 2026-07-26 13:49:26 +0200 |
|---|---|---|
| committer | Dimitri Staessens <dimitri@ouroboros.rocks> | 2026-07-26 14:50:26 +0200 |
| commit | 33f3c6fc4ca8810cee4c517594be725a26eec70c (patch) | |
| tree | c4b2f8c14357b1b4e979e01c3b516ddf254f3b98 /ffi | |
| parent | 3947452e391b1f1fc3933b28ce97d86e3b555d84 (diff) | |
| download | pyouroboros-33f3c6fc4ca8810cee4c517594be725a26eec70c.tar.gz pyouroboros-33f3c6fc4ca8810cee4c517594be725a26eec70c.zip | |
This is basically a clean up pass to make sure all docstrings are
aligned. The copyright banners are replaced by SPDX statements. Also
did a general clean up on the comments. Passes pylint. No structural
changes.
Signed-off-by: Dimitri Staessens <dimitri@ouroboros.rocks>
Diffstat (limited to 'ffi')
| -rw-r--r-- | ffi/fccntl_wrap.h | 4 | ||||
| -rw-r--r-- | ffi/pyouroboros_build_dev.py | 29 | ||||
| -rw-r--r-- | ffi/pyouroboros_build_irm.py | 29 |
3 files changed, 20 insertions, 42 deletions
diff --git a/ffi/fccntl_wrap.h b/ffi/fccntl_wrap.h index 0555e24..7cfc902 100644 --- a/ffi/fccntl_wrap.h +++ b/ffi/fccntl_wrap.h @@ -71,7 +71,7 @@ int flow_get_flags(int fd) { uint32_t flags; - if (fccntl(fd, FLOWGFLAGS, &flags)) + if (fccntl(fd, FLOWGFLAGS, &flags) < 0) return -EPERM; return (int) flags; @@ -86,7 +86,7 @@ int flow_get_frct_flags(int fd) { uint16_t flags; - if (fccntl(fd, FRCTGFLAGS, &flags)) + if (fccntl(fd, FRCTGFLAGS, &flags) < 0) return -EPERM; return (int) flags; diff --git a/ffi/pyouroboros_build_dev.py b/ffi/pyouroboros_build_dev.py index d32d577..fc7a05a 100644 --- a/ffi/pyouroboros_build_dev.py +++ b/ffi/pyouroboros_build_dev.py @@ -1,29 +1,18 @@ # -# Ouroboros - Copyright (C) 2016 - 2026 -# -# Python API for Ouroboros -# -# Dimitri Staessens <dimitri@ouroboros.rocks> -# -# This library is free software; you can redistribute it and/or -# modify it under the terms of the GNU Lesser General Public License -# version 2.1 as published by the Free Software Foundation. -# -# This library is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -# Lesser General Public License for more details. -# -# You should have received a copy of the GNU Lesser General Public -# License along with this library; if not, write to the Free Software -# Foundation, Inc., http://www.fsf.org/about/contact/. +# SPDX-FileCopyrightText: 2016 - 2026 Dimitri Staessens +# SPDX-License-Identifier: LGPL-2.1-only # -"""CFFI build script for the ouroboros-dev library.""" +""" +CFFI build script for the ouroboros-dev library. +""" -# qosspec_t / timespec cdef is duplicated in the irm builder per CFFI module. +# qosspec_t / timespec cdef is duplicated in the irm builder, one copy +# per CFFI module. # pylint: disable=duplicate-code +from __future__ import annotations + from cffi import FFI ffibuilder: FFI = FFI() diff --git a/ffi/pyouroboros_build_irm.py b/ffi/pyouroboros_build_irm.py index 1773788..a9f4bc9 100644 --- a/ffi/pyouroboros_build_irm.py +++ b/ffi/pyouroboros_build_irm.py @@ -1,29 +1,18 @@ # -# Ouroboros - Copyright (C) 2016 - 2026 -# -# Python API for Ouroboros -# -# Dimitri Staessens <dimitri@ouroboros.rocks> -# -# This library is free software; you can redistribute it and/or -# modify it under the terms of the GNU Lesser General Public License -# version 2.1 as published by the Free Software Foundation. -# -# This library is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -# Lesser General Public License for more details. -# -# You should have received a copy of the GNU Lesser General Public -# License along with this library; if not, write to the Free Software -# Foundation, Inc., http://www.fsf.org/about/contact/. +# SPDX-FileCopyrightText: 2016 - 2026 Dimitri Staessens +# SPDX-License-Identifier: LGPL-2.1-only # -"""CFFI build script for the ouroboros-irm library.""" +""" +CFFI build script for the ouroboros-irm library. +""" -# qosspec_t / timespec cdef is duplicated in the dev builder per CFFI module. +# qosspec_t / timespec cdef is duplicated in the dev builder, one copy +# per CFFI module. # pylint: disable=duplicate-code +from __future__ import annotations + from cffi import FFI ffibuilder: FFI = FFI() |
