1/* mpfr_clears -- free the memory space allocated for several 2 floating-point numbers 3 4Copyright 2003-2004, 2006-2023 Free Software Foundation, Inc. 5Contributed by the AriC and Caramba projects, INRIA. 6 7This file is part of the GNU MPFR Library. 8 9The GNU MPFR Library is free software; you can redistribute it and/or modify 10it under the terms of the GNU Lesser General Public License as published by 11the Free Software Foundation; either version 3 of the License, or (at your 12option) any later version. 13 14The GNU MPFR Library is distributed in the hope that it will be useful, but 15WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY 16or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public 17License for more details. 18 19You should have received a copy of the GNU Lesser General Public License 20along with the GNU MPFR Library; see the file COPYING.LESSER. If not, see 21https://www.gnu.org/licenses/ or write to the Free Software Foundation, Inc., 2251 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA. */ 23 24#ifdef HAVE_CONFIG_H 25# include "config.h" 26#endif 27 28#if HAVE_STDARG 29# include <stdarg.h> 30#else 31# include <varargs.h> 32#endif 33 34#include "mpfr-impl.h" 35 36void 37#if HAVE_STDARG 38mpfr_clears (mpfr_ptr x, ...) 39#else 40mpfr_clears (va_alist) 41 va_dcl 42#endif 43{ 44 va_list arg; 45 46#if HAVE_STDARG 47 va_start (arg, x); 48#else 49 mpfr_ptr x; 50 va_start(arg); 51 x = va_arg (arg, mpfr_ptr); 52#endif 53 54 while (x != 0) 55 { 56 mpfr_clear (x); 57 x = (mpfr_ptr) va_arg (arg, mpfr_ptr); 58 } 59 va_end (arg); 60} 61