[pypy-svn] r69211 - in pypy/branch/msvc-asmgcroot/pypy/translator/c: gcc test
afa at codespeak.net
afa at codespeak.net
Thu Nov 12 10:31:25 CET 2009
Author: afa
Date: Thu Nov 12 10:31:23 2009
New Revision: 69211
Modified:
pypy/branch/msvc-asmgcroot/pypy/translator/c/gcc/trackgcroot.py
pypy/branch/msvc-asmgcroot/pypy/translator/c/test/test_newgc.py
Log:
Don't hardcode the name of the libc inside the generated executable
This fixes the case when the CPython used to run the tests was built with a different compiler.
Also remove PUBLIC for one more symbol, found with some compile options.
Modified: pypy/branch/msvc-asmgcroot/pypy/translator/c/gcc/trackgcroot.py
==============================================================================
--- pypy/branch/msvc-asmgcroot/pypy/translator/c/gcc/trackgcroot.py (original)
+++ pypy/branch/msvc-asmgcroot/pypy/translator/c/gcc/trackgcroot.py Thu Nov 12 10:31:23 2009
@@ -1111,6 +1111,8 @@
line = '; ' + line
elif line.startswith("PUBLIC\t??_C@"):
line = '; ' + line
+ elif line == "PUBLIC\t__$ArrayPad$\n":
+ line = '; ' + line
# Because we insert labels in the code, some "SHORT" jumps
# are now longer than 127 bytes. We turn them all into
Modified: pypy/branch/msvc-asmgcroot/pypy/translator/c/test/test_newgc.py
==============================================================================
--- pypy/branch/msvc-asmgcroot/pypy/translator/c/test/test_newgc.py (original)
+++ pypy/branch/msvc-asmgcroot/pypy/translator/c/test/test_newgc.py Thu Nov 12 10:31:23 2009
@@ -622,7 +622,7 @@
import gc
slong = cast_type_to_ffitype(rffi.LONG)
- from pypy.rpython.lltypesystem.ll2ctypes import libc_name
+ from pypy.rlib.libffi import get_libc_name
def callback(ll_args, ll_res, stuff):
gc.collect()
@@ -637,7 +637,7 @@
res[0] = -1
def f():
- libc = CDLL(libc_name)
+ libc = CDLL(get_libc_name())
qsort = libc.getpointer('qsort', [ffi_type_pointer, slong,
slong, ffi_type_pointer],
ffi_type_void)
More information about the Pypy-commit
mailing list