diff options
author | Zachary Ware <zach@python.org> | 2024-03-18 17:07:25 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-03-18 17:07:25 (GMT) |
commit | 849e0716d378d6f9f724d1b3c386f6613d52a49d (patch) | |
tree | 4db4dfc15306913513a2d7f0e2c22924be6b3a27 /Modules/_decimal/windows | |
parent | 7707b14489644073ab0153f5751c6ddbf3fc6f91 (diff) | |
download | cpython-849e0716d378d6f9f724d1b3c386f6613d52a49d.zip cpython-849e0716d378d6f9f724d1b3c386f6613d52a49d.tar.gz cpython-849e0716d378d6f9f724d1b3c386f6613d52a49d.tar.bz2 |
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.
Diffstat (limited to 'Modules/_decimal/windows')
-rw-r--r-- | Modules/_decimal/windows/mpdecimal.h | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/Modules/_decimal/windows/mpdecimal.h b/Modules/_decimal/windows/mpdecimal.h new file mode 100644 index 0000000..77bc622 --- /dev/null +++ b/Modules/_decimal/windows/mpdecimal.h @@ -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 |