[ruby/bigdecimal] Make VPrint function always available
https://github.com/ruby/bigdecimal/commit/5391f7e92c
This commit is contained in:
parent
c0735d1d72
commit
019f53de5c
@ -7,9 +7,7 @@
|
||||
*/
|
||||
|
||||
/* #define BIGDECIMAL_DEBUG 1 */
|
||||
#ifdef BIGDECIMAL_DEBUG
|
||||
# define BIGDECIMAL_ENABLE_VPRINT 1
|
||||
#endif
|
||||
|
||||
#include "bigdecimal.h"
|
||||
#include "ruby/util.h"
|
||||
|
||||
@ -198,10 +196,7 @@ static VALUE VpCheckGetValue(Real *p);
|
||||
static void VpInternalRound(Real *c, size_t ixDigit, DECDIG vPrev, DECDIG v);
|
||||
static int VpLimitRound(Real *c, size_t ixDigit);
|
||||
static Real *VpCopy(Real *pv, Real const* const x);
|
||||
|
||||
#ifdef BIGDECIMAL_ENABLE_VPRINT
|
||||
static int VPrint(FILE *fp,const char *cntl_chr,Real *a);
|
||||
#endif
|
||||
|
||||
/*
|
||||
* **** BigDecimal part ****
|
||||
@ -4501,6 +4496,8 @@ Init_bigdecimal(void)
|
||||
id_to_r = rb_intern_const("to_r");
|
||||
id_eq = rb_intern_const("==");
|
||||
id_half = rb_intern_const("half");
|
||||
|
||||
(void)VPrint; /* suppress unused warning */
|
||||
}
|
||||
|
||||
/*
|
||||
@ -6272,7 +6269,6 @@ Exit:
|
||||
* Note: % must not appear more than once
|
||||
* a ... VP variable to be printed
|
||||
*/
|
||||
#ifdef BIGDECIMAL_ENABLE_VPRINT
|
||||
static int
|
||||
VPrint(FILE *fp, const char *cntl_chr, Real *a)
|
||||
{
|
||||
@ -6373,7 +6369,6 @@ VPrint(FILE *fp, const char *cntl_chr, Real *a)
|
||||
|
||||
return (int)nc;
|
||||
}
|
||||
#endif
|
||||
|
||||
static void
|
||||
VpFormatSt(char *psz, size_t fFmt)
|
||||
|
Loading…
x
Reference in New Issue
Block a user