Skip to main content

qfall_math/integer_mod_q/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::PolynomialRingZq;
12use crate::macros::unsafe_passthrough::{unsafe_getter_indirect, unsafe_setter_indirect};
13use flint_sys::fmpz_poly::fmpz_poly_struct;
14
15unsafe_getter_indirect!(
16    PolynomialRingZq,
17    poly,
18    get_fmpz_poly_struct,
19    fmpz_poly_struct
20);
21
22unsafe_setter_indirect!(
23    PolynomialRingZq,
24    poly,
25    set_fmpz_poly_struct,
26    fmpz_poly_struct
27);