ruby-changes:61411
From: Nobuyoshi <ko1@a...>
Date: Fri, 29 May 2020 02:45:12 +0900 (JST)
Subject: [ruby-changes:61411] b8fadf3a6b (master): Respect BIGNUM_DEBUG defined by command line option
https://git.ruby-lang.org/ruby.git/commit/?id=b8fadf3a6b From b8fadf3a6bc0435a23696bb7dc5a261066e0cf83 Mon Sep 17 00:00:00 2001 From: Nobuyoshi Nakada <nobu@r...> Date: Fri, 29 May 2020 02:43:30 +0900 Subject: Respect BIGNUM_DEBUG defined by command line option And fixed typo in compilers.yml. diff --git a/.github/workflows/compilers.yml b/.github/workflows/compilers.yml index ab79032..a16a79e 100644 --- a/.github/workflows/compilers.yml +++ b/.github/workflows/compilers.yml @@ -92,7 +92,7 @@ jobs: https://github.com/ruby/ruby/blob/trunk/.github/workflows/compilers.yml#L92 - { key: cppflags, name: NDEBUG, value: '-DNDEBUG' } - { key: cppflags, name: RUBY_DEBUG, value: '-DRUBY_DEBUG' } - { key: cppflags, name: ARRAY_DEBUG, value: '-DARRAY_DEBUG' } - - { key: cppflags, name: BUGNUM_DEBUG, value: '-DBUGNUM_DEBUG' } + - { key: cppflags, name: BIGNUM_DEBUG, value: '-DBIGNUM_DEBUG' } - { key: cppflags, name: CCAN_LIST_DEBUG, value: '-DCCAN_LIST_DEBUG' } - { key: cppflags, name: CPDEBUG=-1, value: '-DCPDEBUG=-1' } - { key: cppflags, name: ENC_DEBUG, value: '-DENC_DEBUG' } diff --git a/bignum.c b/bignum.c index 956673a..66b60e4 100644 --- a/bignum.c +++ b/bignum.c @@ -2906,7 +2906,10 @@ bary_divmod(BDIGIT *qds, size_t qn, BDIGIT *rds, size_t rn, const BDIGIT *xds, s https://github.com/ruby/ruby/blob/trunk/bignum.c#L2906 } -#define BIGNUM_DEBUG 0 +#ifndef BIGNUM_DEBUG +# define BIGNUM_DEBUG (0+RUBY_DEBUG) +#endif + #if BIGNUM_DEBUG #define ON_DEBUG(x) do { x; } while (0) static void -- cgit v0.10.2 -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/