From 99daed9fe2ae58d01441d87831f51a4db9b91b98 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Albin=20Ahlb=C3=A4ck?= Date: Mon, 11 Dec 2023 14:04:20 +0100 Subject: [PATCH] _perm_set_one -> _perm_one --- doc/source/perm.rst | 2 +- src/gr/perm.c | 2 +- src/perm.h | 4 +++- 3 files changed, 5 insertions(+), 3 deletions(-) diff --git a/doc/source/perm.rst b/doc/source/perm.rst index b51ce7dbf1..23b6b58a3c 100644 --- a/doc/source/perm.rst +++ b/doc/source/perm.rst @@ -25,7 +25,7 @@ Assignment Sets the permutation ``res`` to the same as the permutation ``vec``. -.. function:: void _perm_set_one(slong * vec, slong n) +.. function:: void _perm_one(slong * vec, slong n) Sets the permutation to the identity permutation. diff --git a/src/gr/perm.c b/src/gr/perm.c index d774eb2f91..3410fb2b25 100644 --- a/src/gr/perm.c +++ b/src/gr/perm.c @@ -171,7 +171,7 @@ _gr_perm_set_other(perm_t res, gr_srcptr x, gr_ctx_t x_ctx, gr_ctx_t ctx) int _gr_perm_one(perm_t res, gr_ctx_t ctx) { - _perm_set_one(res->entries, PERM_N(ctx)); + _perm_one(res->entries, PERM_N(ctx)); return GR_SUCCESS; } diff --git a/src/perm.h b/src/perm.h index e8d183e996..c1b6780462 100644 --- a/src/perm.h +++ b/src/perm.h @@ -70,7 +70,7 @@ PERM_INLINE void _perm_set(slong *res, const slong *vec, slong n) res[i] = vec[i]; } -PERM_INLINE void _perm_set_one(slong *vec, slong n) +PERM_INLINE void _perm_one(slong *vec, slong n) { slong i; @@ -171,6 +171,8 @@ PERM_INLINE int _perm_print(const slong * vec, slong n) return 1; } +#define _perm_set_one _Pragma("GCC error \"'_perm_set_one' is deprecated. Use '_perm_one' instead.\"") + #ifdef __cplusplus } #endif