mirror of
https://github.com/micropython/micropython.git
synced 2026-01-05 03:30:14 +01:00
Windows MSVC port
Extend the windows port so it compiles with the toolchain from Visual Studio 2013
This commit is contained in:
7
py/mpz.c
7
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();
|
||||
|
||||
Reference in New Issue
Block a user