PipeWire 1.7.0
Loading...
Searching...
No Matches
overflow.h
1/* Simple Plugin API */
2/* SPDX-FileCopyrightText: Copyright © 2026 Wim Taymans */
3/* SPDX-License-Identifier: MIT */
4
5#ifndef SPA_UTILS_OVERFLOW_H
6#define SPA_UTILS_OVERFLOW_H
7
8#ifdef __cplusplus
9extern "C" {
10#endif
11
18#define spa_overflow_add(a, b, res) __builtin_add_overflow(a, b, res)
19
26#define spa_overflow_sub(a, b, res) __builtin_sub_overflow(a, b, res)
27
34#define spa_overflow_mul(a, b, res) __builtin_mul_overflow(a, b, res)
35
36#ifdef __cplusplus
37} /* extern "C" */
38#endif
39
40#endif /* SPA_UTILS_OVERFLOW_H */