weixlu · GitHub

Bug report

Bug description:

When building CPython with libmpdec, enabling the EXTRA_FUNCTIONALITY option fails to compile:

./Modules/_decimal/_decimal.c:6996:12: error: too few arguments to function '_decimal_Context__apply'
  6996 |     return _decimal_Context__apply(context, x);
      |            ^~~~~~~~~~~~~~~~~~~~~~~

Steps to reproduce

  1. Install libmpdec.
  2. CFLAGS="-DEXTRA_FUNCTIONALITY" ./configure --with-pydebug
  3. make -j

Proposed fix

The wrapper should call the implementation function directly: _decimal_Context__apply_impl(context, cls, x).
If acceptable, I plan to open a PR for this.

CPython versions tested on:

CPython main branch

Operating systems tested on:

Linux

Linked PRs

Read the original on github.com ↗