Author: Antonio Cuni <anto.c...@gmail.com> Branch: Changeset: r44909:361d379b1d76 Date: 2011-06-13 17:36 +0200 http://bitbucket.org/pypy/pypy/changeset/361d379b1d76/
Log: merge heads diff --git a/pypy/jit/backend/llsupport/descr.py b/pypy/jit/backend/llsupport/descr.py --- a/pypy/jit/backend/llsupport/descr.py +++ b/pypy/jit/backend/llsupport/descr.py @@ -46,6 +46,8 @@ size = 0 # help translation is_immutable = False + tid = llop.combine_ushort(lltype.Signed, 0, 0) + def __init__(self, size, count_fields_if_immut=-1): self.size = size self.count_fields_if_immut = count_fields_if_immut diff --git a/pypy/module/micronumpy/interp_numarray.py b/pypy/module/micronumpy/interp_numarray.py --- a/pypy/module/micronumpy/interp_numarray.py +++ b/pypy/module/micronumpy/interp_numarray.py @@ -84,7 +84,7 @@ return self.get_concrete().descr_len(space) def descr_getitem(self, space, w_idx): - # TODO: indexation by tuples + # TODO: indexing by tuples start, stop, step, slice_length = space.decode_index4(w_idx, self.find_size()) if step == 0: # Single index @@ -93,7 +93,6 @@ # Slice res = SingleDimSlice(start, stop, step, slice_length, self, self.signature.transition(SingleDimSlice.static_signature)) return space.wrap(res) - @unwrap_spec(item=int, value=float) def descr_setitem(self, space, item, value): @@ -233,7 +232,7 @@ def descr_len(self, space): return space.wrap(self.find_size()) - + def calc_index(self, item): raise NotImplementedError diff --git a/pypy/module/micronumpy/test/test_base.py b/pypy/module/micronumpy/test/test_base.py --- a/pypy/module/micronumpy/test/test_base.py +++ b/pypy/module/micronumpy/test/test_base.py @@ -17,3 +17,13 @@ assert v2.signature is v3.signature v4 = ar.descr_add(space, ar) assert v1.signature is v4.signature + + def test_slice_signature(self, space): + ar = SingleDimArray(10) + v1 = ar.descr_getitem(space, space.wrap(slice(1, 5, 1))) + v2 = ar.descr_getitem(space, space.wrap(slice(4, 6, 1))) + assert v1.signature is v2.signature + + v3 = ar.descr_add(space, v1) + v4 = ar.descr_add(space, v2) + assert v3.signature is v4.signature \ No newline at end of file diff --git a/pypy/rlib/clibffi.py b/pypy/rlib/clibffi.py --- a/pypy/rlib/clibffi.py +++ b/pypy/rlib/clibffi.py @@ -18,6 +18,10 @@ import sys import ctypes.util +from pypy.tool.ansi_print import ansi_log +log = py.log.Producer("libffi") +py.log.setconsumer("libffi", ansi_log) + # maaaybe isinstance here would be better. Think _MSVC = platform.name == "msvc" _MINGW = platform.name == "mingw32" @@ -67,12 +71,17 @@ result = os.path.join(dir, 'libffi.a') if os.path.exists(result): return result - raise ImportError("'libffi.a' not found in %s" % (dirlist,)) + log.WARNING("'libffi.a' not found in %s" % (dirlist,)) + log.WARNING("trying to use the dynamic library instead...") + return None + path_libffi_a = None if hasattr(platform, 'library_dirs_for_libffi_a'): + path_libffi_a = find_libffi_a() + if path_libffi_a is not None: # platforms on which we want static linking libraries = [] - link_files = [find_libffi_a()] + link_files = [path_libffi_a] else: # platforms on which we want dynamic linking libraries = ['ffi'] diff --git a/pypy/rlib/ropenssl.py b/pypy/rlib/ropenssl.py --- a/pypy/rlib/ropenssl.py +++ b/pypy/rlib/ropenssl.py @@ -134,7 +134,8 @@ def external(name, argtypes, restype, **kw): kw['compilation_info'] = eci - eci.export_symbols += (name,) + if not kw.get('macro', False): + eci.export_symbols += (name,) return rffi.llexternal( name, argtypes, restype, **kw) _______________________________________________ pypy-commit mailing list pypy-commit@python.org http://mail.python.org/mailman/listinfo/pypy-commit