[pypy-svn] r62000 - pypy/trunk/pypy/module/_rawffi

afa at codespeak.net afa at codespeak.net
Wed Feb 18 11:27:10 CET 2009


Author: afa
Date: Wed Feb 18 11:27:09 2009
New Revision: 62000

Modified:
   pypy/trunk/pypy/module/_rawffi/interp_rawffi.py
Log:
Fix translation on Unix: the letter 'v' should be set only on Windows.


Modified: pypy/trunk/pypy/module/_rawffi/interp_rawffi.py
==============================================================================
--- pypy/trunk/pypy/module/_rawffi/interp_rawffi.py	(original)
+++ pypy/trunk/pypy/module/_rawffi/interp_rawffi.py	Wed Feb 18 11:27:09 2009
@@ -41,11 +41,13 @@
     'Z' : ffi_type_pointer,
 }
 TYPEMAP_PTR_LETTERS = "POszZ"
+TYPEMAP_NUMBER_LETTERS = "bBhHiIlLqQ"
 
 if _MS_WINDOWS:
     TYPEMAP['X'] = ffi_type_pointer
     TYPEMAP['v'] = ffi_type_sshort
     TYPEMAP_PTR_LETTERS += 'X'
+    TYPEMAP_NUMBER_LETTERS += 'v'
 
 def size_alignment(ffi_type):
     return intmask(ffi_type.c_size), intmask(ffi_type.c_alignment)
@@ -226,7 +228,7 @@
 buffer.""" # xxx fix doc
 )
 
-unroll_letters_for_numbers = unrolling_iterable("bBhHiIlLqQv")
+unroll_letters_for_numbers = unrolling_iterable(TYPEMAP_NUMBER_LETTERS)
 
 def segfault_exception(space, reason):
     w_mod = space.getbuiltinmodule("_rawffi")



More information about the Pypy-commit mailing list