qfall_math/integer_mod_q/mat_polynomial_ring_zq/unsafe_functions.rs
1// Copyright © 2025 Niklas Siemer
2//
3// This file is part of qFALL-math.
4//
5// qFALL-math is free software: you can redistribute it and/or modify it under
6// the terms of the Mozilla Public License Version 2.0 as published by the
7// Mozilla Foundation. See <https://mozilla.org/en-US/MPL/2.0/>.
8
9//! This module contains public functions that enable access to underlying
10//! [FLINT](https://flintlib.org/) structs. Therefore, they require to be unsafe.
11use super::MatPolynomialRingZq;
12use crate::macros::unsafe_passthrough::{unsafe_getter_indirect, unsafe_setter_indirect};
13use flint_sys::fmpz_poly_mat::fmpz_poly_mat_struct;
14
15unsafe_getter_indirect!(
16 MatPolynomialRingZq,
17 matrix,
18 get_fmpz_poly_mat_struct,
19 fmpz_poly_mat_struct
20);
21
22unsafe_setter_indirect!(
23 MatPolynomialRingZq,
24 matrix,
25 set_fmpz_poly_mat_struct,
26 fmpz_poly_mat_struct
27);