Skip to content

Commit

Permalink
Merge pull request #1656 from albinahlback/perm_one
Browse files Browse the repository at this point in the history
_perm_set_one -> _perm_one
  • Loading branch information
albinahlback authored Dec 11, 2023
2 parents 35b8bcc + 99daed9 commit 9f96d74
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 3 deletions.
2 changes: 1 addition & 1 deletion doc/source/perm.rst
Original file line number Diff line number Diff line change
Expand Up @@ -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.

Expand Down
2 changes: 1 addition & 1 deletion src/gr/perm.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}

Expand Down
4 changes: 3 additions & 1 deletion src/perm.h
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand Down Expand Up @@ -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
Expand Down

0 comments on commit 9f96d74

Please sign in to comment.