Commits

mattip committed 14dc827

fix for win32

  • Participants
  • Parent commits 095f6bf

Comments (0)

Files changed (1)

File rpython/rlib/test/test_jit_libffi.py

 import math
 import ctypes
+import sys
 from rpython.rtyper.lltypesystem import lltype, rffi
 from rpython.rlib import clibffi
 from rpython.rlib.rarithmetic import intmask
 from rpython.rlib.jit_libffi import CIF_DESCRIPTION
 from rpython.rlib.jit_libffi import jit_ffi_prep_cif, jit_ffi_call
 
-
-math_sin = intmask(ctypes.cast(ctypes.CDLL(None).sin, ctypes.c_void_p).value)
+if sys.platform == 'win32':
+    math_sin = intmask(ctypes.cast(ctypes.cdll.msvcrt.sin, ctypes.c_void_p).value)
+else:    
+    math_sin = intmask(ctypes.cast(ctypes.CDLL(None).sin, ctypes.c_void_p).value)
 math_sin = rffi.cast(rffi.VOIDP, math_sin)