summaryrefslogtreecommitdiff
path: root/py/mpz.c
diff options
context:
space:
mode:
authorstijn <stinos@zoho.com>2014-05-05 12:18:27 +0200
committerstijn <stinos@zoho.com>2014-05-08 10:06:43 +0200
commit01d6be4d512118d39ef52f79ca9ddddd2bba3f32 (patch)
treee409a3f5397df34518027a2ce5f62065196f82d7 /py/mpz.c
parentc1c32d65af038ba1b2a2a8dd69e3f7e63eac5f3e (diff)
Windows MSVC port
Extend the windows port so it compiles with the toolchain from Visual Studio 2013
Diffstat (limited to 'py/mpz.c')
-rw-r--r--py/mpz.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/py/mpz.c b/py/mpz.c
index d6eca3068..8eed283f0 100644
--- a/py/mpz.c
+++ b/py/mpz.c
@@ -1092,8 +1092,11 @@ mpz_t *mpz_gcd(const mpz_t *z1, const mpz_t *z2) {
*/
mpz_t *mpz_lcm(const mpz_t *z1, const mpz_t *z2)
{
- if (z1->len == 0 || z2->len == 0)
- return mpz_zero();
+ // braces below are required for compilation to succeed with CL, see bug report
+ // https://connect.microsoft.com/VisualStudio/feedback/details/864169/compilation-error-when-braces-are-left-out-of-single-line-if-statement
+ if (z1->len == 0 || z2->len == 0) {
+ return mpz_zero();
+ }
mpz_t *gcd = mpz_gcd(z1, z2);
mpz_t *quo = mpz_zero();