gh-115119: Switch Windows build to mpdecimal external (GH-115182)

This includes adding what should be a relatively temporary
`Modules/_decimal/windows/mpdecimal.h` shim to choose between `mpdecimal32vc.h`
or `mpdecimal64vc.h` based on which of `CONFIG_64` or `CONFIG_32` is defined.
This commit is contained in:
Zachary Ware 2024-03-18 12:07:25 -05:00 committed by GitHub
parent 7707b14489
commit 849e0716d3
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
7 changed files with 117 additions and 63 deletions

View file

@ -0,0 +1,17 @@
/* Windows mpdecimal.h shim
*
* Generally, the mpdecimal library build will copy the correct header into
* place named "mpdecimal.h", but since we're building it ourselves directly
* into _decimal.pyd, we need to pick the right one.
*
* */
#if defined(_MSC_VER)
#if defined(CONFIG_64)
#include <mpdecimal64vc.h>
#elif defined(CONFIG_32)
#include <mpdecimal32vc.h>
#else
#error "Unknown configuration!"
#endif
#endif