From: Erik Charlebois Date: Mon, 13 May 2013 22:18:48 +0000 (-0400) Subject: VM: Fix Windows VM build following type renaming X-Git-Tag: 0.97~1249 X-Git-Url: https://gitweb.factorcode.org/gitweb.cgi?p=factor.git;a=commitdiff_plain;h=5027f75d79629d838a8d69120eeb1ac658bb2ec6 VM: Fix Windows VM build following type renaming Making cell be a typedef of uintptr_t broke a spot assigning cell* was unsigned long*. Added an explicit cast. --- diff --git a/vm/bitwise_hacks.hpp b/vm/bitwise_hacks.hpp index 7e02783e74..8a7078b3dd 100644 --- a/vm/bitwise_hacks.hpp +++ b/vm/bitwise_hacks.hpp @@ -4,14 +4,14 @@ inline cell log2(cell x) { cell n; #if defined(FACTOR_X86) #if defined(_MSC_VER) - _BitScanReverse(&n, x); + _BitScanReverse((unsigned long*)&n, x); #else asm("bsr %1, %0;" : "=r"(n) : "r"(x)); #endif #elif defined(FACTOR_AMD64) #if defined(_MSC_VER) n = 0; - _BitScanReverse64((DWORD*)&n, x); + _BitScanReverse64((unsigned long*)&n, x); #else asm("bsr %1, %0;" : "=r"(n) : "r"(x)); #endif